/* Guttas – mørk festdesign med drum and bass-preg. Mobil først. */
@font-face { font-family: "Anton"; src: url("/static/fonts/anton-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("/static/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("/static/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #07060d; --bg2: #0e0c18; --kort: #13101f; --kant: #ffffff17; --tekst: #f2f0ff; --dempet: #9a96b5;
  --cyan: #00f0ff; --magenta: #ff2bd6; --syre: #c6ff00; --rod: #ff4d6d;
  --glod-c: 0 0 18px #00f0ff88, 0 0 2px #00f0ff; --glod-m: 0 0 18px #ff2bd688, 0 0 2px #ff2bd6;
  --r: 18px; --vis: "Anton", "Impact", "Arial Narrow", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tekst); }
body { font: 500 16px/1.45 "Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100dvh; overflow-x: hidden; }
body::before { /* lysstriper i bakgrunnen */
  content: ""; position: fixed; inset: -20% -10% auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 20% 30%, #ff2bd633, transparent 70%), radial-gradient(50% 45% at 85% 10%, #00f0ff2e, transparent 70%);
  filter: blur(10px);
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan); }
img { display: block; max-width: 100%; }
.skjult { display: none !important; }
.dempet { color: var(--dempet); }

/* typografi */
.logo { font-family: var(--vis); font-size: 34px; letter-spacing: .04em; line-height: 1; text-transform: uppercase; margin: 0;
  background: linear-gradient(92deg, var(--cyan), var(--magenta) 60%, var(--syre)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px #ff2bd655); }
.logo small { font-family: "Grotesk", sans-serif; font-size: 11px; letter-spacing: .32em; display: block; margin-top: 4px; color: var(--dempet); -webkit-text-fill-color: var(--dempet); filter: none; }
.etikett { font-family: var(--vis); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--cyan); text-shadow: var(--glod-c); }
h2 { font-family: var(--vis); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 26px; line-height: 1.05; margin: 0; }

/* rammeverk */
.topp { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(#07060df2, #07060dcc); backdrop-filter: blur(12px); border-bottom: 1px solid var(--kant); }
.topp .logo { font-size: 28px; }
.topp .hoyre { margin-left: auto; display: flex; gap: 8px; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.kort { background: linear-gradient(180deg, #171327, var(--kort)); border: 1px solid var(--kant); border-radius: var(--r); padding: 16px; }
@media (min-width: 900px) { main.app { grid-template-columns: 420px minmax(0, 1fr); align-items: start; } .nå-kolonne { position: sticky; top: 76px; } }

/* knapper */
.knapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--kant); background: #ffffff0d; cursor: pointer; font-weight: 700; text-decoration: none; color: var(--tekst); transition: transform .08s, background .15s, box-shadow .15s; }
.knapp:hover { background: #ffffff1a; }
.knapp:active { transform: scale(.96); }
.knapp:disabled { opacity: .45; cursor: default; }
.knapp.liten { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.knapp.hoved { border: 0; color: #07060d; background: linear-gradient(95deg, var(--cyan), var(--syre)); box-shadow: 0 0 24px #00f0ff55; text-transform: uppercase; letter-spacing: .06em; }
.knapp.hoved:hover { box-shadow: 0 0 34px #00f0ff88; }
.knapp.magenta { border: 0; color: #fff; background: linear-gradient(95deg, var(--magenta), #8b2bff); box-shadow: 0 0 24px #ff2bd655; }
.knapp.fare { border-color: #ff4d6d66; color: var(--rod); }
.ikon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.rund { width: 52px; height: 52px; padding: 0; border-radius: 50%; }
.rund.stor { width: 76px; height: 76px; border: 0; color: #07060d; background: var(--cyan); box-shadow: var(--glod-c), 0 0 40px #00f0ff44; }
.rund.stor .ikon { width: 34px; height: 34px; }
.rund.på { color: var(--syre); border-color: #c6ff0066; box-shadow: 0 0 14px #c6ff0044; }

/* spilles nå */
.nå { display: grid; gap: 14px; }
.cover { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #1b1630; box-shadow: 0 20px 60px -20px #ff2bd666, 0 0 0 1px var(--kant); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .tom { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--dempet);
  background: repeating-linear-gradient(135deg, #ffffff05 0 12px, transparent 12px 24px); }
.cover.spiller::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--cyan); animation: puls 1.9s ease-in-out infinite; pointer-events: none; }
@keyframes puls { 50% { box-shadow: inset 0 0 0 2px var(--magenta), inset 0 0 40px #ff2bd633; } }
.sportittel { font-family: var(--vis); font-size: 30px; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.artist { color: var(--dempet); font-size: 17px; }
.fremdrift { height: 6px; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.fremdrift > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--cyan)); box-shadow: 0 0 10px var(--cyan); }
.tider { display: flex; justify-content: space-between; font-size: 12px; color: var(--dempet); font-variant-numeric: tabular-nums; margin-top: 4px; }
.kontroller { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.volum { display: flex; align-items: center; gap: 10px; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 99px; background: #ffffff1c; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--tekst); box-shadow: 0 0 12px var(--cyan); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--tekst); box-shadow: 0 0 12px var(--cyan); cursor: pointer; }
.enhetsknapp { justify-content: flex-start; width: 100%; text-align: left; }
.enhetsknapp .navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prikk { width: 9px; height: 9px; border-radius: 50%; background: var(--dempet); flex: none; }
.prikk.på { background: var(--syre); box-shadow: 0 0 10px var(--syre); }

/* beskjeder */
.beskjed { border-radius: 14px; padding: 12px 14px; border: 1px solid #ffd16655; background: #ffd1661a; color: #ffe29a; font-size: 15px; }
.beskjed.info { border-color: #00f0ff44; background: #00f0ff12; color: #b9fbff; }
.beskjed.feil { border-color: #ff4d6d66; background: #ff4d6d1a; color: #ffc2cd; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; max-width: min(92vw, 520px);
  padding: 12px 16px; border-radius: 14px; background: #1d1830f2; border: 1px solid var(--kant); box-shadow: 0 10px 40px #000a; font-size: 15px; }
.toast.feil { border-color: #ff4d6d88; }

/* faner */
.faner { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #ffffff0a; border: 1px solid var(--kant); }
.faner button { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-family: var(--vis); text-transform: uppercase; letter-spacing: .08em; font-size: 16px; color: var(--dempet); }
.faner button[aria-selected=true] { background: linear-gradient(95deg, #ff2bd633, #00f0ff2a); color: var(--tekst); box-shadow: inset 0 0 0 1px #ffffff22; }

/* spilleliste */
.listehode { display: flex; gap: 14px; align-items: center; }
.listehode img { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px var(--kant); }
.spor { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.spor button { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.spor button:hover { background: #ffffff0a; }
.spor button:active { background: #ffffff14; }
.spor img, .spor .plass { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #1b1630; }
.spor .t { overflow: hidden; } .spor .t > b, .spor .t > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spor .t > span { color: var(--dempet); font-size: 14px; }
.spor .tid { color: var(--dempet); font-size: 13px; font-variant-numeric: tabular-nums; }
.spor li.spilles button { background: linear-gradient(90deg, #00f0ff1f, transparent); }
.spor li.spilles b { color: var(--cyan); text-shadow: var(--glod-c); }
.utjevner { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 6px; }
.utjevner i { width: 3px; background: var(--cyan); animation: hopp .9s ease-in-out infinite; }
.utjevner i:nth-child(2) { animation-delay: -.3s; } .utjevner i:nth-child(3) { animation-delay: -.6s; }
@keyframes hopp { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* galleri */
.opplasting { display: grid; gap: 10px; }
.opplasting .rad { display: flex; gap: 8px; flex-wrap: wrap; }
.opplasting .rad .knapp { flex: 1 1 140px; }
.felt { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--kant); background: #0b0915; outline: none; }
.felt:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #00f0ff22; }
.forhånd { display: flex; gap: 8px; overflow-x: auto; }
.forhånd img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex: none; }
.linje { height: 4px; border-radius: 99px; background: #ffffff14; overflow: hidden; } .linje > i { display: block; height: 100%; width: 0; background: var(--syre); transition: width .2s; }
.rutenett { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 12px; }
.rutenett button { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #1b1630; cursor: zoom-in; }
.rutenett img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rutenett button:hover img { transform: scale(1.05); }
.rutenett button.ny { animation: ny 1.2s ease-out; }
@keyframes ny { from { box-shadow: 0 0 0 3px var(--syre), 0 0 30px var(--syre); } to { box-shadow: 0 0 0 0 transparent; } }

/* fullskjerm */
.lys { position: fixed; inset: 0; z-index: 80; background: #05040a; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; touch-action: pan-y; }
.lys .verktøy { display: flex; gap: 8px; padding: 12px 16px; align-items: center; }
.lys .bildeflate { position: relative; display: grid; place-items: center; overflow: hidden; }
.lys .bildeflate img { max-width: 100vw; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lys .pil { position: absolute; top: 50%; transform: translateY(-50%); }
.lys .pil.v { left: 12px; } .lys .pil.h { right: 12px; }
.lys .tekst { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; }
.lys .tekst b { display: block; font-size: 18px; }
@media (max-width: 600px) { .lys .pil { display: none; } }

/* ark (enhetsvalg) */
.bakteppe { position: fixed; inset: 0; z-index: 70; background: #000a; display: flex; align-items: flex-end; justify-content: center; }
.ark { width: min(100%, 520px); max-height: 80dvh; overflow: auto; background: var(--bg2); border: 1px solid var(--kant); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .bakteppe { align-items: center; } .ark { border-radius: 22px; } }
.ark ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ark li button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--kant); background: #ffffff08; cursor: pointer; text-align: left; }
.ark li button.aktiv { border-color: #c6ff0077; background: #c6ff0012; }

/* innlogging */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(100%, 380px); display: grid; gap: 14px; }
.login .logo { font-size: 64px; text-align: center; }
.login .logo small { font-size: 12px; }
.ekvalizer { display: flex; justify-content: center; gap: 4px; height: 36px; align-items: flex-end; }
.ekvalizer i { width: 6px; border-radius: 3px; background: linear-gradient(var(--magenta), var(--cyan)); animation: hopp2 1.1s ease-in-out infinite; }
@keyframes hopp2 { 0%, 100% { height: 6px; } 50% { height: 36px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.fot { text-align: center; font-size: 13px; color: var(--dempet); }
.fot a { color: var(--dempet); }

/* TV */
.tv { position: fixed; inset: 0; background: #000; overflow: hidden; cursor: none; }
.tv .lag { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.tv .lag.vis { opacity: 1; }
.tv .lag .uskarp { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.45) saturate(1.3); }
.tv .lag img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tv .lag.vis img { animation: zoom 14s ease-out forwards; }
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.tv .tekst { position: absolute; right: 3vw; bottom: 4vh; max-width: 45vw; text-align: right; font-size: 2.2vw; text-shadow: 0 2px 14px #000; }
.tv .tekst b { display: block; font-family: var(--vis); text-transform: uppercase; color: var(--syre); font-size: 1.4vw; letter-spacing: .1em; font-weight: 400; }
.tv .spiller { position: absolute; left: 3vw; bottom: 4vh; display: flex; align-items: center; gap: 1.4vw; max-width: 48vw; padding: 1vw; border-radius: 1.4vw; background: #07060dbb; backdrop-filter: blur(10px); box-shadow: 0 0 0 1px #ffffff1a; }
.tv .spiller img { width: 7vw; height: 7vw; border-radius: .6vw; object-fit: cover; }
.tv .spiller .sportittel { font-size: 2.2vw; }
.tv .spiller .artist { font-size: 1.3vw; }
.tv .spiller .fremdrift { margin-top: .6vw; height: .4vw; }
.tv .merke { position: absolute; top: 3vh; left: 3vw; font-size: 2.4vw; }
.tv .tomt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 2vw; color: var(--dempet); }
.tv .tomt .logo { font-size: 9vw; }

/* små hjelpeklasser (CSP tillater ikke style-attributter) */
.mt { margin-top: 12px; } .skyv { margin-left: auto; } .arkhode { display: flex; align-items: center; gap: 8px; } .arktekst { margin: 6px 0 0; }
input[type=password] { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .1em; }
[role=tabpanel], .nå-kolonne { scroll-margin-top: 76px; }
@media (min-width: 700px) { .rutenett { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
