/* ══════════════════════════════════════════
   layout.css — Topbar, nav, content area
   ══════════════════════════════════════════ */

/* ── App shell ── */
#app { display: none; }

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}

.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-logo {
  height: 32px;
  width: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
}

.topbar-theme-btn {
  font-size: 1rem;
  background: none;
  border: 1px solid var(--surface3);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  line-height: 1;
}

.topbar-theme-btn:hover {
  border-color: var(--gold-dim);
  transform: rotate(20deg);
}

.btn-logout {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid var(--surface3);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ── Navigation ── */
.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 60px; /* default; JS sets to 96px when ticker is visible */
  z-index: 99;
  height: 48px;
  box-sizing: border-box;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

@media (max-width: 600px) {
  .nav-inner {
    justify-content: flex-start;
    gap: 0;
    padding: 0 0.4rem;
  }
  .nav-btn {
    font-size: 0.72rem;
    padding: 0.5rem 0.7rem 0.6rem;
    letter-spacing: 0.04em;
  }
}

.nav::-webkit-scrollbar { display: none; }

.nav-btn {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0.4rem 1.2rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn:hover  { color: var(--text); }
.nav-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── Content ── */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.15rem 1.2rem 4rem;
}

@media (max-width: 600px) {
  .content {
    padding: 0.1rem 0.8rem 4rem;
  }
}

.tab-content         { display: none; }
.tab-content.active  { display: block; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

/* ── Video Modal ── */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.93);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.video-modal.open { display: flex; }

.video-wrapper { width: 100%; max-width: 900px; }

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.video-title-modal {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-embed iframe { width: 100%; height: 100%; border: none; }

/* ── Video error overlay (e.g. Error 153 embed block) ── */
.vb-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.vb-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.vb-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 5;
  border-radius: var(--radius-md);
}

.vb-error-icon { font-size: 2.2rem; }

.vb-error-msg {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 0 1rem;
}

.vb-error-btn {
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}
.vb-error-btn:hover { opacity: 0.85; }

/* ── Responsive ── */
@media (min-width: 700px) {
  .content { padding: 0.15rem 2rem 4rem; }
}


/* ══════════════════════════════════════════
   Announcement Ticker Bar
   ══════════════════════════════════════════ */

.ticker-bar {
  background: var(--gold);
  color: #000;
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: 60px;
  z-index: 98;
}

.ticker-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
  padding: 0 1.2rem;
  box-sizing: border-box;
}

.ticker-label {
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.9rem 0 0;
  font-size: 0.9rem;
  border-right: 1px solid rgba(0,0,0,0.15);
  margin-right: 0.9rem;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #000;
  animation: ticker-scroll 28s linear infinite;
}



@keyframes ticker-scroll {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}


/* ══════════════════════════════════════════
   Home Grid — Match + RSVP side by side
   ══════════════════════════════════════════ */

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  align-items: stretch;
}

.home-grid .match-card,
.home-grid .rsvp-card {
  margin: 0;
  box-sizing: border-box;
}

/* RSVP card scrollable list */
.home-grid .rsvp-card {
  display: flex;
  flex-direction: column;
}

.home-grid .rsvp-card .rsvp-list {
  overflow-y: auto;
  max-height: 220px;
}

/* Side by side on wider screens */
@media (min-width: 700px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .home-grid .match-card,
  .home-grid .rsvp-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    height: 370px;          /* fixed height — never grows */
    box-sizing: border-box;
    overflow: hidden;
  }

  .home-grid .rsvp-card .rsvp-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) transparent;
  }
}


/* ══════════════════════════════════════════
   Topbar extras — greeting + icon buttons
   ══════════════════════════════════════════ */

.topbar-greeting {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.topbar-icon-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  line-height: 1;
}

.topbar-icon-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
}

/* ══════════════════════════════════════════
   Login page — lang + theme buttons
   ══════════════════════════════════════════ */

.login-actions-top {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.login-pref-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 90px;
  text-align: center;
}

.login-pref-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
  transform: translateY(-1px);
}

.login-pref-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.login-pref-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.login-pref-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════
   RSVP filter buttons
   ══════════════════════════════════════════ */

.rsvp-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.8rem;
}

.rsvp-filter {
  flex: 1;
  justify-content: center;
}

.rsvp-filter {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.rsvp-filter:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}

.rsvp-filter.active {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

.filter-count {
  background: var(--surface3);
  border-radius: 999px;
  padding: 0 0.45rem;
  font-size: 0.68rem;
  min-width: 18px;
  text-align: center;
}

.rsvp-filter.active .filter-count {
  background: rgba(201,168,76,0.2);
}
