@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

html {
  scroll-behavior: smooth;
}

:root {
  /* Core Colors */
  --color-blue: #4285f4;
  --color-green: #34a853;
  --color-yellow: #f9ab00;
  --color-red: #ea4335;

  /* Halftones */
  --color-halftone-blue: #57caff;
  --color-halftone-green: #5cdb6d;
  --color-halftone-yellow: #ffd427;
  --color-halftone-pink: #ff7daf;

  /* Pastels */
  --color-pastel-blue: #c3ecf6;
  --color-pastel-green: #ccf6c5;
  --color-pastel-yellow: #ffe7a5;
  --color-pastel-pink: #f8d8d8;

  /* Grayscale */
  --color-light-gray: #f0f0f0;
  --color-dark-gray: #1e1e1e;

  /* Material 3 Expressive Color System */
  --md-sys-color-primary: var(--color-blue);
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: var(--color-pastel-blue);
  --md-sys-color-on-primary-container: var(--color-dark-gray);

  --md-sys-color-secondary: var(--color-green);
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: var(--color-pastel-green);
  --md-sys-color-on-secondary-container: var(--color-dark-gray);

  --md-sys-color-tertiary: var(--color-yellow);
  --md-sys-color-on-tertiary: var(--color-dark-gray);
  --md-sys-color-tertiary-container: var(--color-pastel-yellow);
  --md-sys-color-on-tertiary-container: var(--color-dark-gray);

  --md-sys-color-error: var(--color-red);
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: var(--color-pastel-pink);
  --md-sys-color-on-error-container: var(--color-dark-gray);

  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: var(--color-dark-gray);
  --md-sys-color-surface-variant: var(--color-light-gray);
  --md-sys-color-on-surface-variant: #525252;

  --md-sys-color-outline: #cccccc;
  --md-sys-color-outline-variant: #e0e0e0;

  /* Surface containers */
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #fcfcfc;
  --md-sys-color-surface-container: #f6f6f6;
  --md-sys-color-surface-container-high: var(--color-light-gray);
  --md-sys-color-surface-container-highest: #ebebeb;

  /* Shadow and elevation */
  --md-sys-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --md-sys-elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --md-sys-elevation-3: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  --md-sys-elevation-4: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  --md-sys-elevation-5: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
}

/* Utility Classes */
.break-on-mobile {
  display: none;
}

@media (max-width: 768px) {
  .break-on-mobile {
    display: block;
  }
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
}

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 24px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--md-sys-elevation-1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  flex-wrap: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-blue), var(--color-halftone-green));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
  border-radius: 24px;
}

.nav-links a:hover::before {
  opacity: 0.1;
}

.nav-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-elevation-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-switcher {
  position: relative;
  display: inline-block;
}

/* Material 3 Expressive Dropdown Trigger */
.language-dropdown-trigger {
  border: 2px solid var(--md-sys-color-outline);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  padding: 12px 20px;
  border-radius: 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-1);
  min-width: 160px;
  justify-content: space-between;
}

.language-dropdown-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-blue), var(--color-halftone-pink));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.language-dropdown-trigger:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-elevation-3);
  border-color: var(--md-sys-color-primary);
}

.language-dropdown-trigger:hover::before {
  opacity: 0.1;
}

.language-dropdown-trigger:active {
  transform: translateY(0);
  box-shadow: var(--md-sys-elevation-1);
}

.language-dropdown-trigger[aria-expanded='true'] .dropdown-icon {
  transform: rotate(180deg);
}

.current-language {
  position: relative;
  z-index: 2;
}

.dropdown-icon {
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  font-size: 20px;
}

/* Material 3 Expressive Dropdown Menu */
.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--md-sys-color-surface-container);
  border: 2px solid var(--md-sys-color-outline-variant);
  border-radius: 24px;
  box-shadow: var(--md-sys-elevation-3);
  padding: 8px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  z-index: 1000;
  backdrop-filter: blur(16px);
}

.language-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Material 3 Expressive Language Options */
.language-option {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.language-option:last-child {
  margin-bottom: 0;
}

.language-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-blue), var(--color-halftone-pink));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.language-option:hover {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  transform: translateX(4px);
}

.language-option:hover::before {
  opacity: 0.08;
}

.language-option.active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 600;
}

.language-option.active::before {
  opacity: 0.1;
}

.language-option:active {
  transform: translateX(2px);
}

/* Register button - Material 3 Expressive style */
.register-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--color-halftone-blue));
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 28px;
  margin-left: 16px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: var(--md-sys-elevation-2);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.register-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-green), var(--color-halftone-yellow));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.register-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--md-sys-elevation-4);
}

.register-button:hover::before {
  opacity: 0.2;
}

.register-button:active {
  transform: translateY(-1px);
  box-shadow: var(--md-sys-elevation-2);
}

/* Hero register button - larger Material 3 Expressive style */
.hero-register-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 40px;
  background: linear-gradient(
    135deg,
    var(--md-sys-color-primary),
    var(--color-halftone-blue),
    var(--md-sys-color-secondary)
  );
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  border-radius: 40px;
  margin-top: 32px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: var(--md-sys-elevation-3);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.hero-register-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-yellow), var(--color-halftone-pink));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.hero-register-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--md-sys-elevation-5);
}

.hero-register-button:hover::before {
  opacity: 0.3;
}

.hero-register-button:active {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--md-sys-elevation-3);
}

