/* === Cloudinary fonts === */
@font-face {
  font-family: "Prohibition";
  src: url("https://res.cloudinary.com/dufekxhkq/raw/upload/v1754975484/Prohibition-Regular_ikmxte.woff2")
    format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "AvertaSTD";
  src: url("https://res.cloudinary.com/dufekxhkq/raw/upload/v1754975484/AvertaStd-Regular_z8oywc.woff2")
    format("woff2");
  font-display: swap;
}

/* === Bakgrund === */
body {
  margin: 0;
  min-height: 100vh;
  background: url("https://res.cloudinary.com/dufekxhkq/image/upload/v1758874210/Ro%CC%88d_bakgrund_16x9_zmjth9.png")
    no-repeat center/cover;
  font-family: "AvertaSTD", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #fff;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}
* {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  body {
    background: url("https://res.cloudinary.com/dufekxhkq/image/upload/v1758874547/9x16_il2fgk.png")
      no-repeat center/cover;
  }
}

/* === Header / Banner === */
.brand {
  text-align: center;
  padding: 50px 12px 10px;
}
.brand .top-banner {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  margin: 0 auto 16px;
}
.brand h1 {
  margin: 0 0 6px;
  font-family: "Prohibition", Impact, sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: normal;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.brand p {
  margin: 0;
  opacity: 0.9;
  font-family: "AvertaSTD", sans-serif;
}

/* === Layout === */
.app {
  width: 100%;
  max-width: 700px; /* samma bredd för alla element */
  margin: 0 auto 40px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center; /* centrera allt i mitten */
}
/* === Search field === */
.search-wrap {
  width: 100%;
  max-width: 480px; /* 🔹 lagom bredd för både mobil & desktop */
  margin: 10px auto 22px;
}

#guessInput {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffffd9;
  color: #111;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  text-align: center;
  box-sizing: border-box;
}
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  margin: 0;
  padding: 6px;
  z-index: 20;
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 260px;
  width: 94%;
  overflow: auto;
}
.suggest.hidden {
  display: none;
}
.suggest li {
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.suggest li:hover,
.suggest li.active {
  background: #e2e2e3;
}

/* === Table === */
.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.board thead th {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
  padding: 10px 12px;
  text-align: center;
  border-radius: 10px;
  font-family: "AvertaSTD", sans-serif;
}
.board tbody td {
  padding: 12px;
  text-align: center;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.board tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
  text-align: left;
}
.board tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

/* === Cell färger === */
.cell.ok {
  background: linear-gradient(#129b69, #119162);
}
.cell.warn {
  background: linear-gradient(#f3c623, #d6b126);
  color: #222;
}
.cell.bad {
  background: linear-gradient(#c84646, #b83f3f);
}

/* === Flip animation === */
.cell {
  opacity: 0;
  transform: rotateX(90deg);
}
.cell.reveal {
  animation: flipIn 0.6s ease forwards;
}
@keyframes flipIn {
  0% {
    opacity: 0;
    transform: rotateX(90deg);
  }
  60% {
    opacity: 1;
    transform: rotateX(-8deg);
  }
  100% {
    opacity: 1;
    transform: rotateX(0);
  }
}
.cell.reveal {
  animation-delay: calc(var(--d, 0) * 0.35s);
}

/* === Hjälptext / Footer === */
.helper {
  text-align: center;
  opacity: 0.85;
  margin: 14px 0 0;
}
.foot {
  text-align: center;
  padding: 18px 0 32px;
  opacity: 0.7;
  font-size: 14px;
}

/* === Responsiv mobil === */
@media (max-width: 760px) {
  .board thead {
    display: none;
  }
  .board tbody td {
    display: block;
    text-align: left;
  }
  .board tbody tr td:first-child {
    border-radius: 12px 12px 0 0;
  }
  .board tbody tr td:last-child {
    border-radius: 0 0 12px 12px;
  }
  .board tbody tr {
    margin-bottom: 12px;
    display: block;
  }
}
/* 🔹 Se till att autosuggest alltid ligger över allt annat */
.suggest {
  position: absolute;
  z-index: 9999; /* högre än tabellen och resten av layouten */
}

.search-wrap {
  position: relative;
  z-index: 1000; /* för att dropdown placeras rätt i flödet */
}
/* === Mobiletiketter för tydligare visning === */
@media (max-width: 760px) {
  .board tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 0;
    position: relative;
  }

  /* Visa etikett (rubrik) före varje värde */
  .board tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #fff;
    opacity: 0.8;
  }

  /* Gör tabellen mer kompakt */
  .board tbody tr {
    display: block;
    background: rgba(0, 0, 0, 0.25);
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
  }

  /* Anpassa färger och spacing */
  .cell.ok,
  .cell.warn,
  .cell.bad {
    flex: 1;
    text-align: right;
  }
}
.timer {
  font-family: "AvertaSTD", sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
  color: #ffffff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}
.already-played {
  font-family: "AvertaSTD", sans-serif;
  font-size: 16px;
  color: #ffffff;
  margin-top: 6px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.8s ease;
  text-align: center;
}
.already-played.hidden {
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* === Modal för resultat === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  color: #000;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.modal-content h2 {
  color: #a00;
  font-family: "Prohibition", sans-serif;
  margin-bottom: 1rem;
}
.modal-content label {
  display: block;
  text-align: left;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.checkbox {
  margin-top: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.buttons {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
button.submit {
  background: #d10a10;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
button.cancel {
  background: #eee;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
/* === Topplista-popup === */
#topModal .modal-content {
  max-width: 360px;
  text-align: left;
}

#topModal ol {
  padding-left: 1.2em;
  margin: 0.5em 0 1em;
}

#topModal li {
  margin: 4px 0;
  font-size: 0.95em;
}

/* Marginal timer */
.brand p.timer {
  margin-bottom: 10px;
  margin-top: 20px;
}

/* Knapp för att öppna topplistan */
.open-top-btn {
  position: relative; /* inte längre fixed */
  display: block;
  margin: 40px auto 60px; /* lite luft ovan och nedan */
  background: #d10a10;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
  z-index: 0;
}

.open-top-btn:hover {
  background: #b00808;
  transform: scale(1.05);
}
/* === Spelläge-knappar (Dagens spel / Freeplay) === */
.mode-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-btn {
  font-family: "AvertaSTD", sans-serif; /* 🔹 så den använder samma font */
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08); /* 🔹 mer nedtonad bakgrund */

  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mode-btn.active {
  background: #d10a10;
  border-color: #d10a10;
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

#newFreeBtn {
  display: block;
  margin: 1.5rem auto 0;
  font-family: "AvertaSTD", sans-serif; /* 🔹 så den använder samma font */
  font-weight: 700;
  font-size: 14px;
}
.list-btn {
  font-family: "AvertaStd", sans-serif;
  background: #222;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin: 3px;
  transition: background 0.2s ease;
}
.list-btn.active {
  background: #d10a10;
}
#listSelector {
  margin-top: 10px;
}

#listSelector {
  display: none; /* döljs som standard via JS */
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
}

/* === Liga-knappar (SHL / SDHL / SHL & SDHL) === */
.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.mode-buttons button {
  font-family: "AvertaSTD", sans-serif;
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-buttons button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mode-buttons button.active {
  background: #d10a10;
  border-color: #d10a10;
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}
.plus-one {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-family: "Prohibition", "AvertaSTD", sans-serif;
  font-weight: 800;
  font-size: 80px;
  color: #ffcb00;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 40px #d10a10;
  opacity: 0;
  pointer-events: none;
  animation: plusOneBig 1s ease-out forwards;
  z-index: 9999;
}

@keyframes plusOneBig {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.4);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1.4);
  }
}
.plus-one {
  animation: plusOneBig 1.2s ease-out forwards;
}

@keyframes plusOneBig {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.4);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1.4);
  }
}
/* 🔥 Freeplay streak animationer */
@keyframes streakPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1.6);
  }
}

