/* ============================================================
   FUNTASIA 2026 — Main Stylesheet
   Theme: Cappuccino (warm espresso tones, sharp-edged boxes)
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  /* Cappuccino palette */
  --espresso:    #1a0f0a;
  --dark-roast:  #2c1810;
  --roast:       #3d2314;
  --mocha:       #5c3317;
  --caramel:     #8b5e3c;
  --latte:       #c89b6e;
  --cream:       #e8d5b7;
  --foam:        #f5ece0;
  --milk:        #fdf8f2;

  /* Accent / highlight */
  --gold:        #d4a843;
  --gold-light:  #f0c96a;
  --rust:        #c0522a;

  /* Utility */
  --shadow-dark: rgba(26, 15, 10, 0.6);
  --shadow-med:  rgba(26, 15, 10, 0.3);
  --border:      rgba(200, 155, 110, 0.25);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --gap: 1.5rem;
  --radius: 0px; /* Sharp edges */
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-roast); }
::-webkit-scrollbar-thumb { background: var(--caramel); }

/* ── Material Symbols base ── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1.25em;        /* inherits surrounding font size */
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  /* Default symbol settings: outlined, normal weight */
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--espresso);
  color: var(--cream);
  min-height: 100vh;
  line-height: 1.6;

  /* Subtle coffee-grain texture overlay */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(92, 51, 23, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(61, 35, 20, 0.4) 0%, transparent 50%);
}

/* ============================================================
   ADMIN BUTTON
   ============================================================ */
.admin-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  background: var(--dark-roast);
  color: var(--latte);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.admin-btn:hover {
  background: var(--caramel);
  color: var(--espresso);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.35);
}

.admin-btn .material-symbols-outlined {
  font-size: 1rem;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(
    160deg,
    var(--dark-roast) 0%,
    var(--espresso) 40%,
    var(--roast) 100%
  );
  border-bottom: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Decorative angled accent line */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 40px,
    rgba(200, 155, 110, 0.03) 40px,
    rgba(200, 155, 110, 0.03) 41px
  );
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--mocha);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 0.7s ease both;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: fadeSlideDown 0.8s ease 0.1s both;
}

.hero-title-main {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 10rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--latte) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 4px 24px rgba(212, 168, 67, 0.25));
}

.hero-title-year {
  font-family: var(--font-body);
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--caramel);
  margin-top: 0.4rem;
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--cream);
  opacity: 0.85;
  max-width: 480px;
  animation: fadeSlideDown 0.8s ease 0.2s both;
}

.hero-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.8rem auto;
  animation: fadeSlideDown 0.8s ease 0.3s both;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--latte);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  animation: fadeSlideDown 0.8s ease 0.4s both;
}

.hero-tagline-icon {
  font-size: 1.3rem;
  color: var(--gold);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--foam);
  margin-bottom: 1.2rem;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.section-title-icon {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold);
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
}

/* ============================================================
   BOOTH INFO SECTION
   ============================================================ */
.booth-info {
  background: var(--dark-roast);
  border-bottom: 1px solid var(--border);
}

.booth-description {
  font-size: 1.05rem;
  color: var(--cream);
  opacity: 0.9;
  max-width: 640px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.booth-description strong {
  color: var(--gold-light);
}

/* Feature cards grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; /* Creates border-like gaps */
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--espresso);
  padding: 1.8rem 1.5rem;
  transition: background 0.2s;
}

.feature-card:hover {
  background: var(--roast);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--gold);
}

.feature-icon .material-symbols-outlined {
  font-size: 2rem;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 40;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--cream);
  opacity: 0.8;
  line-height: 1.65;
}

/* ============================================================
   QUEUE SECTION
   ============================================================ */
.queue-section {
  background: var(--espresso);
}

.queue-intro {
  font-size: 1rem;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.7;
}

/* Queue Form Card */
.queue-form-card {
  background: var(--dark-roast);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

/* Top accent bar */
.queue-form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rust), var(--gold), var(--caramel));
}

.form-header {
  margin-bottom: 1.5rem;
}

.form-step {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--caramel);
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--foam);
  margin-top: 0.3rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--latte);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--espresso);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foam);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--caramel);
  opacity: 0.6;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Join Button */
.join-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--rust) 0%, var(--gold) 100%);
  color: var(--espresso);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.join-btn-icon {
  font-size: 1.2rem;
  transition: transform 0.2s;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

.join-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.join-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(212, 168, 67, 0.35);
  transform: translateY(-1px);
}

.join-btn:hover::after {
  opacity: 1;
}

.join-btn:active {
  transform: translateY(0);
}

.join-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#joinBtnIcon {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.join-btn:hover .join-btn-icon {
  transform: translateX(4px);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--caramel);
  opacity: 0.85;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.form-note-icon {
  font-size: 1rem;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* ── Success Card ── */
.success-card {
  background: var(--dark-roast);
  border: 1px solid var(--gold);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.4s ease;
}

.success-card.hidden { display: none; }

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.success-icon .material-symbols-outlined {
  font-size: 3.5rem;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.success-msg {
  font-size: 0.95rem;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.rejoin-btn {
  padding: 0.6rem 1.4rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.rejoin-btn:hover {
  background: var(--gold);
  color: var(--espresso);
}

/* ── Live Queue Display ── */
.live-queue-wrapper {
  background: var(--dark-roast);
  border: 1px solid var(--border);
}

.live-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.live-queue-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--latte);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Red pulsing live dot */
.live-dot {
  font-size: 0.65rem;
  color: #e54040;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.refresh-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--caramel);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.refresh-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.refresh-icon {
  font-size: 1rem;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  transition: transform 0.3s;
}

.queue {
  padding: 1rem 1.5rem;
  max-height: 260px;
  overflow-y: auto;
}

.queue-empty {
  font-size: 0.9rem;
  color: var(--caramel);
  opacity: 0.7;
  text-align: center;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.queue-empty-icon {
  font-size: 1.1rem;
  color: var(--gold);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  margin-bottom: 0.4rem;
  background: var(--espresso);
  border-left: 3px solid var(--caramel);
  font-size: 0.95rem;
  color: var(--cream);
  transition: border-color 0.2s;
}

.queue-item:hover {
  border-left-color: var(--gold);
}

.queue-item:last-child {
  margin-bottom: 0;
}

.queue-num {
  font-weight: 700;
  color: var(--gold);
  min-width: 1.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark-roast);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--caramel);
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.footer-icon {
  font-size: 1rem;
  color: var(--latte);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.footer-text strong {
  color: var(--latte);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinning {
  display: inline-block;
  animation: spin 0.6s linear infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hero {
    padding: 5rem 1.2rem 3rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .queue-form-card {
    padding: 1.5rem 1.2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .admin-btn {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }
}