:root {
  --bg: #090d16;
  --bg-panel: #0f172a;
  --bg-panel-raised: #15203b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --steel: #6366f1;
  --steel-bright: #818cf8;
  --accent-cyan: #06b6d4;
  --gold: #f59e0b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
  --pending: #f59e0b;
  --card-radius: 8px;
  --bkash-pink: #e2136e;
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-panel: #ffffff;
  --bg-panel-raised: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --steel: #4f46e5;
  --steel-bright: #6366f1;
  --accent-cyan: #0891b2;
  --gold: #d97706;
  --text: #0f172a;
  --text-muted: #64748b;
  --danger: #dc2626;
  --success: #059669;
  --pending: #d97706;
  --card-radius: 8px;
  --bkash-pink: #d11265;
}

:root[data-theme="light"] .shield-card,
:root[data-theme="light"] .game-chip {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--steel); color: var(--text); }

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: rgba(111, 151, 207, 0.08);
  color: var(--steel-bright);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: all 120ms ease;
  white-space: nowrap;
}
.lang-toggle-btn:hover {
  background: var(--steel);
  color: #fff;
  text-decoration: none;
  border-color: var(--steel);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
}

/* Enhanced Bangla typography support */
html[lang="bn"] body,
html[lang="bn"] button,
html[lang="bn"] input,
html[lang="bn"] textarea,
html[lang="bn"] select {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, 'SolaimanLipi', 'Kalpurush', sans-serif;
}

html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] h3,
html[lang="bn"] .brand-word {
  font-family: 'Hind Siliguri', 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1, h2, h3, .brand-word {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.02em;
  margin: 0 0 0.4em;
}

a { color: var(--steel-bright); text-decoration: none; transition: color 140ms ease; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---- nav ---- */
header.site-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background-color: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  backface-visibility: hidden;
  transition: background-color 200ms ease, border-color 200ms ease;
}
:root[data-theme="light"] header.site-nav {
  background-color: rgba(248, 250, 252, 0.92);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; max-width: 960px; margin: 0 auto;
  flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { height: 36px; width: auto; border-radius: 4px; transition: transform 220ms ease; }
.nav-brand:hover img { transform: scale(1.05); }
.nav-brand span { font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text); }

.menu-toggle {
  width: 38px; height: 38px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: all 180ms ease;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; transition: transform 180ms ease; }
.menu-toggle:hover { border-color: var(--steel-bright); background: var(--bg-panel-raised); }

.nav-menu {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  padding: 10px 0 14px;
  margin-top: 10px;
}
.nav-menu.open { display: flex; }
.nav-menu a {
  padding: 10px 6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 150ms ease, transform 150ms ease;
}
.nav-menu a:last-of-type { border-bottom: none; }
.nav-menu a:hover { color: var(--text); text-decoration: none; transform: translateX(3px); }
.nav-menu .theme-toggle {
  margin-top: 8px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  justify-content: flex-start;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
}

@media (min-width: 720px) {
  .nav-inner { flex-wrap: nowrap; }
  .menu-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    background: transparent;
    border-top: none;
    padding: 0;
    margin-top: 0;
  }
  .nav-menu a { padding: 4px 0; border-bottom: none; font-size: 0.92rem; }
  .nav-menu a:hover { transform: none; color: var(--text); }
  .nav-menu .theme-toggle { margin-top: 0; }
}

/* ---- hero ---- */
.hero {
  text-align: center;
  padding: 56px 20px 42px;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, rgba(9, 13, 22, 0) 70%), var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
:root[data-theme="light"] .hero {
  background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.08) 0%, rgba(248, 250, 252, 0) 70%), var(--bg);
}
.hero img.logo {
  height: 110px;
  margin-bottom: 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
  animation: logo-float 5s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  text-wrap: balance;
  margin-bottom: 6px;
  animation: fade-up 500ms ease-out both;
}
.hero .tagline {
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  animation: fade-up 500ms 100ms ease-out both;
}
.hero p.lede {
  max-width: 580px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: balance;
  animation: fade-up 500ms 180ms ease-out both;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--steel);
  background: var(--steel);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
  user-select: none;
}
.btn:hover {
  background: var(--steel-bright);
  border-color: var(--steel-bright);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -4px rgba(99, 102, 241, 0.45);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.outline { background: transparent; color: var(--steel-bright); border-color: var(--line-strong); }
.btn.outline:hover { background: rgba(99, 102, 241, 0.1); border-color: var(--steel-bright); }
.btn.small { padding: 6px 14px; font-size: 0.82rem; }

/* ---- sections ---- */
section { padding: 40px 0; }
section.alt { background: var(--bg-panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 1.5rem; letter-spacing: 0.02em; margin-bottom: 4px; }
.section-head p { color: var(--text-muted); margin: 0; font-size: 0.92rem; }

/* ---- tournament card ---- */
.shield-card {
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 200ms ease;
}
.shield-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.15);
}
.shield-card h3 { color: var(--text); font-size: 1.15rem; margin: 6px 0 10px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card-grid > * { animation: fade-up 450ms ease-out both; }
.card-grid > :nth-child(2) { animation-delay: 80ms; }
.card-grid > :nth-child(3) { animation-delay: 160ms; }
.card-grid > :nth-child(4) { animation-delay: 240ms; }

.meta-row {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  margin: 10px 0 14px;
  font-size: 0.86rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.meta-row strong { color: var(--text); font-variant-numeric: tabular-nums; }

.slots-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; margin: 10px 0 6px; }
:root[data-theme="light"] .slots-bar { background: #e2e8f0; }
.slots-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--steel), var(--accent-cyan));
  transform-origin: left center;
  animation: fill-bar 800ms ease-out both;
}
.slots-label { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  color: var(--steel-bright);
  background: rgba(99, 102, 241, 0.08);
  border-radius: 4px;
  margin-bottom: 8px;
  white-space: nowrap;
}
.tag.full { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.08); color: var(--danger); }
.tag.open { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.08); color: var(--success); }