@keyframes streakPulse {
  0% {
    transform: translate(-50%, -45%) scale(1);
    filter: drop-shadow(0 0 10px #ffcb00);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -45%) scale(1.2);
    filter: drop-shadow(0 0 25px #ffcb00);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -45%) scale(1);
    filter: drop-shadow(0 0 10px #ffcb00);
    opacity: 1;
  }
}

.streak-popup {
  animation: streakPulse 1.4s ease-in-out infinite;
}

.streak-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-size: 140px;
  opacity: 0;
  animation: streakPop 1.5s ease-out forwards,
    streakPulse 1s ease-in-out 0.3s infinite alternate;
  z-index: 9999;
  text-shadow: 0 0 25px rgba(255, 203, 0, 0.8), 0 0 50px rgba(255, 80, 0, 0.6);
  pointer-events: none;
  text-align: center;
  color: #fff;
}

.streak-label {
  font-size: 32px;
  font-weight: bold;
  margin-top: 0.2em;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
  animation: fadeUp 1.2s ease-out forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  30% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}
/* 🟡 Namnkolumnen har alltid gul bakgrund */
.cell.name-fixed {
  background: linear-gradient(#9d9d9c, #bebcb5);
  color: #ffffff;
}

/* 🌟 Pulserande effekt på rätt rad */
@keyframes correctGlow {
  0% {
    box-shadow: 0 0 0 rgba(0, 255, 0, 0);
    filter: brightness(1);
  }
  40% {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
    filter: brightness(1.2);
  }
  100% {
    box-shadow: 0 0 0 rgba(0, 255, 0, 0);
    filter: brightness(1);
  }
}

tr.correct-row td.ok {
  animation: correctGlow 1.4s ease-in-out;
}

.daily-count {
  text-align: center;
  font-size: 15px;
  opacity: 0.85;
  margin-top: 10px;
  margin-bottom: 60px;
  font-family: "AvertaSTD", sans-serif;
}
.lhf-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}
.simple-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(162, 8, 8, 0.85);
  padding: 10px 0;
  opacity: 80%;
  text-align: center;
  z-index: 999999;
}

.simple-nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 16px;
  font-family: "AvertaSTD", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
}

