/* NAB BANKO - Design System & Temaer */
:root {
  --banko-navy: #2D2A4A;
  --banko-navy-dark: #1e1b38;
  --banko-red: #A51D32;
  --banko-red-light: #c8233d;
  --banko-orange: #F7941D;
  --banko-gold: #d97706;
  --banko-tint: #F9EFEC;
  --banko-tint-strong: #F3E2DC;
  --banko-green: #166534;
  --banko-green-bg: #dcfce7;
  --banko-text: #2D2A4A;
  --banko-muted: #64748b;
  --banko-border: #e2e8f0;
  --banko-card-bg: #ffffff;
  --banko-bg: #f8fafc;
}

/* JULEBANKO TEMA OVERRIDE */
body.theme-xmas {
  --banko-navy: #143522;
  --banko-navy-dark: #0b2215;
  --banko-red: #b91c1c;
  --banko-orange: #d97706;
  --banko-tint: #fef2f2;
  --banko-tint-strong: #fee2e2;
  --banko-bg: #fdfbf7;
}

body.theme-xmas .banko-header {
  background: linear-gradient(135deg, #143522 0%, #0b2215 100%);
  border-bottom: 3px solid #b91c1c;
}

body.theme-xmas .badge-theme {
  background: #b91c1c !important;
}

/* SNE EFFEKT TIL JULEBANKO */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
body.theme-xmas .snowflakes {
  display: block;
}
.snowflake {
  position: absolute;
  top: -20px;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0.8;
  text-shadow: 0 0 4px rgba(0,0,0,0.2);
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0.2; }
}

/* GENERELL BANKO STYLING */
.banko-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px;
}

.banko-header {
  background: var(--banko-navy);
  color: #fff;
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(45, 42, 74, 0.12);
}

.banko-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--banko-orange);
  color: #fff;
}

.banko-grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 992px) {
  .banko-grid-main {
    grid-template-columns: 360px 1fr;
  }
}

.banko-box {
  background: var(--banko-card-bg);
  border: 1px solid var(--banko-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(45, 42, 74, 0.04);
}

/* KÆMPE SENESTE NUMMER DISPLAY */
.current-number-display {
  background: var(--banko-tint);
  border: 3px solid var(--banko-red);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(165, 29, 50, 0.12);
}
.current-number-display .number-giant {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--banko-navy);
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* FÆLLES 90-NUMMERS TAVLE */
.board-90-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  user-select: none;
}
.board-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.board-cell.drawn {
  background: var(--banko-red);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(165, 29, 50, 0.3);
}
.board-cell.latest {
  background: var(--banko-orange);
  color: #fff;
  transform: scale(1.08);
  font-weight: 900;
  box-shadow: 0 0 12px rgba(247, 148, 29, 0.6);
  z-index: 2;
}

/* 3x9 DANSK BANKOPLADE */
.bingo-card {
  background: #ffffff;
  border: 3px solid var(--banko-navy);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(45, 42, 74, 0.08);
  transition: transform 0.2s ease;
}
.bingo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--banko-border);
}
.bingo-matrix-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  background: var(--banko-navy);
  padding: 8px;
  border-radius: 10px;
}
.bingo-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 6px;
  background: #ffffff;
  color: var(--banko-navy);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, transform 0.15s ease;
}
.bingo-cell.empty {
  background: #e2e8f0;
  cursor: default;
  color: transparent;
}
.bingo-cell.marked {
  background: var(--banko-red);
  color: #ffffff;
  position: relative;
}
.bingo-cell.marked::after {
  content: "✓";
  position: absolute;
  font-size: 0.7rem;
  top: 2px;
  right: 4px;
  opacity: 0.85;
}
.bingo-card.has-win {
  border-color: #166534;
  box-shadow: 0 0 24px rgba(22, 101, 52, 0.35);
  animation: glowPulse 1.5s infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(22, 101, 52, 0.3); }
  50% { box-shadow: 0 0 28px rgba(22, 101, 52, 0.65); }
}