.hero-register-button .material-symbols-outlined {
  font-size: 24px;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.hero-register-button:hover .material-symbols-outlined {
  transform: translateX(4px);
}

/* Event info lines */
/* Event date and location (medium font) */
.event-date-location {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Event schedule section (small font) */
.event-schedule {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-day {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-day span:first-child {
  font-weight: 500;
}

.schedule-day span:last-child {
  opacity: 0.8;
}

/* Location map link */
.location-map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

.location-map-link:hover {
  background-color: rgba(66, 133, 244, 0.08);
  text-decoration: underline;
}

.location-map-link .material-symbols-outlined {
  font-size: 18px;
}

main {
  padding: 48px 32px;
  min-height: 100vh;
}

/* === New Hero Section: Engineer's Desk Scene === */
.hero {
  position: relative;
  background: linear-gradient(135deg, #e8f0fe 0%, #fff8e1 100%);
  padding: 40px 40px 40px;
  border-radius: 32px;
  box-shadow: var(--md-sys-elevation-3);
  overflow: hidden;
  min-height: 600px;
}

.desk-scene {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  display: -ms-grid;
  display: grid;
  -ms-grid-rows: auto auto 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 32px;
}

/* Monitor with Presentation Slides */
.monitor {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
}

.monitor-frame {
  position: relative;
  width: 100%;
  max-width: 1000px;
}

.monitor-screen {
  position: relative;
  background: #202124;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 8px solid #3c4043;
  transition: background 0.5s ease;
}

/* Monitor Power Button */
.monitor-power-button {
  position: absolute;
  bottom: 4px;
  right: 25px;
  width: 30px;
  height: 30px;
  background: #3c4043;
  border: 2px solid #5f6368;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0;
}

.monitor-power-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(66, 133, 244, 0.5);
}

.power-led {
  width: 12px;
  height: 12px;
  background: #34a853;
  border-radius: 50%;
  box-shadow:
    0 0 8px #34a853,
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.monitor-screen.screen-off .power-led {
  background: #ea4335;
  box-shadow:
    0 0 8px #ea4335,
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Screen off state */
.monitor-screen.screen-off {
  background: #000;
}

.monitor-screen.screen-off .slides-carousel,
.monitor-screen.screen-off .slide-indicators {
  opacity: 0;
  pointer-events: none;
}

/* Screen power transition animations */
@keyframes screen-power-off {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.02) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(0) scaleX(1);
  }
}

@keyframes screen-power-on {
  0% {
    opacity: 0;
    transform: scaleY(0) scaleX(1);
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.02) scaleX(1);
  }
  100% {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
  }
}

.monitor-screen.powering-off .slides-carousel,
.monitor-screen.powering-off .slide-indicators {
  animation: screen-power-off 0.5s ease-out forwards;
}

.monitor-screen.powering-on .slides-carousel,
.monitor-screen.powering-on .slide-indicators {
  animation: screen-power-on 0.5s ease-out forwards;
}

/* Monitor Animation Styles */
.monitor-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  z-index: 10;
}

.monitor-logo-animation {
  width: 90%;
  height: auto;
  max-width: 90%;
  max-height: 90%;
}

.monitor-logo-animation .line {
  fill: transparent;
  stroke: #202124;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hide animation when screen is off */
.monitor-screen.screen-off .monitor-animation {
  display: none !important;
}

.monitor-stand {
  width: 200px;
  height: 20px;
  background: linear-gradient(to bottom, #5f6368 0%, #3c4043 100%);
  margin: 0 auto;
  border-radius: 0 0 8px 8px;
  position: relative;
}

.monitor-stand::before {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 30px;
  background: #dadce0;
  border-radius: 8px;
}

/* Slides Carousel */
.slides-carousel {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.slides-carousel .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.slides-carousel .slide.active {
  opacity: 1;
  z-index: 1;
}

.slides-carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.slide-indicators .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5f6368;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slide-indicators .indicator.active {
  background: #4285f4;
  width: 24px;
  border-radius: 4px;
}

/* Desk Surface with Items */
.desk-surface {
  position: relative;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: (minmax(80px, 1fr) ;) [auto-fit];
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 24px;
  padding: 40px 20px;
  background: linear-gradient(180deg, #f1f3f4 0%, #e8eaed 100%);
  border-radius: 16px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

.desk-item {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.desk-item:hover {
  transform: translateY(-5px) scale(1.05);
}

/* Interactive animations */
@keyframes key-press {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}

@keyframes key-glow {
  0%,
  100% {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(66, 133, 244, 0.8));
  }
}

.desk-item.keyboard.clicked {
  animation: key-glow 0.5s ease;
}

.desk-item.keyboard.clicked .keys rect {
  animation: key-press 0.1s ease;
}

@keyframes mouse-fly {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(300px, -500px) rotate(45deg);
    opacity: 0;
  }
}

.desk-item.mouse.flying {
  animation: mouse-fly 1s ease-out forwards;
  pointer-events: none;
}

@keyframes duck-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-15px) rotate(-5deg);
  }
  75% {
    transform: translateY(-15px) rotate(5deg);
  }
}

@keyframes duck-blink {
  0%,
  90%,
  100% {
    opacity: 1;
  }
  95% {
    opacity: 0;
  }
}

.desk-item.duck.clicked {
  animation: duck-bounce 0.6s ease;
}

@keyframes tea-shake {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

@keyframes bubble-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.desk-item.bubble-tea.clicked {
  animation: tea-shake 0.5s ease;
}

.desk-item.bubble-tea.clicked circle {
  animation: bubble-float 0.8s ease infinite;
}

@keyframes polaroid-enlarge {
  0% {
    transform: scale(1) rotate(0deg);
    z-index: 1;
  }
  100% {
    transform: scale(3.5) rotate(0deg) translateY(-20px);
    z-index: 1000;
  }
}

@keyframes polaroid-enlarge-mobile {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    z-index: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.5) rotate(0deg);
    z-index: 1000;
  }
}

.desk-item.polaroid.enlarged {
  animation: polaroid-enlarge 0.4s ease forwards;
  position: relative;
  z-index: 1000;
}

.desk-item.polaroid.enlarged svg {
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
  .desk-item.polaroid.enlarged {
    animation: polaroid-enlarge-mobile 0.4s ease forwards;
    position: fixed;
    left: 50%;
    top: 50%;
    transform-origin: center center;
  }
}

/* Polaroid color transitions */
.desk-item.polaroid svg rect:first-child {
  transition: fill 0.3s ease;
}

.desk-item.polaroid.color-yellow svg rect:first-child {
  fill: #ffd427;
}

.desk-item.polaroid.color-pink svg rect:first-child {
  fill: #ff7daf;
}

.desk-item.polaroid.color-green svg rect:first-child {
  fill: #5cdb6d;
}

.desk-item.polaroid.color-blue svg rect:first-child {
  fill: #57caff;
}

@keyframes sticky-flutter {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(8deg);
  }
}

.desk-item.sticky-note.clicked {
  animation: sticky-flutter 0.4s ease;
}

/* Sticky Note color transitions */
.desk-item.sticky-note svg rect {
  transition: fill 0.3s ease;
}

.desk-item.sticky-note.color-yellow svg rect {
  fill: #ffd427;
}

.desk-item.sticky-note.color-green svg rect {
  fill: #5cdb6d;
}

.desk-item.sticky-note.color-blue svg rect {
  fill: #57caff;
}

.desk-item.sticky-note.color-pink svg rect {
  fill: #ff7daf;
}

@keyframes pizza-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.desk-item.pizza.clicked {
  animation: pizza-spin 0.8s ease;
}

/* Countdown Clock flip effect */
@keyframes flip-number {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

@keyframes clock-glow {
  0%,
  100% {
    box-shadow: 0 0 0px rgba(66, 133, 244, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.6);
  }
}

.desk-item.countdown-clock.clicked .countdown-number {
  animation: flip-number 0.6s ease;
  transform-style: preserve-3d;
}

.desk-item.countdown-clock.clicked .clock-screen {
  animation: clock-glow 0.6s ease;
}

.desk-item svg {
  width: 100%;
  height: auto;
  max-width: 100px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Specific desk items */
.desk-item.keyboard {
  grid-column: span 3;
  max-width: none;
}

.desk-item.keyboard svg {
  max-width: none;
}

.desk-item.countdown-clock {
  grid-column: span 3;
  max-width: none;
}

.desk-item.polaroid {
  max-width: 70px;
}

.desk-item.sticky-note {
  max-width: 70px;
}

/* Countdown Clock */
.countdown-clock {
  position: relative;
}

.clock-display {
  background: linear-gradient(135deg, #202124 0%, #3c4043 100%);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  border: 2px solid #5f6368;
}

.clock-screen {
  background: #000;
  border-radius: 8px;
  padding: 12px;
}

#countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: 'Courier New', monospace;
}

.countdown-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown-number {
  font-size: 24px;
  font-weight: bold;
  color: #4285f4;
  text-shadow: 0 0 10px rgba(66, 133, 244, 0.8);
  min-width: 40px;
  text-align: center;
}

.countdown-separator {
  font-size: 24px;
  color: #4285f4;
  font-weight: bold;
  animation: blink 1s infinite;
}

.countdown-label {
  font-size: 10px;
  color: #bdc1c6;
  text-transform: uppercase;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.3;
  }
}

/* Hero Info (Foreground) */
.hero-info {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.hero-info h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 24px;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc04 75%, #ea4335 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #202124; /* Fallback for browsers that don't support background-clip: text */
}

.event-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.event-date {
  font-size: 20px;
  color: #5f6368;
  margin: 0;
}

.location-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4285f4;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.location-link:hover {
  color: #1a73e8;
  transform: translateX(4px);
}

.cta-button {
  display: inline-block;
  padding: 16px 48px;
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  border-radius: 28px;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: linear-gradient(135deg, #1a73e8 0%, #174ea6 100%);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.6);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0);
}

/* Responsive layout for hero section */
@media (max-width: 768px) {
  .hero {
    padding: 40px 20px 20px;
    min-height: auto;
  }

  .desk-scene {
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  .monitor-screen {
    padding: 12px;
    border: 4px solid #3c4043;
  }

  .monitor-power-button {
    bottom: 2px;
    right: 15px;
    width: 24px;
    height: 24px;
  }

  .power-led {
    width: 10px;
    height: 10px;
  }

  .monitor-stand::before {
    width: 200px;
    height: 20px;
    bottom: -20px;
  }

  .desk-surface {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px 12px;
  }

  .desk-item.keyboard {
    grid-column: span 3;
    max-width: none;
    justify-self: center;
    width: 100%;
  }

  .desk-item.keyboard svg {
    max-width: none;
    width: 100%;
  }

  .desk-item.countdown-clock {
    grid-column: span 3;
    max-width: none;
    justify-self: center;
    width: 100%;
  }

  .desk-item svg {
    max-width: 60px;
  }

  .countdown-number {
    font-size: 18px;
    min-width: 30px;
  }

  .countdown-separator {
    font-size: 18px;
  }

  .countdown-label {
    font-size: 8px;
  }

  .countdown-clock {
    width: 100%;
  }

  .clock-display {
    padding: 8px 12px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .clock-screen {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
  }

  #countdown-timer {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .hero-info h1 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .event-date {
    font-size: 16px;
  }

  .location-link {
    font-size: 14px;
  }

  .cta-button {
    padding: 12px 32px;
    font-size: 16px;
  }
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--md-sys-color-primary);
}

.event-meta {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.event-description {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-cta-link {
  text-decoration: none;
}

.hero-cta-link md-filled-button {
  --md-filled-button-container-height: 64px; /* Larger height */
  font-size: 20px; /* Larger font */
  width: 100%;
  max-width: 300px;
}

.hero-cta-link span {
  margin-left: 8px; /* Space between text and icon */
}

.hero-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Banner Carousel Styles */
.banner-carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 43.88%; /* 860/1960 = 0.4388 => 43.88% aspect ratio */
  overflow: hidden;
  border-radius: 16px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  min-width: 0;
  min-height: 0;
  flex-shrink: 0;
}

/* Force image visibility on all devices */
.banner-carousel img,
.carousel-slide img {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Carousel Navigation */

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-indicator.active,
.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
  .banner-carousel {
    max-width: 100%;
    margin: 0 auto;
  }

  .carousel-container {
    height: 0;
    padding-bottom: 43.88%; /* 手機版維持 1960*860 比例 */
    position: relative;
    overflow: hidden;
  }

  .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
  }

  .carousel-slide.active {
    opacity: 1;
  }

  .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
  }

  .carousel-indicators {
    bottom: 12px;
  }

  .carousel-indicator {
    width: 10px;
    height: 10px;
  }
}

/* Additional mobile adjustments for very small screens */
@media (max-width: 480px) {
  .carousel-container {
    padding-bottom: 43.88%; /* 維持 1960*860 比例 */
  }

  .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
  }
}

/* Content Section Styles */
.content-section {
  padding: 48px 0;
}

.content-section h2 {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px; /* Adjusted margin */
  color: var(--md-sys-color-primary);
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 32px auto;
  text-align: left; /* Changed from center to left */
  font-size: 18px;
  line-height: 1.7;
}

/* Schedule Tabs */
.schedule-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  gap: 16px;
}