.simple-nav a:hover {
  color: #ffcb00;
}

#toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #d10a10; /* Luleå Hockey-röd */
  color: #fff;
  padding: 18px 30px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: "Prohibition", sans-serif;
  display: none;
  z-index: 9999;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

/* === Fixa bakgrundskanten och oönskad scroll === */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* hindrar horisontell scroll */
  background-color: #7a0000; /* matchar bakgrundsbilden */
}

body {
  position: relative;
  overflow-y: auto; /* tillåt normal scroll men inget extra tomrum */
}

/* Säkerställ att overlayn inte påverkar höjden */
body::before {
  content: "";
  position: fixed; /* ändra från absolute → fixed */
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
  pointer-events: none;
}

/* === Navigationsfält – ska INTE följa med scroll === */
.simple-nav {
  position: relative; /* ändra från fixed → relative */
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(162, 8, 8, 0.85);
  padding: 10px 0;
  text-align: center;
  z-index: 10;
}

/* Om du ändå vill att den ska sitta fast högst upp men inte skymma något */
@supports (position: sticky) {
  .simple-nav {
    position: sticky;
  }
}

/* === Fixa "tom rullning" på mobiler (iPhone etc) === */
@supports (padding: max(0px)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* === 2️⃣ Spelarboxar i Top 25 (4 i rad, markerad aktiv) === */
#top25Players {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px auto 20px;
  max-width: 600px;
}

.top25-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 90px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: "AvertaSTD", sans-serif;
  text-align: center;
  transition: all 0.25s ease-in-out;
  font-size: 14px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.top25-player.active {
  background: #ffcb00;
  color: #000;
  border-color: #ffcb00;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 203, 0, 0.6);
}

.top25-player .name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.top25-player .lives {
  font-size: 16px;
  margin-bottom: 2px;
}

.top25-player .time {
  font-size: 12px;
  opacity: 0.85;
}

/* === 🎯 Top 25 – centrering, layout och responsivitet === */

/* 📱 Grundlayout (mobil först) */
#rows.top25-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  justify-content: center; /* 🔹 centrera hela griden horisontellt */
  justify-items: center; /* 🔹 centrera rutorna i varje cell */
  align-items: stretch;
  width: 100%;
  max-width: 480px; /* 🔹 samma bredd som inputfältet */
  margin: 0 auto 40px;
  padding: 0 10px;
  box-sizing: border-box;
}

/* 🔹 Enskilda rutor */
.top25-cell {
  width: 100%;
  aspect-ratio: 1.6 / 1; /* 🔹 bredare än hög för knappkänsla */
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-family: "AvertaSTD", sans-serif;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  padding: 3px;
}

.top25-cell:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 🟩 Rätt svar */
.top25-cell.revealed {
  background: #0a0;
  border-color: #0f0;
  color: #fff;
  transform: scale(1.03);
}

