:root {
  --bg: #07070d;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --surface-solid: #12121c;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f4f4f8;
  --muted: #9a9ab3;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --orange: #f97316;
  --violet-soft: #c4b5fd;
  --good: #34d399;
  --bad: #fb7185;
  --grad: linear-gradient(135deg, var(--violet) 0%, var(--pink) 55%, var(--orange) 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 600; }
a { color: var(--violet-soft); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Bakgrund ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22; animation: drift 28s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--violet); top: -30vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--pink); top: -20vmax; right: -25vmax; animation-delay: -9s; opacity: .14; }
.aurora span:nth-child(3) { background: var(--orange); bottom: -40vmax; left: 20vmax; animation-delay: -18s; opacity: .09; }
.is-login .aurora span { opacity: .4; }
.is-login .aurora span:nth-child(3) { opacity: .2; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Logga ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo span { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.04em; }
.logo-mark { width: 34px; height: 34px; stroke: none; filter: drop-shadow(0 4px 14px rgba(236, 72, 153, .35)); transition: transform .4s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-spark { transform-origin: 30.5px 10.5px; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.55) rotate(45deg); opacity: .7; } }
.logo-big .logo-mark { width: 56px; height: 56px; }
.logo-big span { font-size: 2.1rem; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 500;
  transition: transform .2s var(--spring), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; }
.btn-primary {
  position: relative; overflow: hidden; border: 0; background: var(--grad); color: #fff; font-weight: 600;
  box-shadow: 0 8px 28px -8px rgba(236, 72, 153, .6);
}
.btn-primary:hover { background: var(--grad); box-shadow: 0 12px 36px -8px rgba(236, 72, 153, .8); transform: translateY(-1px); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
}
.btn-primary:hover::after { animation: shine .9s var(--ease); }
@keyframes shine { to { transform: translateX(120%); } }
.btn-primary svg { stroke: none; fill: currentColor; }
.btn-block { width: 100%; padding: 14px; font-size: 1rem; }
.btn-xl { padding: 16px 38px; font-size: 1.1rem; }
.btn.is-loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fält ---------- */
.field { position: relative; display: block; }
.field input {
  width: 100%; padding: 22px 16px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0, 0, 0, .25); color: var(--text); font: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .2); background: rgba(0, 0, 0, .35); }
.field span {
  position: absolute; left: 16px; top: 15px; color: var(--muted); pointer-events: none;
  transition: transform .2s var(--ease), color .2s, font-size .2s;
  transform-origin: left top;
}
.field input:focus + span, .field input:not(:placeholder-shown) + span { transform: translateY(-9px) scale(.78); color: var(--violet-soft); }
.form-error { color: var(--bad); margin: 0; font-size: .9rem; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.check input { accent-color: var(--pink); width: 18px; height: 18px; }

/* ---------- Inloggning ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 400px; padding: 40px 32px 32px; border-radius: 28px; text-align: center;
  background: rgba(18, 18, 28, .55); border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
  animation: rise .7s var(--ease) both;
}
.login-tag { color: var(--muted); margin: 8px 0 28px; }
.login-form { display: grid; gap: 14px; text-align: left; }
.login-form .btn { margin-top: 6px; }
.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Toppfält ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 7, 13, .65); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.tabs { position: relative; display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.tabs a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92rem;
  transition: color .25s;
}
.tabs a:hover, .tabs a.active { color: var(--text); }
.tabs a svg { width: 17px; height: 17px; }
.tabs .count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2);
  font-size: .72rem; line-height: 20px; text-align: center; font-weight: 600;
}
.tabs .count.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.45); background: var(--pink); } }
.tab-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  transition: transform .45s var(--spring), width .45s var(--spring), opacity .2s;
}

.usermenu { position: relative; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 700; font-family: var(--font-display);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 255, 255, .15); transition: transform .25s var(--spring);
}
.avatar:hover { transform: scale(1.08); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 6px; border-radius: 16px;
  background: rgba(20, 20, 32, .92); backdrop-filter: blur(20px); border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); animation: pop .22s var(--ease); transform-origin: top right;
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(-6px); } }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: grid; }
.menu-head span { color: var(--muted); font-size: .82rem; }
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 10px;
  background: none; cursor: pointer; color: var(--text); text-decoration: none; font-size: .92rem;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu form { margin: 0; }

/* ---------- Vyer ---------- */
.main { padding-top: 36px; padding-bottom: 60px; }
.view { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } }
.hero { margin-bottom: 26px; }
.hero p { margin: 8px 0 0; font-size: 1.02rem; }