.tab-button {
  padding: 12px 24px;
  font-size: 18px;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid #ccc;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--md-sys-color-on-surface);
}

.tab-button.active {
  border-bottom-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

/* Schedule Content */
.schedule-content {
  display: none;
}

.schedule-content.active {
  display: block;
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
}

.time-slot {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}

.time-slot:last-child {
  border-bottom: none;
}

.time {
  flex-basis: 120px;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  padding-top: 4px;
}

.sessions {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sessions.multi-track {
  flex-direction: row;
  gap: 24px;
}

.session {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  flex: 1;
  border-left: 4px solid var(--color-blue);
  transition: all 0.3s ease-out;
}

.sessions.multi-track .session {
  border-left-color: var(--color-green);
}

.sessions.multi-track .session:first-child {
  border-left-color: var(--color-blue);
}

.session.single-track {
  border-left-color: var(--color-yellow);
}

.session.keynote {
  border-left-color: var(--color-red);
  background-color: #f8d8d8; /* Pastel Red */
}

.session.break {
  background-color: #f0f0f0;
  border-left-color: #999;
}

/* 桌面版：為不同類型的休息時間添加特殊樣式 */
.session.break[data-break-type='registration'] {
  background: linear-gradient(135deg, var(--color-pastel-blue), #e3f2fd);
  border-left-color: var(--color-blue);
}

.session.break[data-break-type='lunch'] {
  background: linear-gradient(135deg, var(--color-pastel-yellow), #fff3e0);
  border-left-color: var(--color-yellow);
}

.session.break[data-break-type='networking'] {
  background: linear-gradient(135deg, var(--color-pastel-green), #e8f5e8);
  border-left-color: var(--color-green);
}

.session-info {
  /* No specific styles needed for now */
}

.session-track {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 8px;
}

.session-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

.session-title.clickable {
  cursor: pointer;
  text-decoration: underline;
  color: var(--md-sys-color-primary);
  transition: color 0.2s ease;
}

.session-title.clickable:hover {
  color: var(--color-blue);
  text-decoration: underline;
}

.session-tags-container {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-tag {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
}

/* Speakers Section - FINAL FIX using max-height */

/* Speakers Introduction Banner */
.speakers-intro-banner {
  background: rgba(255, 255, 255, 0.9);
  padding: 32px;
  border-radius: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.speakers-intro-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.speakers-intro-banner p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #1e1e1e;
  text-align: left;
  font-weight: 400;
}

.speakers-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.speaker-category-title {
  margin-top: 32px;
  margin-bottom: 16px;
}

.speaker-category-title:first-child {
  margin-top: 0;
}

.speaker-category-title h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-blue);
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-blue);
  text-align: center;
}

.speaker-category-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  align-items: start; /* 防止講者卡片被拉伸到相同高度 */
}

.speaker-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
}

.speaker-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.speaker-card:hover .speaker-expand-hint {
  color: var(--color-blue);
}

.speaker-photo {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square ratio */
  object-fit: cover;
  object-position: center; /* Center alignment for speakers */
}

.speaker-info {
  padding: 20px;
  min-height: 150px; /* Text area - 1 part of 2:1 ratio */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.speaker-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.speaker-org,
.speaker-title {
  font-size: 14px;
  margin: 0 0 4px 0;
  color: #5f6368;
}

.summary-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-tags span {
  background-color: var(--color-light-gray);
  color: var(--color-dark-gray);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px; /* Keep the margin for wrapping */
}

/* 查看更多提示 */
.speaker-expand-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  color: #5f6368;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
  background-color: #fafafa;
}

.expand-arrow {
  transition: transform 0.3s ease;
}

.speaker-card.expanded .expand-arrow {
  transform: rotate(180deg);
}

.speaker-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.speaker-card.expanded .speaker-details {
  max-height: 3000px; /* Increased to accommodate longer content in different languages */
}

.speaker-details-content {
  padding: 20px 20px 20px 20px;
  border-top: 1px solid #e0e0e0;
  margin: 0; /* Remove margin to align with summary padding */
}

.speaker-bio-full {
  font-size: 15px;
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 16px;
}

.session-info-block h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: var(--md-sys-color-primary);
}