/* 💻 Större skärmar – justera kolumner snyggt */
@media (min-width: 600px) {
  #rows.top25-grid {
    max-width: 700px;
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 900px) {
  #rows.top25-grid {
    max-width: 850px;
    grid-template-columns: repeat(6, 1fr);
  }
}

/* === 🧹 Dölj rubriker i Top 25-läget === */
.top25-active #headerRow {
  display: none;
}

/* === 🧹 Dölj standardrubriker och hjälpelement === */
.top25-active header h1,
.top25-active header p:nth-of-type(1),
.top25-active .helper,
.top25-active .daily-count {
  display: none !important;
}

/* === 🎯 Titel och rubrikstil i Top 25 === */
#top25Hud h3 {
  text-align: center;
  color: #fff;
  font-family: "Prohibition", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin: 25px auto 15px;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* === Extra rubriker (visas bara i Top 25) === */
#top25ExtraTitle,
#top25ExtraDesc {
  display: none;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

#top25ExtraTitle {
  font-family: "Prohibition", sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: normal;
  margin-top: 20px;
  margin-bottom: 4px;
}

#top25ExtraDesc {
  font-family: "AvertaSTD", sans-serif;
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 18px;
}

.top25-active #top25ExtraTitle,
.top25-active #top25ExtraDesc {
  display: block;
}

/* === 🔴 Flash & Shake-effekter === */
.flash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(200, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9999;
}
.flash-overlay.active {
  opacity: 1;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-12px);
  }
  40%,
  80% {
    transform: translateX(12px);
  }
}
.shake {
  animation: shake 0.4s ease;
}

/* === 🎰 Kategori-spinn (snurr-effekt) === */
.category-spin {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: "Prohibition", sans-serif;
}

.spin-box {
  background: linear-gradient(180deg, #111, #222);
  padding: 30px 60px;
  border: 3px solid #ffcb00;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 203, 0, 0.3);
}

#spinText {
  font-size: 28px;
  color: #fff;
  animation: flicker 0.1s infinite alternate;
}

#spinText.spin-final {
  animation: popIn 0.7s ease forwards;
  color: #ffcb00;
  text-shadow: 0 0 20px #ffcb00;
}

/* 🔁 Animationer */
@keyframes flicker {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* === 🏆 Vinstmodal === */
#winModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
#winModal.hidden {
  display: none;
}

.win-box {
  background: linear-gradient(180deg, #111, #222);
  border: 3px solid #ffcb00;
  border-radius: 16px;
  padding: 2rem 1.6rem;
  text-align: center;
  max-width: 340px;
  color: #fff;
  font-family: "AvertaSTD", sans-serif;
  box-shadow: 0 0 40px rgba(255, 203, 0, 0.3);
  animation: popIn 0.6s ease;
}
.win-box h2 {
  font-family: "Prohibition", sans-serif;
  font-size: 1.6rem;
  color: #ffcb00;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(255, 203, 0, 0.7);
}
.win-box .buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
}
.win-box button {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
  font-family: "AvertaSTD", sans-serif;
}
.continue-btn {
  background: #333;
  color: #fff;
}
.continue-btn:hover {
  background: #555;
}
.show-answers-btn {
  background: #ffcb00;
  color: #000;
}
.show-answers-btn:hover {
  background: #ffd633;
}

.top25-category-select {
  text-align: center;
  color: #fff;
  font-family: "AvertaSTD", sans-serif;
  margin-bottom: 20px;
}

.spin-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease forwards;
}

.spin-result-box {
  background: #111;
  padding: 24px 28px;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  border: 2px solid #ffcb00;
  box-shadow: 0 0 20px rgba(255, 203, 0, 0.3);
}

.spin-result-box h2 {
  font-family: "Prohibition", sans-serif;
  font-size: 28px;
  color: #ffcb00;
  margin-bottom: 20px;
}

.spin-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.spin-buttons .list-btn {
  background: #222;
  color: #fff;
  border: 1px solid #ffcb00;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0s ease;
}

.spin-buttons .list-btn:hover {
  background: #ffcb00;
  color: #000;
}

#categoryDropdown {
  margin-top: 14px;
}

#categoryDropdown select {
  background: #000;
  color: #fff;
  border: 1px solid #ffcb00;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: "AvertaSTD", sans-serif;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

#categoryDropdown select:hover {
  background: #111;
}

#categoryDropdown .list-btn.small {
  padding: 6px 14px;
  font-size: 13px;
  margin-left: 8px;
}

.hidden {
  display: none !important;
}