/* ---- Segmented Filter Bar ---- */
.game-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.filter-btn {
  padding: 7px 14px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 160ms ease;
}
.filter-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.filter-btn.active {
  background: var(--steel);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ---- games strip ---- */
.games-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.game-chip {
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 20px 16px;
  text-align: center;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 200ms ease;
}
.game-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}
.game-chip .game-logo { height: 52px; width: auto; max-width: 100%; margin: 0 auto 10px; object-fit: contain; }
.game-chip .game-logo-light { display: none; }
.game-chip .game-logo-dark { display: block; }
:root[data-theme="light"] .game-chip .game-logo-light { display: block; }
:root[data-theme="light"] .game-chip .game-logo-dark { display: none; }
.game-chip .game-logo-fallback {
  display: none;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
}
.game-chip h4 { margin: 0; font-family: 'Oswald', sans-serif; font-size: 1.05rem; }

/* ---- Segmented Detail Tabs ---- */
.detail-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.detail-tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 160ms ease;
  margin-bottom: -1px;
}
.detail-tab-btn:hover { color: var(--text); }
.detail-tab-btn.active {
  color: var(--steel-bright);
  border-bottom-color: var(--steel-bright);
}

/* ---- Tournament Visual Brackets ---- */
.bracket-viewport {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 4px 24px;
}
.bracket-tree {
  display: flex;
  gap: 32px;
  min-width: 680px;
  align-items: stretch;
}
.bracket-round {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bracket-round-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel-bright);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.bracket-match-list {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: 16px;
}
.bracket-match {
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: border-color 160ms ease;
}
.bracket-match:hover { border-color: rgba(99, 102, 241, 0.4); }
.bracket-competitor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.bracket-competitor:last-child { border-bottom: none; }
.bracket-competitor.winner {
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
  color: var(--text);
}
.bracket-seed {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 18px;
  font-variant-numeric: tabular-nums;
}
.bracket-name { flex: 1; padding: 0 8px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.bracket-score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.82rem; }

/* ---- Streamlined bKash Payment Card ---- */
.bkash-pay-card {
  background: var(--bg-panel-raised);
  border: 1px solid rgba(226, 19, 110, 0.35);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 22px;
  position: relative;
  box-shadow: 0 6px 20px -6px rgba(226, 19, 110, 0.15);
}
.bkash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.bkash-badge {
  background: var(--bkash-pink);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.bkash-amount-due {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bkash-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}
.bkash-step-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.bkash-step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: rgba(226, 19, 110, 0.15);
  color: var(--bkash-pink);
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 50%;
  margin-right: 6px;
}
.bkash-number-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
}
.bkash-number-display {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  flex: 1;
}