/* BANKOMETER PROGRESS BAR */
.bankometer-bar {
  background: #e2e8f0;
  border-radius: 999px;
  height: 22px;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.bankometer-fill {
  background: linear-gradient(90deg, var(--banko-orange) 0%, var(--banko-red) 100%);
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* BANKO WINNER MODAL */
.banko-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 74, 0.85);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.banko-modal-backdrop.active {
  display: flex;
}
.banko-modal-content {
  background: #fff;
  border-radius: 24px;
  max-width: 520px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: modalBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalBounce {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* RESPONSIVITET FOR MOBIL & TABLET */
@media (max-width: 640px) {
  .current-number-display .number-giant {
    font-size: 4rem;
  }
  .board-cell {
    font-size: 0.75rem;
    border-radius: 4px;
  }
  .bingo-cell {
    font-size: 0.95rem;
    border-radius: 4px;
  }
  .bingo-matrix-grid {
    gap: 3px;
    padding: 4px;
  }
}

/* ------------------------------------------------------------- */
/* MINIMALISTISK & LOGISK BANKOSAL DESIGN                        */
/* ------------------------------------------------------------- */
.salen-live-stage {
  background: #ffffff;
  border: 1px solid var(--banko-border);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(45, 42, 74, 0.05);
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 900px) {
  .salen-live-stage {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    padding: 18px 16px;
  }
}

/* Venstre: Fase & Præmie */
.stage-info-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-badge-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .stage-badge-row {
    justify-content: center;
  }
}

.stage-badge-row .banko-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
}

.badge-live-pulse {
  background: var(--banko-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-live-pulse::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulseDot 1.5s infinite;
}

.stage-prize-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
}

.stage-prize-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--banko-muted);
  letter-spacing: 0.04em;
  display: block;
}

.stage-prize-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--banko-navy);
  margin: 2px 0 2px;
  line-height: 1.3;
}

.stage-prize-sponsor {
  font-size: 0.8rem;
  color: var(--banko-muted);
  margin: 0;
}

/* Center: Det udtrukne nummer */
.stage-number-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 16px;
  border-left: 1px dashed var(--banko-border);
  border-right: 1px dashed var(--banko-border);
}

@media (max-width: 900px) {
  .stage-number-card {
    border-left: none;
    border-right: none;
    border-top: 1px dashed var(--banko-border);
    border-bottom: 1px dashed var(--banko-border);
    padding: 16px 0;
  }
}

.stage-number-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--banko-red);
}

.stage-number-giant {
  font-size: 5.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--banko-navy);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.recent-draws-bubbles {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 6px;
}

.bubble-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--banko-navy);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
}

.bubble-num.is-current {
  background: var(--banko-red);
  color: #fff;
  border-color: var(--banko-red);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(165, 29, 50, 0.3);
}

.stage-draw-progress {
  font-size: 0.82rem;
  color: var(--banko-muted);
}

/* Højre: Brugerstatus & handlinger */
.stage-actions-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .stage-actions-card {
    align-items: center;
  }
}

.stage-user-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px 14px;
}

.stage-user-status {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stage-user-email {
  display: block;
  font-size: 0.88rem;
  color: #14532d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Fanevælger (Tabs) */
.salen-view-switcher {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 4px;
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.view-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--banko-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.view-tab-btn:hover {
  color: var(--banko-navy);
  background: rgba(255, 255, 255, 0.6);
}

.view-tab-btn.active {
  background: #ffffff;
  color: var(--banko-navy);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(45, 42, 74, 0.06);
}

.tab-badge {
  background: var(--banko-navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.view-tab-btn.active .tab-badge {
  background: var(--banko-red);
}

/* Paneler */
.salen-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.salen-tab-pane.active {
  display: block;
}

/* Grid til spillerens plader */
.my-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 820px) {
  .my-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}