.session-info-block p {
  margin: 0 0 8px 0;
}

.session-abstract {
  line-height: 1.6;
  margin-top: 8px;
}

.session-category-expanded {
  line-height: 1.6;
  margin-top: 8px;
  margin-bottom: 12px;
}

.speaker-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.speaker-tags span {
  background-color: var(--color-light-gray);
  color: var(--color-dark-gray);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* Sponsors Section */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.sponsor-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.sponsor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.sponsor-logo-container {
  aspect-ratio: 1 / 1; /* Square ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #f8f9fa;
}

.sponsor-logo {
  width: 100%; /* Scale by width */
  height: 100%;
  object-fit: cover;
  object-position: center; /* Center alignment for sponsors */
}

.sponsor-info {
  padding: 20px;
  min-height: 150px; /* Text area - 1 part of 2:1 ratio */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.sponsor-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.sponsor-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.sponsor-tags {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sponsor-tags span {
  background-color: var(--color-light-gray);
  color: var(--color-dark-gray);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.about-logo-container {
  aspect-ratio: 1 / 1; /* Square ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #f8f9fa;
}

.about-logo {
  width: 100%; /* Scale by width */
  height: 100%;
  object-fit: cover; /* Fill the container */
  object-position: center; /* Center alignment for booths */
}

.about-info {
  padding: 20px;
  min-height: 150px; /* Text area - 1 part of 2:1 ratio */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.about-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.about-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.about-info-new {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.about-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-on-surface);
}

.about-description-new {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

/* Tickets Section */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.ticket-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid #e0e0e0;
}

.ticket-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.ticket-info {
  flex-grow: 1;
}

.ticket-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--md-sys-color-primary);
}

.ticket-price {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.ticket-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px 0;
  color: #5f6368;
}

.ticket-button-link {
  text-decoration: none;
}

.ticket-button {
  width: 100%;
  --md-filled-button-container-height: 48px;
  font-size: 16px;
}

.subsection-title {
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--color-dark-gray);
}

.ticket-card.free {
  border-color: var(--color-green);
}

/* About Us Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.about-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.about-logo-container {
  aspect-ratio: 1 / 1; /* Square ratio */
  background-color: #f8f9fa;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-logo {
  width: 100%; /* Scale by width */
  height: 100%;
  object-fit: cover; /* Fill the container */
  object-position: center; /* Center alignment for about */
}

.about-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-on-surface);
}

.about-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
  flex-grow: 1;
}

.about-button-link {
  text-decoration: none;
  margin-top: auto; /* Pushes button to the bottom */
}

.about-button {
  width: 100%;
  --md-filled-button-container-height: 48px;
  font-size: 16px;
}

/* Responsive Navigation - Material 3 Expressive */
.mobile-menu-toggle {
  display: none; /* Hidden by default on wide screens */
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--md-sys-color-outline);
  cursor: pointer;
  padding: 12px;
  color: var(--md-sys-color-primary);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--md-sys-elevation-1);
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-halftone-blue), var(--color-halftone-green));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
  border-radius: 18px;
}