.panel {
  position: relative; padding: 20px 22px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.panel:focus-within { z-index: 5; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head .hint { color: var(--muted); font-size: .85rem; }
.step {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface-2); color: var(--violet-soft); font-size: .78rem; font-weight: 700; font-family: var(--font-display);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .panel { margin-bottom: 14px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; padding: 8px 15px; border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .03); color: #d6d6e4;
  transition: transform .25s var(--spring), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.chip:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -6px rgba(236, 72, 153, .55); }
.chip.on.pulse { animation: chipOn .4s var(--spring); }
@keyframes chipOn { 50% { transform: scale(1.1); } }
.chip .star { margin-left: 4px; color: #fbbf24; }
.chip.on .star { color: #fff; }

/* Reglage */
.range-value { margin-left: auto; font-family: var(--font-display); font-size: 1.3rem; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--violet), var(--pink) var(--fill, 50%), var(--surface-2) var(--fill, 50%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(236, 72, 153, .35), 0 4px 12px rgba(0, 0, 0, .4); transition: transform .2s var(--spring); }
.range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(236, 72, 153, .35); }

/* Sök + valda filmer */
.search { position: relative; display: flex; align-items: center; }
.search > svg { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 15px 16px 15px 46px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .2); }
.search-results {
  position: absolute; z-index: 15; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  border-radius: 16px; background: rgba(20, 20, 32, .96); backdrop-filter: blur(20px); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8); animation: pop .18s var(--ease); transform-origin: top center;
}
.search-results li { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.search-results li.active, .search-results li:hover { background: var(--surface-2); }
.search-results li small { color: var(--muted); }
.search-results .empty { color: var(--muted); cursor: default; }
.seeds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.seeds:empty { display: none; }
.seed {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border-strong); animation: seedIn .4s var(--spring);
}
@keyframes seedIn { from { opacity: 0; transform: scale(.6); } }
.seed.out { animation: seedOut .25s var(--ease) forwards; }
@keyframes seedOut { to { opacity: 0; transform: scale(.6); } }
.seed-poster { width: 30px; height: 44px; border-radius: 6px; background: var(--surface-2) center / cover; }
.seed b { font-weight: 600; font-size: .9rem; }
.seed small { color: var(--muted); }
.seed button { border: 0; background: none; cursor: pointer; color: var(--muted); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.seed button:hover { background: rgba(251, 113, 133, .15); color: var(--bad); }
.seed button svg { width: 14px; height: 14px; }

.ratings-toggle { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.ratings-toggle:empty { display: none; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .3s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + .switch-track { background: var(--grad); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 4px rgba(139, 92, 246, .3); }
.switch-text b { display: block; font-weight: 600; }
.switch-text span { color: var(--muted); font-size: .88rem; }
.nudge { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .92rem; }
.nudge a { font-weight: 600; text-decoration: none; }

.cta-bar { display: flex; justify-content: center; padding: 18px 0 0; }

/* ---------- Resultat ---------- */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.results-head p { margin: 6px 0 0; }
.results-actions { display: flex; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; }

.movie {
  position: relative; display: flex; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: cardIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.movie::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad); opacity: 0; transition: opacity .35s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.movie:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(236, 72, 153, .35); }
.movie:hover::before { opacity: .7; }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.movie.leaving { animation: cardOut .35s var(--ease) forwards; pointer-events: none; }
@keyframes cardOut { to { opacity: 0; transform: scale(.88) rotate(-2deg) translateX(-24px); filter: blur(6px); } }
.movie.leaving.seen-out { animation-name: cardSeen; }
@keyframes cardSeen { to { opacity: 0; transform: scale(.9) translateY(-20px); filter: blur(6px); } }
.movie.entering { animation: cardFlip .55s var(--spring) both; }
@keyframes cardFlip { from { opacity: 0; transform: perspective(900px) rotateY(-25deg) scale(.92); } }

.poster { position: relative; flex: 0 0 140px; overflow: hidden; background: linear-gradient(160deg, #1c1c2c, #0f0f18); }
.poster::before {
  content: ""; position: absolute; inset: -20%; background: var(--img, none) center / cover;
  filter: blur(26px) saturate(1.5); opacity: 0; transition: opacity 1s;
}
.poster.has-img::before { opacity: .4; }
.poster.has-img .poster-fallback { opacity: 0; }
.poster img { position: relative; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; opacity: 0; transform: scale(1.08); transition: opacity .6s, transform 1.2s var(--ease); }
.poster img.loaded { opacity: 1; transform: scale(1); }
.movie:hover .poster img.loaded { transform: scale(1.05); }
.poster-fallback { position: absolute; inset: 0; transition: opacity .4s; display: grid; place-items: center; padding: 10px; text-align: center; font-family: var(--font-display); font-weight: 700; color: rgba(255, 255, 255, .15); font-size: 1.05rem; }

.movie-body { flex: 1; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.movie-top { display: flex; justify-content: space-between; gap: 14px; }
.movie h3 { font-size: 1.15rem; font-weight: 600; }
.movie h3 a { color: var(--text); text-decoration: none; background-image: var(--grad); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease); }
.movie h3 a:hover { background-size: 100% 2px; }
.orig { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: 2px; }
.meta { color: var(--muted); font-size: .86rem; margin-top: 3px; }

.score { position: relative; flex-shrink: 0; width: 58px; text-align: center; }
.score svg { width: 58px; height: 58px; transform: rotate(-90deg); stroke-width: 5; }
.score .track { stroke: var(--surface-2); }
.score .bar { stroke: url(#scoreGrad); stroke-dasharray: 151; stroke-dashoffset: 151; transition: stroke-dashoffset 1.2s var(--ease) .2s; }
.score b { position: absolute; top: 0; left: 0; width: 58px; height: 58px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; }
.score span { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: #c9c9da; }
.tag-imdb { background: rgba(251, 191, 36, .12); color: #fcd34d; }
.overview { margin: 0; font-size: .88rem; color: #c8c8d8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tmdb { display: flex; flex-direction: column; gap: 5px; animation: fadeIn .5s var(--ease); }
.tmdb:empty { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.where { display: flex; flex-wrap: wrap; gap: 6px; }
.where a {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 999px; text-decoration: none;
  background: rgba(139, 92, 246, .12); color: var(--violet-soft); border: 1px solid rgba(139, 92, 246, .25); transition: background .2s;
}
.where a:hover { background: rgba(139, 92, 246, .22); }
.where a svg { width: 13px; height: 13px; }
.why { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .87rem; color: #d0d0de; }
.why li { position: relative; padding-left: 20px; }
.why li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); transform: rotate(45deg); }
.movie-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.act {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; font-size: .82rem; font-weight: 500; color: #d0d0de;
  transition: transform .2s var(--spring), background .2s, border-color .2s, color .2s;
}
.act svg { width: 15px; height: 15px; }
.act:hover { background: var(--surface-2); border-color: var(--border-strong); }
.act:active { transform: scale(.92); }
.act.no:hover { color: var(--bad); border-color: rgba(251, 113, 133, .4); background: rgba(251, 113, 133, .08); }
.act.seen:hover { color: var(--good); border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
.act.love.on { color: #fff; border-color: transparent; background: var(--grad); }
.act.love.on svg { fill: currentColor; }
.act.love.pop svg { animation: heart .5s var(--spring); }
@keyframes heart { 30% { transform: scale(1.5); } 60% { transform: scale(.9); } }

/* Skelett */
.skeleton { pointer-events: none; animation: none; }
.skeleton .poster, .skeleton .sk {
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.skeleton .poster { min-height: 210px; }
.sk { height: 12px; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 56px 20px; border-radius: var(--radius); border: 1px dashed var(--border-strong); }
.empty-state h3 { margin-bottom: 8px; }
.empty-state .big { font-size: 2.4rem; margin-bottom: 8px; }

/* ---------- Profil ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 150px 1fr 54px; gap: 12px; align-items: center; font-size: .9rem; }
.bar-track { position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.bar-track::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .2); }
.bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 99px; width: 0; transition: width 1s var(--ease); }
.bar-fill.pos { left: 50%; background: linear-gradient(90deg, var(--pink), var(--orange)); }
.bar-fill.neg { right: 50%; background: linear-gradient(270deg, #6366f1, #3b82f6); }
.dirs { columns: 2; column-gap: 28px; margin: 0; padding-left: 20px; }
.dirs li { margin: 3px 0; }

/* ---------- IMDb-lista ---------- */
.list-status { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.list-status .big { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.list-status .btn { margin-left: auto; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; margin: 14px 0;
  border-radius: var(--radius); border: 2px dashed var(--border-strong); cursor: pointer; text-align: center;
  transition: border-color .25s, background .25s, transform .25s var(--spring);
}
.drop:hover, .drop.over { border-color: var(--pink); background: rgba(236, 72, 153, .06); }
.drop.over { transform: scale(1.01); }
.drop input { display: none; }
.drop b { font-size: 1.1rem; }
.drop-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); margin-bottom: 6px; box-shadow: 0 10px 30px -10px rgba(236, 72, 153, .7); }
.drop-icon svg { color: #fff; width: 26px; height: 26px; }
.drop:hover .drop-icon { animation: float 1.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.drop.busy { pointer-events: none; opacity: .6; }

/* ---------- Användare ---------- */
.user-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 10px; align-items: center; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.user-row:last-child { border-bottom: 0; }
.user-row .avatar { width: 34px; height: 34px; font-size: .85rem; cursor: default; flex-shrink: 0; }
.user-row .who { flex: 1; min-width: 0; }
.user-row .who > span:not(.badge) { display: block; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .7rem; padding: 2px 8px; border-radius: 99px; background: rgba(139, 92, 246, .18); color: var(--violet-soft); margin-left: 6px; vertical-align: middle; }
.user-row .btn { padding: 6px 12px; font-size: .82rem; }

/* ---------- Modal + toasts ---------- */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 420px; width: calc(100% - 32px); }
.modal::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.modal[open] { animation: rise .35s var(--ease); }
.modal-body { display: grid; gap: 14px; padding: 28px; border-radius: 24px; background: rgba(20, 20, 32, .95); border: 1px solid var(--border-strong); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100% - 32px); }
.toast {
  display: flex; align-items: center; gap: 14px; padding: 11px 12px 11px 18px; border-radius: 14px;
  background: rgba(24, 24, 38, .95); border: 1px solid var(--border-strong); backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); font-size: .92rem; animation: toastIn .4s var(--spring);
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast.error { border-color: rgba(251, 113, 133, .5); }
.toast button { border: 0; background: var(--surface-2); color: var(--violet-soft); font-weight: 600; padding: 6px 12px; border-radius: 9px; cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px) scale(.95); } }

.foot { padding: 20px 20px 40px; text-align: center; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  /* backdrop-filter skulle göra toppfältet till referens för den fasta bottenmenyn */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 7, 13, .92); }
  .topbar-inner { height: 60px; }
  .logo span { font-size: 1.15rem; }
  .usermenu { margin-left: auto; }
  .tabs {
    position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: space-around; padding: 6px; border-radius: 22px;
    background: rgba(16, 16, 26, .85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-color: var(--border-strong);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8);
  }
  .tabs a { flex-direction: column; gap: 2px; padding: 7px 4px; font-size: .68rem; flex: 1; border-radius: 16px; }
  .tabs a svg { width: 21px; height: 21px; }
  .tabs .count { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 17px; line-height: 17px; font-size: .62rem; padding: 0 4px; }
  .tab-indicator { border-radius: 16px; top: 6px; bottom: 6px; }
  .main { padding-top: 24px; padding-bottom: 110px; }
  .foot { padding-bottom: 110px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .panel { padding: 18px 16px; }
  .cards { grid-template-columns: 1fr; }
  .poster { flex-basis: 96px; }
  .movie-body { padding: 14px; }
  .movie h3 { font-size: 1.02rem; }
  .score, .score svg, .score b { width: 50px; }
  .score svg, .score b { height: 50px; }
  .bar { grid-template-columns: 110px 1fr 46px; }
  .dirs { columns: 1; }
  .cta-bar { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 10; }
  .btn-xl { width: 100%; }
  .user-form { grid-template-columns: 1fr; }
  .toasts { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .results-actions .btn span { display: none; }
}

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