:root {
  --bg: #0f0e13;
  --bg-2: #16151b;
  --card: #1c1a22;
  --card-2: #24212c;
  --line: #2e2b37;
  --text: #ece8e1;
  --muted: #9a94a3;
  --dim: #6d6876;
  --accent: #e8b04b;
  --accent-ink: #1a1308;
  --accent-soft: rgba(232, 176, 75, .14);
  --good: #6fcf97;
  --warn: #f2994a;
  --bad: #eb5757;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
main { outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section { padding: 40px 0; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-title h2 { margin: 0; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px 20px;
  background: rgba(15, 14, 19, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: .925rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--card-2); }
.nav .me { margin-left: auto; }

/* Knappar & formulär */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card-2);
  color: var(--text); font: 600 .95rem var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: transform .1s, background .15s; text-decoration: none; }
.btn:hover { background: #2d2a36; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #f3c065; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=email], input[type=number], input[type=search], input[type=datetime-local], textarea, select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit; padding: 11px 14px; border-radius: 10px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kort */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.tight { padding: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.good { background: rgba(111, 207, 151, .12); color: var(--good); border-color: transparent; }
.pill.warn { background: rgba(242, 153, 74, .12); color: var(--warn); border-color: transparent; }
.pill.bad { background: rgba(235, 87, 87, .12); color: var(--bad); border-color: transparent; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: .55; transform: scale(1.03); }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(15,14,19,.88) 38%, rgba(15,14,19,.35) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 45%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 56px 20px 48px; align-items: end; }
.hero-poster { border-radius: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.6); aspect-ratio: 2/3; object-fit: cover; width: 100%; background: var(--card); }
.hero h1 { margin-bottom: .2em; }
.hero .meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); margin-bottom: 18px; font-size: .95rem; }
.hero .meta span + span::before { content: "·"; margin-right: 10px; color: var(--dim); }
.hero .overview { max-width: 640px; color: #d6d1c8; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 32px; gap: 24px; }
  .hero-poster { width: 160px; }
}
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 0 0 18px; font-family: var(--serif); font-style: italic; color: #e3ddd2; font-size: 1.05rem; }
.quote cite { display: block; font-style: normal; font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* Picking-hero */
.spotlight { text-align: center; padding: 80px 20px 64px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(232,176,75,.18), transparent 70%), var(--bg); }
.spotlight h1 { margin: 10px 0 12px; }
.spotlight .avatar { margin: 0 auto 8px; width: 84px; height: 84px; font-size: 2rem; }
.countdown { display: inline-flex; gap: 8px; align-items: center; font-size: 1.05rem; color: var(--muted); }