.mobile-menu-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--md-sys-elevation-3);
  border-color: var(--md-sys-color-primary);
}

.mobile-menu-toggle:hover::before {
  opacity: 0.15;
}

.mobile-menu-toggle:active {
  transform: translateY(0) scale(1.02);
  box-shadow: var(--md-sys-elevation-1);
}

.mobile-menu-toggle svg {
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-menu-toggle:hover svg {
  transform: rotate(90deg);
}

/* Mobile menu toggle animation when menu is open */
.mobile-menu-toggle.active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
  transform: scale(1.1);
}

.mobile-menu-toggle.active svg {
  transform: rotate(180deg);
}

/* Improved RWD: Add intermediate breakpoints for better layout control */
@media (max-width: 1200px) {
  /* Large tablets and small laptops - reduce nav link spacing */
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    padding: 10px 16px;
    font-size: 15px;
  }

  .nav-actions {
    gap: 12px;
  }

  .language-dropdown-trigger {
    min-width: 140px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .register-button {
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  /* Medium tablets - further reduce spacing and font sizes */
  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .language-dropdown-trigger {
    min-width: 120px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .register-button {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Ensure nav doesn't wrap by forcing flex-wrap: nowrap */
  nav {
    flex-wrap: nowrap;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }

  .nav-links::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
}

@media (max-width: 1100px) {
  /* Breakpoint for tablet and smaller - Material 3 Expressive */
  .nav-links {
    display: none; /* Hide the horizontal nav links */
    position: absolute;
    top: 80px; /* Position below the header */
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--md-sys-elevation-4);
    border: 2px solid var(--md-sys-color-outline-variant);
    border-radius: 24px;
    z-index: 1000; /* Ensure mobile menu appears above banner */
    gap: 8px;
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  }

  .nav-links.open {
    display: flex; /* Show the menu when it has the 'open' class */
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .nav-links a {
    padding: 16px 20px;
    width: 100%;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    border: 2px solid transparent;
  }

  .nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-halftone-blue), var(--color-halftone-green));
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
    border-radius: 18px;
  }

  .nav-links a:hover {
    box-shadow: var(--md-sys-elevation-2);
    border-color: var(--md-sys-color-primary);
  }

  .nav-links a:hover::before {
    opacity: 0.1;
  }

  .mobile-menu-toggle {
    display: flex; /* Show the hamburger button */
  }

  nav {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .nav-actions {
    order: 1; /* Move actions (logo, lang) to the right */
    gap: 12px;
  }

  /* Reset language dropdown and register button for mobile */
  .language-dropdown-trigger {
    min-width: 140px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .register-button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .mobile-menu-toggle {
    order: -1; /* Move hamburger to the left */
  }
}

/* === Page Switching System === */
/* Hide all page sections by default */
.page-section {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

/* Show only the active page section */
.page-section.active {
  display: block;
  opacity: 1;
}

/* Navigation active state styling */
.nav-link {
  transition: all 0.2s ease-in-out;
  position: relative;
}

.nav-link.active {
  color: var(--md-sys-color-primary);
  font-weight: 500;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: var(--md-sys-color-primary);
  border-radius: 1px;
}

/* Mobile navigation active state */
@media (max-width: 1100px) {
  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background-color: rgba(66, 133, 244, 0.1);
    border-radius: 8px;
  }
}

/* Smooth scrolling override for page switching (disable when switching pages) */
html.page-switching {
  scroll-behavior: auto;
}

/* Home-only content - only visible when home page is active */
.home-only {
  display: none;
}

/* Show home-only content when home page is active */
.page-section#home.active ~ .home-only {
  display: block;
}

/* Event Details Section (moved from schedule to home page) */
/* What is DevFest & S.TW Communities Gathering Section - Material 3 Expressive */
.what-is-section {
  background: transparent;
  padding: 80px 24px;
  position: relative;
}

/* 新的事件資訊Grid系統 - Material 3 Expressive */
.event-info-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.event-info-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 32px;
  padding: 2px;
  background: linear-gradient(45deg, #4285f4, #34a853, #f9ab00, #ea4335, #57caff, #5cdb6d, #ffd427, #ff7daf);
  -webkit-mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff);
  -webkit-mask-clip: content-box, border-box;
  -webkit-mask-composite: xor;
  mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff);
  mask-clip: content-box, border-box;
  mask-composite: subtract;
  z-index: -1;
}

.info-layer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

/* Material 3 Expressive 卡片類型 */
.info-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--md-sys-elevation-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccf6c5;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
  z-index: 0;
}

.info-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--md-sys-elevation-4);
}

/* 藍色類別卡片 hover 外框 */
.info-card:has(.info-title[data-i18n-key='about_event_title']):hover,
.info-card:has(.info-title[data-i18n-key='devfest_what_title']):hover,
.info-card:has(.info-title[data-i18n-key='stw_what_title']):hover {
  border-color: #4285f4;
}

/* 綠色類別卡片 hover 外框 */
.info-card:has(.info-title[data-i18n-key='devfest_section_title']):hover,
.info-card:has(.info-title[data-i18n-key='day1_theme_title']):hover,
.info-card:has(.info-title[data-i18n-key='day2_theme_title']):hover,
.info-card:has(.info-title[data-i18n-key='polaroid_fest_title']):hover,
.info-card:has(.info-title[data-i18n-key='pizza_time_title']):hover,
.info-card:has(.info-title[data-i18n-key='after_buffet_title']):hover {
  border-color: #34a853;
}

/* 黃色類別卡片 hover 外框 */
.info-card:has(.info-title[data-i18n-key='stw_section_title']):hover,
.info-card:has(.info-title[data-i18n-key='networking_title']):hover,
.info-card:has(.info-title[data-i18n-key='tech_market_title']):hover,
.info-card:has(.info-title[data-i18n-key='meeting_room_title']):hover,
.info-card:has(.info-title[data-i18n-key='food_drinks_title']):hover {
  border-color: #f9ab00;
}

/* 紅色類別卡片 hover 外框 */
.info-card:has(.info-title[data-i18n-key='event_tips_title']):hover,
.info-card:has(.info-title[data-i18n-key='transport_title']):hover,
.info-card:has(.info-title[data-i18n-key='eco_friendly_title']):hover,
.info-card:has(.info-title[data-i18n-key='code_conduct_title']):hover,
.info-card:has(.info-title[data-i18n-key='privacy_title']):hover {
  border-color: #ea4335;
}