/* ---- Mobile Bottom Navigation Bar ---- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}
:root[data-theme="light"] .mobile-bottom-nav {
  background: rgba(248, 250, 252, 0.94);
}
.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 150ms ease;
  min-width: 54px;
}
.mobile-nav-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.mobile-nav-link.active, .mobile-nav-link:hover {
  color: var(--steel-bright);
  text-decoration: none;
}

@media (max-width: 767px) {
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
}

/* ---- forms ---- */
form.stack { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); display: block; margin-bottom: 6px; }
input[type=text], input[type=password] {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input:focus {
  outline: none;
  border-color: var(--steel-bright);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.pay-box {
  background: var(--bg-panel-raised);
  border: 1px dashed var(--gold);
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}
.pay-box strong { color: var(--gold); }

.alert {
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  animation: fade-up 420ms ease-out both;
}
.alert.error { background: rgba(217, 117, 107, 0.15); border: 1px solid var(--danger); color: var(--danger); }
.alert.success { background: rgba(127, 184, 138, 0.15); border: 1px solid var(--success); color: var(--success); }

/* ---- status pills ---- */
.pill { font-size: 0.75rem; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.pill.pending { background: rgba(217, 185, 106, 0.15); color: var(--pending); }
.pill.confirmed { background: rgba(127, 184, 138, 0.15); color: var(--success); }
.pill.rejected { background: rgba(217, 117, 107, 0.15); color: var(--danger); }

/* ---- admin table & responsive styling ---- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-panel-raised);
  margin-bottom: 16px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 580px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(0,0,0,0.15); }
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.confirm { background: var(--success); border-color: var(--success); color: #fff; }
.btn.reject { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---- Admin Mobile UI Components ---- */
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.admin-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px;
  margin-bottom: 24px;
  position: sticky;
  top: 65px;
  z-index: 9;
  background: var(--bg);
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all 180ms ease;
}
.admin-tab-btn:hover, .admin-tab-btn.active {
  background: var(--steel);
  border-color: var(--steel-bright);
  color: #fff;
  text-decoration: none;
}
.admin-tab-btn .badge {
  background: var(--pending);
  color: #111;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.admin-section-box {
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 28px;
}
.admin-section-box h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.25rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Direct Image Upload Component ---- */
.img-upload-widget {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.img-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.img-upload-thumb {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.img-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.img-upload-thumb .placeholder-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
}
.img-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.img-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--steel);
  color: var(--steel-bright);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}
.img-upload-btn:hover {
  background: var(--steel);
  color: #fff;
}
.img-upload-clear {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 4px 6px;
}
.img-upload-clear:hover {
  text-decoration: underline;
}
.img-upload-manual-toggle {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
}
.img-upload-manual-toggle:hover {
  color: var(--steel-bright);
  text-decoration: underline;
}

.mobile-card-list {
  display: none;
}
.mobile-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--steel);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 12px;
}
.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.86rem;
}
.mobile-card-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mobile-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.mobile-card-actions > * {
  flex: 1;
}
.mobile-card-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .table-responsive {
    display: none; /* Hide wide desktop tables on mobile in favor of intuitive card view */
  }
  .mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  form.stack {
    max-width: 100% !important;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .shield-card {
    padding: 14px 16px;
  }
  .shield-card h3 {
    font-size: 1.4rem;
  }
  .actions-cell {
    width: 100%;
  }
  .admin-section-box {
    padding: 14px;
  }
  input[type=text], input[type=password], select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on mobile iOS/Android */
  }
  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-btn-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
  }
  .filter-btn-group .btn {
    padding: 8px 4px;
    font-size: 0.75rem;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- roster list ---- */
.roster { list-style: none; padding: 0; margin: 0; }
.roster li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.roster li:last-child { border-bottom: none; }

footer.site-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@keyframes page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nav-enter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fill-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-links { gap: 14px; font-size: 0.85rem; }
}

/* ==========================================================================
   ADMIN STAFF CHATROOM STYLES
   ========================================================================== */
.admin-chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-device-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 4px;
}

.chat-identity-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-uid-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
}

/* ==========================================================================
   GAME SORTING & REORDER STYLES
   ========================================================================== */
.game-order-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.game-order-card.dragging {
  opacity: 0.45;
  border-color: var(--steel-bright);
  transform: scale(0.99);
}

.game-order-card.drag-over-top {
  border-top: 3px solid var(--steel-bright);
}

.game-order-card.drag-over-bottom {
  border-bottom: 3px solid var(--steel-bright);
}

.game-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 4px 6px;
  user-select: none;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.game-drag-handle:hover {
  background: var(--bg-panel-raised);
  color: var(--text);
}

.game-drag-handle:active {
  cursor: grabbing;
}

.game-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
}

.game-order-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-order-btn {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.game-order-btn:hover:not(:disabled) {
  background: var(--bg-panel-raised);
  border-color: var(--steel-bright);
  color: var(--steel-bright);
}

.game-order-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.game-save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--success);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fade-up 0.2s ease-out;
}

/* ---- Ad & Sponsorship Banners ---- */
.ad-slot-wrapper {
  margin: 24px auto;
  max-width: 960px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ad-slot-wrapper.ad-slot-global_banner {
  margin: 0 auto;
  border-radius: 0;
  max-width: 100%;
}

.ad-slot-inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.ad-slot-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.65);
  color: #a0aec0;
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
  font-weight: 600;
  line-height: 1.2;
}

.ad-banner-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.ad-banner-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.ad-banner-link:hover .ad-banner-img {
  opacity: 0.92;
}

/* Admin Ad Slots UI */
.ad-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.ad-slot-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ad-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ad-slot-tag {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--bg-panel-raised);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--steel-bright);
}

.ad-preview-box {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 12px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.ad-preview-box img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 3px;
}

.ad-preview-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}