/* Ratings-chips */
.scores { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.score { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 10px; background: rgba(28,26,34,.75); border: 1px solid var(--line); min-width: 82px; }
.score b { font-size: 1.15rem; }
.score span { font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* Layout för film-sidan */
.film-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .film-layout { grid-template-columns: 1fr; } }

/* Var kan jag se */
.where h3 { margin-bottom: 14px; }
.where .jf { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; }
.where .jf-icon { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, #aa5cc3, #00a4dc); flex-shrink: 0; display: grid; place-items: center; font-size: 1.3rem; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.provider { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: .85rem; }
.provider img { width: 26px; height: 26px; border-radius: 6px; }
.provider .noimg { width: 26px; height: 26px; border-radius: 6px; background: var(--card-2); display: grid; place-items: center; font-size: .7rem; color: var(--muted); }
.prov-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }

/* Stjärnor */
.stars { display: inline-flex; gap: 2px; color: var(--accent); font-size: 1.05rem; letter-spacing: 0; line-height: 1; }
.star { position: relative; display: inline-block; width: 1em; height: 1em; }
.star::before { content: "★"; position: absolute; inset: 0; color: #3a3644; }
.star.full::before { color: var(--accent); }
.star.half::before { background: linear-gradient(90deg, var(--accent) 50%, #3a3644 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-input { display: inline-flex; gap: 4px; font-size: 2.2rem; }
.star-input .star { cursor: pointer; }
.star-input .half-btn { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; padding: 0; background: transparent; cursor: pointer; z-index: 1; }
.star-input .half-btn.l { left: 0; } .star-input .half-btn.r { right: 0; }
.star-input .half-btn:focus-visible { outline: 2px solid var(--accent); }

/* Recensioner */
.review { padding: 18px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; padding-top: 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-text { white-space: pre-wrap; color: #ddd7cd; overflow-wrap: anywhere; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1a1308; flex-shrink: 0; font-size: .95rem; }
.locked { text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.locked .big { font-size: 2rem; margin-bottom: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Filmgrid */
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
.film-card { background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; display: block; }
.film-card:hover { text-decoration: none; }
.film-card .poster-wrap { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 2/3; background: var(--card); box-shadow: 0 8px 20px rgba(0,0,0,.35); transition: transform .15s, box-shadow .15s; }
.film-card:hover .poster-wrap, .film-card:focus-visible .poster-wrap { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.5); }
.film-card img { width: 100%; height: 100%; object-fit: cover; }
.film-card .noposter { display: grid; place-items: center; height: 100%; padding: 12px; text-align: center; font-family: var(--serif); color: var(--muted); }
.film-card .t { font-weight: 600; margin-top: 10px; line-height: 1.3; }
.film-card .y { color: var(--muted); font-size: .85rem; }
.badge { position: absolute; top: 8px; left: 8px; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; }
.badge.jf { background: linear-gradient(135deg, #aa5cc3, #00a4dc); }
.badge.rate { left: auto; right: 8px; background: var(--accent); color: var(--accent-ink); }

/* Sök */
.searchbar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.searchbar input { flex: 1; min-width: 220px; font-size: 1.05rem; padding: 14px 18px; border-radius: 999px; }
.tabs { display: flex; gap: 6px; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; }
.tabs button.active { background: var(--card-2); color: var(--text); }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--text); padding: 0; width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(5, 5, 8, .75); backdrop-filter: blur(4px); }
.dlg-head { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 24px; }
.dlg-head img { border-radius: 10px; aspect-ratio: 2/3; object-fit: cover; width: 100%; }
@media (max-width: 640px) { .dlg-head { grid-template-columns: 110px 1fr; gap: 16px; padding: 16px; } .dlg-head h2 { font-size: 1.25rem; } }
.dlg-body { padding: 0 24px 24px; }
.dlg-close { position: absolute; top: 12px; right: 12px; z-index: 2; }

/* Lista / tabeller */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.rank { width: 28px; text-align: center; font-family: var(--serif); font-size: 1.3rem; color: var(--dim); }
.rank.gold { color: var(--accent); }
.queue { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.queue .q { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; }
.queue .q .avatar { width: 28px; height: 28px; font-size: .75rem; }
.queue .arrow { color: var(--dim); }

/* Admin */
.member-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: 0; }
.member-row.inactive { opacity: .5; }
.member-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .member-row { grid-template-columns: auto 1fr; } .member-row .actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* Guide */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; }
.guide-card .ico { font-size: 1.6rem; }
.guide-card .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(232,176,75,.16), transparent 70%), var(--bg); }
.login .card { width: min(420px, 100%); padding: 36px; }
.login h1 { font-size: 2.2rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--bad); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; margin-bottom: 8px; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
.demo-banner { background: var(--accent-soft); color: var(--accent); text-align: center; font-size: .85rem; padding: 6px 12px; }
footer.foot { color: var(--dim); font-size: .8rem; text-align: center; padding: 40px 20px; }

/* Logga */
.brand-logo { width: 32px; height: 32px; transition: transform .25s; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.login-logo { width: 84px; height: 84px; margin-bottom: 12px; animation: pop .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .login-logo { animation: none; } .brand-logo { transition: none; } }