.info-card:hover::before {
  opacity: 0.3;
}

.info-title,
.info-description {
  position: relative;
  z-index: 1;
}

.info-card-full {
  grid-column: span 2; /* 佔滿整行 */
  text-align: center; /* 全寬卡片內容置中 */
}

.info-card-half {
  grid-column: span 1; /* 佔一半 */
}

.info-card-third {
  grid-column: span 1; /* 佔三分之一 */
}

/* 三個項目的特殊層 - Material 3 Expressive */
.info-layer-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* 為三卡片層的每張卡片添加特殊背景色 */
/* === 特定卡片的背景色設定 === */

/* Blue category - #c3ecf6 */
/* 關於活動 */
.info-card:has(.info-title[data-i18n-key='about_event_title'])::before,
.info-layer:nth-child(1) .info-card::before {
  background-color: #c3ecf6;
}

/* DevFest 高雄場 是什麼？ */
.info-card:has(.info-title[data-i18n-key='devfest_what_title'])::before,
.info-layer:nth-child(2) .info-card:nth-child(1)::before {
  background-color: #c3ecf6;
}

/* 南臺灣技術社群大聚 是什麼？ */
.info-card:has(.info-title[data-i18n-key='stw_what_title'])::before,
.info-layer:nth-child(2) .info-card:nth-child(2)::before {
  background-color: #c3ecf6;
}

/* Green category - #ccf6c5 */
/* DevFest 2025 高雄場 */
.info-card:has(.info-title[data-i18n-key='devfest_section_title'])::before,
.info-layer:nth-child(3) .info-card::before {
  background-color: #ccf6c5;
}

/* 第一日議程主題：實作 (Implements) */
.info-card:has(.info-title[data-i18n-key='day1_theme_title'])::before,
.info-layer:nth-child(4) .info-card:nth-child(1)::before {
  background-color: #ccf6c5;
}

/* 第二日工作坊主題：第二屆 AI 生成大賽 */
.info-card:has(.info-title[data-i18n-key='day2_theme_title'])::before,
.info-layer:nth-child(4) .info-card:nth-child(2)::before {
  background-color: #ccf6c5;
}

/* 拍立得 Fest */
.info-card:has(.info-title[data-i18n-key='polaroid_fest_title'])::before,
.info-layer-three .info-card:nth-child(1)::before {
  background-color: #ccf6c5;
}

/* Pizza Time */
.info-card:has(.info-title[data-i18n-key='pizza_time_title'])::before,
.info-layer-three .info-card:nth-child(2)::before {
  background-color: #ccf6c5;
}

/* After Buffet */
.info-card:has(.info-title[data-i18n-key='after_buffet_title'])::before,
.info-layer-three .info-card:nth-child(3)::before {
  background-color: #ccf6c5;
}

/* Yellow category - #ffe7a5 */
/* 南臺灣技術社群大聚 */
.info-card:has(.info-title[data-i18n-key='stw_section_title'])::before,
.info-layer:nth-child(6) .info-card::before {
  background-color: #ffe7a5;
}

/* 眾多技術人的聊天交流或 Lightning Talk */
.info-card:has(.info-title[data-i18n-key='networking_title'])::before,
.info-layer:nth-child(7) .info-card:nth-child(1)::before {
  background-color: #ffe7a5;
}

/* 首次引入南臺灣的技術創作市集 */
.info-card:has(.info-title[data-i18n-key='tech_market_title'])::before,
.info-layer:nth-child(7) .info-card:nth-child(2)::before {
  background-color: #ffe7a5;
}

/* 主題討論會議室 */
.info-card:has(.info-title[data-i18n-key='meeting_room_title'])::before,
.info-layer:nth-child(8) .info-card:nth-child(1)::before {
  background-color: #ffe7a5;
}

/* 食物、點心、飲料 */
.info-card:has(.info-title[data-i18n-key='food_drinks_title'])::before,
.info-layer:nth-child(8) .info-card:nth-child(2)::before {
  background-color: #ffe7a5;
}

/* Pink category - #f8d8d8 */
/* 活動小撇步 */
.info-card:has(.info-title[data-i18n-key='event_tips_title'])::before,
.info-layer:nth-child(9) .info-card::before {
  background-color: #f8d8d8;
}

/* 離捷運站最近的場地 */
.info-card:has(.info-title[data-i18n-key='transport_title'])::before,
.info-layer:nth-child(10) .info-card:nth-child(1)::before {
  background-color: #f8d8d8;
}

/* 請記得自備容器 */
.info-card:has(.info-title[data-i18n-key='eco_friendly_title'])::before,
.info-layer:nth-child(10) .info-card:nth-child(2)::before {
  background-color: #f8d8d8;
}

/* GDG 活動行為準則 (Code of Conduct) */
.info-card:has(.info-title[data-i18n-key='code_conduct_title'])::before,
.info-layer:nth-child(11) .info-card:nth-child(1)::before {
  background-color: #f8d8d8;
}

/* 蒐集個人資料告知事項暨個人資料提供同意聲明 */
.info-card:has(.info-title[data-i18n-key='privacy_title'])::before,
.info-layer:nth-child(11) .info-card:nth-child(2)::before {
  background-color: #f8d8d8;
}

.info-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 第1層：關於活動 - 藍色 */
[data-i18n-key='about_event_title'] {
  color: #4285f4;
}

/* 第2層：DevFest、STW問題 - 藍色 */
[data-i18n-key='devfest_what_title'],
[data-i18n-key='stw_what_title'] {
  color: #4285f4;
}

/* 第3層：DevFest Kaohsiung - 綠色 */
[data-i18n-key='devfest_section_title'] {
  color: #34a853;
}

/* 第4層：主題 - 綠色 */
[data-i18n-key='day1_theme_title'],
[data-i18n-key='day2_theme_title'] {
  color: #34a853;
}

/* 第5層：三個項目 - 綠色 */
[data-i18n-key='polaroid_fest_title'],
[data-i18n-key='pizza_time_title'],
[data-i18n-key='after_buffet_title'] {
  color: #34a853;
}

/* 第6層：南臺灣技術社群大聚 - 黃色 */
[data-i18n-key='stw_section_title'] {
  color: #f9ab00;
}

/* 第7層：交流和市集 - 黃色 */
[data-i18n-key='networking_title'],
[data-i18n-key='tech_market_title'] {
  color: #f9ab00;
}

/* 第8層：會議室和食物 - 黃色 */
[data-i18n-key='meeting_room_title'],
[data-i18n-key='food_drinks_title'] {
  color: #f9ab00;
}

/* 第9層：活動小撇步 - 紅色 */
[data-i18n-key='event_tips_title'] {
  color: #ea4335;
}

/* 第10層：交通和環保 - 紅色 */
[data-i18n-key='transport_title'],
[data-i18n-key='eco_friendly_title'] {
  color: #ea4335;
}

/* 第11層：行為準則和隱私 - 紅色 */
[data-i18n-key='code_conduct_title'],
[data-i18n-key='privacy_title'] {
  color: #ea4335;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.info-description {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-weight: 400;
}

.what-is-list {
  margin: 0;
  padding-left: 20px;
}

.what-is-list li {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--md-sys-color-on-surface);
}

@media (max-width: 768px) {
  body {
    background-color: #f0f0f0;
  }

  main {
    padding: 24px 16px;
  }

  .what-is-section {
    padding: 48px 16px;
  }

  .event-info-grid {
    padding: 24px;
    gap: 24px;
    border-radius: 24px;
  }

  .info-layer {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-card {
    padding: 24px;
    border-radius: 20px;
  }

  .info-card-full {
    grid-column: span 1;
  }

  .info-card-half {
    grid-column: span 1;
  }

  .info-card-third {
    grid-column: span 1;
  }

  .info-layer-three {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .info-description {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero {
    padding: 32px 24px;
    border-radius: 24px;
    gap: 32px;
  }

  .market-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sponsors-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .sponsor-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* === Dynamic Content Styles === */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.market-booth-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
}

.market-booth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.market-booth-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.market-booth-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.market-booth-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-on-surface);
}

.market-booth-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

.market-booth-items {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

.about-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.about-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.about-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.about-content .about-description {
  margin-bottom: 16px;
  line-height: 1.6;
  color: var(--md-sys-color-on-surface-variant);
}

.about-items {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 16px;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.sponsor-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.sponsor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.sponsor-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.sponsor-image:hover {
  opacity: 0.8;
}

.sponsor-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sponsor-type {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--md-sys-color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sponsor-type.company {
  color: #1976d2;
}

.sponsor-type.individual {
  color: #388e3c;
}

.sponsor-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--md-sys-color-on-surface);
}

.sponsor-category {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-on-surface-variant);
}

.sponsor-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

.sponsor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.sponsor-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.sponsor-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--md-sys-color-on-surface);
}

.sponsor-category {
  font-size: 12px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 4px 8px;
  border-radius: 12px;
}

.sponsor-description {
  line-height: 1.6;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-link {
  padding: 6px 12px;
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.about-activities {
  margin: 16px 0;
}

.about-activities h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--md-sys-color-on-surface);
}

.about-activities ul {
  margin: 0;
  padding-left: 16px;
}

.about-activities li {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 4px;
}

/* === 議程內嵌講者資訊樣式 === */
.speaker-info-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px;
  background-color: var(--color-pastel-blue);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.speaker-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: center;
  background-color: white;
  border-radius: 50%;
}

.speaker-photo-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0;
  vertical-align: middle;
}

.speaker-details-inline {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.speaker-name-small {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dark-gray);
  margin: 0 0 2px 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speaker-org-small {
  font-size: 12px;
  color: #5f6368;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 議程可點擊狀態 */
.session:not(.break) {
  transition: all 0.2s ease;
}

.session:not(.break):hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.session:not(.break):hover .speaker-info-inline {
  background-color: var(--color-halftone-blue);
}

/* 講者卡片社群連結樣式 */
.speaker-info .social-links {
  margin-top: 12px;
  justify-content: flex-start;
}

.speaker-info .social-link {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
}

/* 講者卡片高亮效果 */
.speaker-card.highlighted {
  box-shadow: 0 8px 16px rgba(66, 133, 244, 0.3);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .speaker-info-inline {
    gap: 8px;
    padding: 6px;
  }

  .speaker-photo-small {
    width: 32px;
    height: 32px;
  }

  .speaker-name-small {
    font-size: 13px;
  }

  .speaker-org-small {
    font-size: 11px;
  }

  /* === 手機版議程優化：垂直時間軸 + 摺疊式設計 === */
  /* 時間軸容器改為垂直佈局 */
  .timeline {
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    position: relative;
  }

  /* 添加垂直時間軸線 */
  .timeline::before {
    content: '';
    position: absolute;
    left: 70px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
      to bottom,
      var(--color-blue),
      var(--color-green),
      var(--color-yellow),
      var(--color-red)
    );
    opacity: 0.3;
  }

  /* 時間槽改為垂直佈局 */
  .time-slot {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    position: relative;
    padding-left: 0;
  }

  /* 時間顯示優化 */
  .time-slot .time {
    position: absolute;
    left: 0;
    top: 16px;
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-blue);
    text-align: center;
    background: white;
    padding: 4px 2px;
    border-radius: 8px;
    border: 2px solid var(--color-pastel-blue);
    z-index: 2;
  }

  /* 時間點圓圈 */
  .time-slot .time::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-blue);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--color-blue);
  }

  /* 議程區域調整 */
  .sessions {
    margin-left: 80px;
    gap: 12px;
  }

  /* 多軌道改為單欄 */
  .sessions.multi-track {
    flex-direction: column;
    gap: 12px;
  }

  /* 議程卡片緊湊化 */
  .session {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    border-left-width: 3px;
    transition: all 0.3s ease;
    position: relative;
  }

  /* 摺疊狀態的議程卡片 */
  .session:not(.expanded) {
    cursor: pointer;
  }

  .session:not(.expanded) .session-expandable {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }

  /* 展開狀態的議程卡片 */
  .session.expanded {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
    transition: all 0.3s ease-out;
  }

  /* 議程標題優化 */
  .session-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .session.expanded .session-title {
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  /* 會場標籤優化 */
  .session-track {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--color-pastel-blue);
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 6px;
  }

  /* 講者資訊在手機版的調整 */
  .speaker-info-inline {
    margin-top: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
  }

  /* 展開/收合按鈕 */
  .session:not(.break):not(.expanded)::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 12px;
    color: var(--color-blue);
    opacity: 0.7;
    transition:
      transform 0.3s ease-out,
      opacity 0.2s ease-out;
  }

  .session.expanded::after {
    content: '▲';
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 12px;
    color: var(--color-blue);
    opacity: 1;
    transition:
      transform 0.3s ease-in,
      opacity 0.2s ease-in;
  }

  /* 休息時間使用統一卡片佈局 - 移除特殊的 margin-left，讓它跟其他議程一樣對齊 */
  .session.break {
    padding: 12px;
    border-radius: 12px;
    border-left-width: 3px;
    background: var(--color-light-gray);
    border-left-color: #999;
    margin-bottom: 12px;
  }

  .session.break .session-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
    text-align: center;
    font-weight: 500;
  }

  /* 為不同類型的休息時間添加特殊樣式 */
  .session.break[data-break-type='registration'] {
    background: linear-gradient(135deg, var(--color-pastel-blue), #e3f2fd);
    border-left-color: var(--color-blue);
  }

  .session.break[data-break-type='lunch'] {
    background: linear-gradient(135deg, var(--color-pastel-yellow), #fff3e0);
    border-left-color: var(--color-yellow);
  }

  .session.break[data-break-type='networking'] {
    background: linear-gradient(135deg, var(--color-pastel-green), #e8f5e8);
    border-left-color: var(--color-green);
  }

  /* 休息時間圖標 */
  .session.break .session-title::before {
    margin-right: 8px;
    font-size: 16px;
  }

  /* 單軌道議程調整 */
  .session.single-track:not(.break) {
    border-left-color: var(--color-yellow);
  }

  /* Keynote 特殊樣式 */
  .session.keynote {
    border-left-color: var(--color-red);
    background: var(--color-pastel-pink);
  }

  /* 多軌道議程的不同顏色 */
  .sessions.multi-track .session:nth-child(1) {
    border-left-color: var(--color-blue);
  }

  .sessions.multi-track .session:nth-child(2) {
    border-left-color: var(--color-green);
  }

  .sessions.multi-track .session:nth-child(3) {
    border-left-color: var(--color-yellow);
  }

  /* 可展開的詳細內容樣式 */
  .session-expandable {
    margin-top: 12px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.4s ease-out,
      opacity 0.3s ease-out,
      margin-top 0.3s ease-out;
  }

  .session.expanded .session-expandable {
    opacity: 1;
    max-height: 1000px;
    overflow-y: auto;
    transition:
      max-height 0.5s ease-in,
      opacity 0.4s ease-in,
      margin-top 0.3s ease-in;
  }

  .session-details-expanded {
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(66, 133, 244, 0.2);
    overflow: visible;
    height: auto;
  }

  .session-abstract,
  .session-category-expanded,
  .speaker-bio-short {
    margin-bottom: 12px;
  }

  .session-abstract strong,
  .session-category-expanded strong,
  .speaker-bio-short strong {
    display: block;
    color: var(--color-blue);
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .session-abstract p,
  .session-category-expanded p,
  .speaker-bio-short p {
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    margin: 0;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* 響應式調整：更小的手機 */
  @media (max-width: 480px) {
    .timeline {
      padding: 0 12px;
    }

    .timeline::before {
      left: 50px;
    }

    .time-slot .time {
      width: 45px;
      font-size: 10px;
      padding: 2px 1px;
    }

    .time-slot .time::after {
      right: -9px;
      width: 6px;
      height: 6px;
    }

    .sessions {
      margin-left: 60px;
    }

    .session.break {
      padding: 10px;
      border-radius: 10px;
    }

    .session {
      padding: 10px;
    }

    .session-title {
      font-size: 13px;
    }

    .session-track {
      font-size: 10px;
      padding: 1px 6px;
    }
  }
}

/* Community Section */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 32px auto 0;
}

.community-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.community-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.community-image:hover {
  opacity: 0.8;
}

.community-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.community-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--md-sys-color-on-surface);
}

.community-category {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-primary);
}

.community-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

/* Staff Section */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 32px auto 0;
}

.staff-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.staff-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.staff-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.staff-image:hover {
  opacity: 0.8;
}

.staff-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.staff-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--md-sys-color-on-surface);
}

.staff-org,
.staff-title-position {
  font-size: 14px;
  margin: 0 0 4px 0;
  color: #5f6368;
}

.staff-category {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: var(--md-sys-color-primary);
}

.staff-description {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-on-surface-variant);
}

/* 🔍 線索2：樣式也能藏秘密！看看這個神秘的類別... https://gdg-kaohsiung.kktix.cc/events/devfest2025*/
.treasure-hunt-clue-2::before {
  content: 'JLDTJXEBLA'; /* 第一日免費票 2（官網解謎活動）邀請碼隱藏在這裡 */
  display: none;
  /* 這個選擇器不會被任何HTML元素使用，純粹是為了解謎活動 */
}

/* 彩蛋：如果有人真的想看到這個內容... */
.reveal-secret:hover .treasure-hunt-clue-2::before {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 20px;
  border-radius: 8px;
  z-index: 9999;
  font-family: monospace;
  font-size: 24px;
}

/* ========================================
   圖片載入優化樣式
   Image Loading Optimization Styles
   ======================================== */

/* 圖片容器 */
.image-container {
  position: relative;
  overflow: hidden;
  background: var(--md-sys-color-surface-container-low);
  border-radius: inherit;
}

/* Placeholder 載入動畫 */
.image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--md-sys-color-surface-container) 0%,
    var(--md-sys-color-surface-container-high) 50%,
    var(--md-sys-color-surface-container) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 圖片淡入效果 */
.image-container img {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  position: relative;
  z-index: 2;
}

.image-container img.image-loaded {
  opacity: 1;
}

/* 圖片載入失敗樣式 */
.image-container[data-error='true'] {
  background: var(--md-sys-color-surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.image-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  z-index: 3;
}

.error-icon {
  font-size: 48px;
  opacity: 0.5;
}

.error-text {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  margin: 0;
}

.retry-button {
  padding: 8px 16px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--md-sys-elevation-1);
}

.retry-button:hover {
  background: var(--color-halftone-blue);
  box-shadow: var(--md-sys-elevation-2);
  transform: translateY(-1px);
}

.retry-button:active {
  transform: translateY(0);
  box-shadow: var(--md-sys-elevation-1);
}

/* 漸進式載入效果 */
.image-container[data-loading='true'] img {
  filter: blur(10px);
  transform: scale(1.1);
}

.image-container[data-loaded='true'] img {
  filter: blur(0);
  transform: scale(1);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 響應式調整 */
@media (max-width: 768px) {
  .image-container[data-error='true'] {
    min-height: 150px;
  }

  .error-icon {
    font-size: 36px;
  }

  .error-text {
    font-size: 12px;
  }

  .retry-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}
