:root {
  --bg: #090a0d;
  --bg-soft: #0e1015;
  --surface: rgba(20, 22, 29, 0.86);
  --surface-solid: #14161d;
  --surface-raised: #1a1d26;
  --surface-hover: #20232d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f3ed;
  --text-soft: #c2c0bd;
  --muted: #888a92;
  --red: #ff4d55;
  --red-dark: #d92f3b;
  --red-soft: rgba(255, 77, 85, 0.13);
  --amber: #f2b45f;
  --green: #54d69b;
  --blue: #66a8ff;
  --purple: #aa8cff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --container: 1240px;
  --header-height: 76px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(131, 30, 42, .12), transparent 38rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

body, .site-header__inner { display: flex; flex-direction: column; }
.main-content { position: relative; z-index: 1; flex: 1; width: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
::selection { color: #fff; background: rgba(255, 77, 85, .55); }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.surface { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--red); transform: translateY(-150%); transition: transform .2s; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(102, 168, 255, .82); outline-offset: 3px; }
.ambient { position: fixed; z-index: 0; width: 26rem; height: 26rem; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .08; }
.ambient--one { top: 16%; left: -15rem; background: var(--red); }
.ambient--two { right: -16rem; bottom: 8%; background: var(--purple); }
.accent-dot { color: var(--red); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--red); font-size: .71rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.text-link { color: var(--text-soft); font-size: .86rem; font-weight: 650; transition: color .2s; }
.text-link:hover { color: var(--red); }
.back-link { display: inline-flex; margin-bottom: 30px; color: var(--muted); font-size: .86rem; font-weight: 650; transition: color .2s, transform .2s; }
.back-link:hover { color: var(--text); transform: translateX(-3px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-height); border-bottom: 1px solid transparent; background: rgba(9, 10, 13, .68); backdrop-filter: blur(20px); transition: border-color .2s, background .2s; }
.site-header.is-scrolled { border-color: var(--line); background: rgba(9, 10, 13, .9); }
.site-header__inner { height: 100%; flex-flow: row nowrap; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f7f4ee; font-size: 1.1rem; font-weight: 520; letter-spacing: -.035em; white-space: nowrap; }
.brand > span:last-child > span { font-weight: 800; }
.brand__mark { position: relative; display: grid; width: 30px; height: 30px; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .15); border-radius: 9px; background: linear-gradient(145deg, #ff5961, #b61f2b); box-shadow: 0 8px 22px rgba(255, 77, 85, .23); }
.brand__mark::before, .brand__mark::after, .brand__mark span { position: absolute; width: 3px; height: 15px; border-radius: 2px; content: ""; background: #fff; transform: skew(-11deg); }
.brand__mark::before { left: 8px; }
.brand__mark span { left: 13.5px; opacity: .82; }
.brand__mark::after { left: 19px; opacity: .63; }
.brand--small { font-size: .95rem; }
.brand--small .brand__mark { width: 26px; height: 26px; transform: scale(.86); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav__link { position: relative; padding: 9px 11px; color: var(--muted); font-size: .88rem; font-weight: 600; transition: color .2s; }
.site-nav__link:hover, .site-nav__link.is-active { color: var(--text); }
.site-nav__link.is-active::after { position: absolute; right: 11px; bottom: 3px; left: 11px; height: 2px; border-radius: 2px; content: ""; background: var(--red); }
.nav-profile { display: flex; align-items: center; gap: 8px; margin-left: 10px; padding-left: 16px; border-left: 1px solid var(--line); }
.nav-profile__name { max-width: 100px; overflow: hidden; color: var(--text-soft); font-size: .82rem; font-weight: 650; text-overflow: ellipsis; }
.avatar { display: inline-grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #4a2a31, #23252e); font-size: .76rem; font-weight: 800; }
.avatar--large { width: 40px; height: 40px; }
.avatar--hero { width: 84px; height: 84px; border-color: rgba(255, 77, 85, .3); font-size: 2rem; box-shadow: 0 14px 36px rgba(0, 0, 0, .28); }
.nav-logout { margin: 0; }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); }
.nav-toggle > span:not(.sr-only) { display: block; width: 100%; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }

/* Buttons and messages */
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 750; line-height: 1; letter-spacing: -.01em; transition: transform .2s var(--ease), border-color .2s, background .2s, color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--primary { color: #fff; background: linear-gradient(135deg, #ff555d, #db303c); box-shadow: 0 10px 28px rgba(255, 77, 85, .2); }
.button--primary:hover { background: linear-gradient(135deg, #ff666d, #ec3945); box-shadow: 0 13px 34px rgba(255, 77, 85, .3); }
.button--secondary { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, .055); }
.button--secondary:hover { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .09); }
.button--ghost { border-color: var(--line); color: var(--text-soft); background: transparent; }
.button--ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.button--text { min-height: auto; padding-inline: 8px; color: var(--muted); background: transparent; }
.button--text:hover { color: var(--text); }
.button--small { min-height: 36px; padding: 8px 13px; font-size: .78rem; }
.button--wide { width: 100%; }
.button--icon { width: 38px; min-width: 38px; min-height: 38px; padding: 0; border-color: var(--line); color: var(--muted); background: rgba(255, 255, 255, .035); }
.button--icon:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-hover); }
.button--toggle.is-done { border-color: rgba(84, 214, 155, .32); color: var(--green); background: rgba(84, 214, 155, .1); }
.button--danger:hover { border-color: rgba(255, 77, 85, .35); color: var(--red); background: var(--red-soft); }
.button--danger-solid { border-color: rgba(255, 77, 85, .25); color: #ff767d; background: rgba(255, 77, 85, .1); }
.button--danger-solid:hover { border-color: rgba(255, 77, 85, .5); color: #fff; background: var(--red-dark); }
.icon { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flash-region { position: fixed; top: calc(var(--header-height) + 14px); right: 20px; z-index: 200; width: min(420px, calc(100% - 40px)); margin-right: 0; }
.flash { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; margin-bottom: 9px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-soft); background: rgba(25, 27, 34, .96); box-shadow: 0 18px 42px rgba(0, 0, 0, .38); animation: toast-in .35s var(--ease); }
.flash.is-leaving { opacity: 0; transform: translateX(20px); transition: opacity .25s, transform .25s; }
.flash__icon { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px currentColor; }
.flash--success .flash__icon { background: var(--green); }.flash--warning .flash__icon { background: var(--amber); }.flash--danger .flash__icon { background: var(--red); }
.flash__close { padding: 2px 5px; border: 0; color: var(--muted); background: transparent; font-size: 1.25rem; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Footer */
.site-footer { position: relative; z-index: 1; margin-top: 90px; border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; min-height: 100px; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer p { margin: 0; color: var(--muted); font-size: .77rem; }

/* Auth */
.auth-page .site-footer { margin-top: 0; }
.auth-shell { display: grid; min-height: calc(100vh - var(--header-height) - 100px); grid-template-columns: minmax(0, 1.08fr) minmax(420px, .72fr); align-items: center; gap: clamp(50px, 8vw, 120px); padding-block: 70px; }
.auth-story { position: relative; max-width: 640px; }
.auth-story__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--text-soft); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-story__eyebrow span { width: 26px; height: 2px; background: var(--red); }
.auth-story h1 { max-width: 630px; margin-bottom: 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.1rem, 6vw, 6rem); font-weight: 500; letter-spacing: -.06em; }
.auth-story > p { max-width: 570px; color: var(--muted); font-size: 1.03rem; }
.poster-stack { position: relative; height: 185px; margin-top: 52px; perspective: 900px; }
.poster-stack__item { position: absolute; bottom: 0; width: 120px; height: 172px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px; box-shadow: 0 22px 50px rgba(0, 0, 0, .5); }
.poster-stack__item::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 30% 30%, transparent, rgba(0, 0, 0, .5)); }
.poster-stack__item span { position: absolute; right: 10px; bottom: 10px; left: 10px; color: rgba(255, 255, 255, .72); font-size: .61rem; font-weight: 900; letter-spacing: .15em; }
.poster-stack__item--one { left: 10%; background: linear-gradient(145deg, #9b333d, #181118); transform: rotate(-8deg); }
.poster-stack__item--two { left: 30%; z-index: 2; background: linear-gradient(145deg, #265967, #11181e); transform: translateY(-15px) rotate(2deg); }
.poster-stack__item--three { left: 50%; background: linear-gradient(145deg, #796436, #181712); transform: rotate(8deg); }
.auth-card { width: 100%; padding: clamp(28px, 4vw, 46px); border-radius: var(--radius-lg); }
.auth-card__header { margin-bottom: 30px; }
.auth-card__header h2 { margin-bottom: 10px; font-size: 1.8rem; }
.auth-card__header p, .auth-card__footer { color: var(--muted); font-size: .89rem; }
.auth-card__footer { margin: 25px 0 0; text-align: center; }
.auth-card__footer a { color: var(--red); font-weight: 750; }
.feature-ticks { display: grid; gap: 13px; margin: 35px 0 0; padding: 0; list-style: none; }
.feature-ticks li { display: flex; align-items: center; gap: 11px; color: var(--text-soft); }
.feature-ticks li > span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(84, 214, 155, .25); border-radius: 50%; color: var(--green); background: rgba(84, 214, 155, .08); }

/* Forms */
.stack-form { display: grid; gap: 19px; }
.form-grid { display: grid; gap: 18px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { position: relative; min-width: 0; }
.field__label { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: .79rem; font-weight: 700; }
.field__control, .search-control input, .select-control select { width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; color: var(--text); background: rgba(4, 5, 8, .45); transition: border-color .2s, background .2s, box-shadow .2s; }
textarea.field__control { min-height: 120px; resize: vertical; }
select.field__control, .select-control select { padding-right: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px); background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; }
.field__control:hover, .search-control input:hover, .select-control select:hover { border-color: rgba(255, 255, 255, .24); }
.field__control:focus, .search-control input:focus, .select-control select:focus { border-color: rgba(255, 77, 85, .65); background-color: rgba(7, 8, 11, .8); box-shadow: 0 0 0 3px rgba(255, 77, 85, .1); }
.field__control::placeholder, .search-control input::placeholder { color: #666871; opacity: 1; }
.field__hint { margin: 6px 0 0; color: var(--muted); font-size: .72rem; }
.field__errors { margin: 6px 0 0; padding: 0; color: #ff7b82; font-size: .74rem; list-style: none; }
.field--invalid .field__control { border-color: rgba(255, 77, 85, .7); }
.field-password .field { margin: 0; }
.password-toggle { position: absolute; right: 9px; bottom: 8px; display: grid; width: 32px; height: 32px; place-items: center; border: 0; color: var(--muted); background: transparent; }
.field-password:has(.field__hint) .password-toggle, .field-password:has(.field__errors) .password-toggle { bottom: auto; top: 31px; }
.password-toggle__eye { width: 17px; height: 11px; border: 1.5px solid currentColor; border-radius: 50% / 60%; }
.password-toggle__eye::after { display: block; width: 4px; height: 4px; margin: 2px auto; border-radius: 50%; content: ""; background: currentColor; }
.form-row { display: flex; align-items: center; gap: 12px; }.form-row--between { justify-content: space-between; }
.check-control { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: .8rem; cursor: pointer; }
.check-control input { width: 16px; height: 16px; accent-color: var(--red); }
.input-action { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.check-card { position: relative; display: grid; grid-template-columns: 0 23px 1fr; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: border-color .2s, background .2s; }
.check-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .025); }
.check-card > input { position: absolute; opacity: 0; }
.check-card__box { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: transparent; background: rgba(0, 0, 0, .25); }
.check-card input:checked + .check-card__box { border-color: var(--red); color: #fff; background: var(--red); }
.check-card strong, .check-card small { display: block; }.check-card strong { margin-bottom: 3px; font-size: .83rem; }.check-card small { color: var(--muted); font-size: .72rem; line-height: 1.45; }

/* Dashboard */
.dashboard-hero { position: relative; overflow: hidden; padding: 76px 0 105px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(61, 16, 24, .2), transparent 85%); }
.dashboard-hero::after { position: absolute; top: -200px; right: 5%; width: 540px; height: 540px; border: 1px solid rgba(255, 255, 255, .025); border-radius: 50%; content: ""; box-shadow: 0 0 0 70px rgba(255, 255, 255, .012), 0 0 0 140px rgba(255, 255, 255, .008); }
.dashboard-hero__inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.dashboard-hero h1 { margin-bottom: 12px; font-size: clamp(2.5rem, 5vw, 4.6rem); }
.dashboard-hero p { max-width: 620px; margin: 0; color: var(--muted); }
.dashboard-hero__actions { display: flex; flex: 0 0 auto; gap: 10px; }
.dashboard-content { margin-top: -48px; }
.stats-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; }
.stat-card { position: relative; min-height: 125px; overflow: hidden; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(19, 21, 28, .94); box-shadow: 0 18px 45px rgba(0, 0, 0, .24); }
.stat-card__label { display: block; margin-bottom: 10px; color: var(--muted); font-size: .77rem; font-weight: 650; }
.stat-card strong { font-size: 2.25rem; line-height: 1; }
.stat-card__decoration { position: absolute; right: 18px; bottom: 17px; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; color: var(--red); background: var(--red-soft); transform: rotate(-5deg); }
.stat-card__bar { position: absolute; right: 22px; bottom: 23px; left: 22px; width: calc(100% - 44px); height: 3px; overflow: hidden; border: 0; border-radius: 3px; appearance: none; background: rgba(255, 255, 255, .07); }
.stat-card__bar::-webkit-progress-bar { border-radius: inherit; background: rgba(255, 255, 255, .07); }
.stat-card__bar::-webkit-progress-value { border-radius: inherit; background: var(--red); }
.stat-card__bar::-moz-progress-bar { border-radius: inherit; background: var(--red); }
.stat-card--watching .stat-card__bar::-webkit-progress-value { background: var(--blue); }.stat-card--watching .stat-card__bar::-moz-progress-bar { background: var(--blue); }
.stat-card--watched .stat-card__bar::-webkit-progress-value { background: var(--green); }.stat-card--watched .stat-card__bar::-moz-progress-bar { background: var(--green); }
.clipboard-fallback { position: fixed; inset: 0; opacity: 0; pointer-events: none; }
.collection { padding-top: 72px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 1.8rem; }
.result-count { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, .025); font-size: .7rem; font-weight: 700; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 11px; border-radius: 14px; box-shadow: none; }
.search-control { position: relative; display: flex; flex: 1; align-items: center; }
.search-control .icon { position: absolute; left: 13px; z-index: 1; color: var(--muted); pointer-events: none; }
.search-control input { padding-left: 42px; border-color: transparent; background-color: rgba(0, 0, 0, .18); }
.select-control select { width: 150px; border-color: transparent; background-color: rgba(0, 0, 0, .18); font-size: .8rem; }
.watch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.watch-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 12px 35px rgba(0, 0, 0, .18); transition: transform .28s var(--ease), border-color .28s, box-shadow .28s; }
.watch-card:hover { border-color: rgba(255, 255, 255, .18); box-shadow: 0 20px 50px rgba(0, 0, 0, .34); transform: translateY(-5px); }
.watch-card__poster { position: relative; aspect-ratio: 2 / 2.65; overflow: hidden; background: #101218; }
.watch-card__poster::after { position: absolute; right: 0; bottom: 0; left: 0; height: 35%; content: ""; background: linear-gradient(transparent, rgba(9, 10, 13, .75)); pointer-events: none; }
.watch-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.watch-card:hover .watch-card__poster img { transform: scale(1.035); }
.poster-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #4d505b; background: radial-gradient(circle at 50% 35%, #252832, #101116 70%); }
.poster-fallback span { font-family: Georgia, serif; font-size: 2rem; }.poster-fallback.is-hidden { display: none; }
.media-pill, .rating-pill { position: absolute; z-index: 2; top: 12px; display: inline-flex; min-height: 25px; align-items: center; padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: rgba(255, 255, 255, .88); background: rgba(8, 9, 12, .7); backdrop-filter: blur(8px); font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.media-pill { left: 12px; letter-spacing: .08em; }.rating-pill { right: 12px; gap: 4px; color: #ffd477; }.rating-pill span { font-size: .72rem; }
.watch-card__body { padding: 17px; }
.watch-card__meta { display: flex; min-height: 25px; align-items: center; justify-content: space-between; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.status__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status--planned .status__dot, .status--plan_to_watch .status__dot { background: var(--amber); }.status--watching .status__dot { background: var(--blue); box-shadow: 0 0 8px rgba(102, 168, 255, .7); }.status--watched .status__dot, .status--completed .status__dot { background: var(--green); }.status--dropped .status__dot { background: var(--red); }
.priority { max-width: 78px; overflow: hidden; color: var(--red); font-size: .48rem; letter-spacing: 2px; white-space: nowrap; }
.watch-card h3 { margin: 11px 0 5px; overflow: hidden; font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.watch-card__sub { margin: 0; color: var(--muted); font-size: .72rem; }
.watch-card__notes { display: -webkit-box; min-height: 38px; margin: 12px 0 0; overflow: hidden; color: #9698a0; font-size: .73rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.watch-card__actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.watch-card__actions form { display: flex; }
.empty-state { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; border-radius: var(--radius-lg); text-align: center; }
.empty-state__visual { position: relative; display: grid; width: 90px; height: 90px; margin-bottom: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: rgba(255, 255, 255, .025); }
.empty-state__visual span { position: absolute; inset: -10px; border: 1px dashed rgba(255, 255, 255, .08); border-radius: 50%; animation: spin 18s linear infinite; }
.empty-state h3 { margin-bottom: 9px; font-size: 1.4rem; }.empty-state p { max-width: 440px; margin-bottom: 22px; color: var(--muted); }.empty-state--small { min-height: 240px; box-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 38px; }
.pagination a, .pagination > span { display: grid; min-width: 37px; height: 37px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, .025); font-size: .78rem; }
.pagination a:hover { border-color: var(--line-strong); color: var(--text); }.pagination a.is-current { border-color: var(--red); color: #fff; background: var(--red); }.pagination .is-disabled { opacity: .35; }

/* Add and edit */
.page-hero { position: relative; padding: 80px 0 60px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(61, 16, 24, .16), transparent); }
.page-hero--compact h1 { max-width: 850px; margin: 0 0 12px; font-size: clamp(2.5rem, 5vw, 4.3rem); word-break: break-word; }.page-hero--compact p { max-width: 660px; margin: 0; color: var(--muted); }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 28px; padding-top: 42px; }
.form-panel { padding: clamp(23px, 4vw, 44px); border-radius: var(--radius-lg); }
.item-form { display: grid; gap: 38px; }
.form-section + .form-section { padding-top: 35px; border-top: 1px solid var(--line); }
.form-section { display: grid; gap: 20px; }
.form-section__heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.form-section__number { display: grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255, 77, 85, .25); border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: .68rem; font-weight: 900; }
.form-section__heading h2 { margin: 0 0 5px; font-size: 1.17rem; }.form-section__heading p { margin: 0; color: var(--muted); font-size: .76rem; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 28px; border-top: 1px solid var(--line); }
.form-aside { position: sticky; top: calc(var(--header-height) + 20px); display: grid; gap: 14px; }
.aside-card { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(20, 22, 29, .58); }
.aside-card__icon { display: grid; width: 31px; height: 31px; margin-bottom: 26px; place-items: center; border-radius: 8px; color: var(--red); background: var(--red-soft); font-size: .66rem; font-weight: 900; }
.aside-card h3 { margin-bottom: 8px; font-size: .95rem; }.aside-card p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.edit-poster { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); box-shadow: var(--shadow); }.edit-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.selected-poster { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .17); }
.selected-poster__image { position: relative; display: grid; flex: 0 0 48px; width: 48px; height: 68px; place-items: center; overflow: hidden; border-radius: 7px; color: var(--muted); background: var(--surface-raised); }.selected-poster__image img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }.selected-poster.is-empty img { display: none; }.selected-poster p { margin: 0; color: var(--muted); font-size: .76rem; }
.omdb-results { max-height: 370px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #101218; }
.omdb-result { display: grid; width: 100%; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; padding: 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; transition: background .2s; }.omdb-result:last-child { border-bottom: 0; }.omdb-result:hover { background: rgba(255, 255, 255, .05); }.omdb-result img, .omdb-result__fallback { width: 45px; height: 62px; border-radius: 5px; object-fit: cover; background: var(--surface-raised); }.omdb-result strong, .omdb-result small { display: block; }.omdb-result strong { margin-bottom: 3px; font-size: .82rem; }.omdb-result small { color: var(--muted); font-size: .7rem; }.omdb-result > span:last-child { color: var(--red); font-size: .72rem; font-weight: 750; }
.omdb-message { padding: 18px; color: var(--muted); font-size: .78rem; text-align: center; }

/* Prompt builder */
.prompt-hero { position: relative; overflow: hidden; padding: 95px 0 110px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 75% 40%, rgba(118, 67, 203, .12), transparent 26rem); }
.prompt-hero__inner { display: grid; grid-template-columns: 1.1fr .7fr; align-items: center; gap: 70px; }
.prompt-hero h1 { margin-bottom: 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 6vw, 5.6rem); font-weight: 500; letter-spacing: -.06em; }.prompt-hero h1 em { color: var(--red); font-weight: 500; }.prompt-hero p { max-width: 650px; margin: 0; color: var(--muted); font-size: 1rem; }
.prompt-orbit { position: relative; width: 300px; height: 300px; margin: auto; }
.prompt-orbit__ring { position: absolute; inset: 24px; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 50%; animation: spin 28s linear infinite; }.prompt-orbit__ring::after { position: absolute; top: 20px; right: 25px; width: 9px; height: 9px; border-radius: 50%; content: ""; background: var(--red); box-shadow: 0 0 18px var(--red); }
.prompt-orbit__core { position: absolute; inset: 90px; display: grid; place-items: center; border: 1px solid rgba(170, 140, 255, .25); border-radius: 50%; color: #d2c3ff; background: radial-gradient(circle, rgba(170, 140, 255, .22), rgba(170, 140, 255, .04)); box-shadow: 0 0 70px rgba(170, 140, 255, .15); }
.prompt-orbit__chip { position: absolute; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-soft); background: rgba(17, 18, 24, .88); font-size: .66rem; font-weight: 700; box-shadow: 0 10px 25px rgba(0, 0, 0, .28); }.prompt-orbit__chip--one { top: 29px; left: 20px; }.prompt-orbit__chip--two { right: 0; bottom: 72px; }.prompt-orbit__chip--three { bottom: 20px; left: 26px; }
.prompt-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 24px; margin-top: -45px; }
.prompt-builder, .prompt-output { min-height: 610px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); }
.panel-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }.panel-heading--between { justify-content: space-between; }.panel-heading__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--red); background: var(--red-soft); }.panel-heading h2 { margin: 0 0 5px; font-size: 1.25rem; }.panel-heading p { margin: 0; color: var(--muted); font-size: .76rem; }
.prompt-output { display: flex; flex-direction: column; }.prompt-output .panel-heading { min-height: 44px; }.generated-prompt { flex: 1; max-height: 490px; margin: 0; overflow: auto; padding: 23px; border: 1px solid var(--line); border-radius: 12px; color: #d5d3cf; background: rgba(3, 4, 7, .55); font: .81rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }.prompt-output__tip { display: flex; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: .73rem; }
.output-placeholder { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }.output-placeholder > div { display: grid; width: 74px; height: 74px; margin-bottom: 24px; place-items: center; border: 1px solid rgba(170, 140, 255, .2); border-radius: 50%; color: var(--purple); background: rgba(170, 140, 255, .06); }.output-placeholder h3 { margin-bottom: 8px; }.output-placeholder p { max-width: 330px; color: var(--muted); font-size: .81rem; }.output-placeholder__line { width: 70%; height: 5px; margin-top: 18px; border-radius: 4px; background: rgba(255, 255, 255, .04); }.output-placeholder__line--short { width: 45%; margin-top: 9px; }

/* Admin */
.admin-page { --red: #ff5a61; }
.admin-hero { padding: 72px 0 92px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(90, 21, 30, .16), transparent); }.admin-hero--small { padding-bottom: 60px; }.admin-hero__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }.admin-hero h1 { margin: 11px 0 9px; font-size: clamp(2.6rem, 5vw, 4.6rem); }.admin-hero p { margin: 0; color: var(--muted); }
.admin-badge { display: inline-flex; min-height: 25px; align-items: center; padding: 4px 9px; border: 1px solid rgba(255, 77, 85, .25); border-radius: 999px; color: #ff858b; background: var(--red-soft); font-size: .64rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.admin-content { margin-top: -42px; }.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }.admin-stats article { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(20, 22, 29, .96); box-shadow: 0 18px 45px rgba(0, 0, 0, .22); }.admin-stats span, .admin-stats small { display: block; color: var(--muted); }.admin-stats span { margin-bottom: 10px; font-size: .76rem; font-weight: 700; }.admin-stats strong { display: block; margin-bottom: 7px; font-size: 2rem; }.admin-stats small { font-size: .67rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }.admin-panel { min-width: 0; padding: 26px; border-radius: var(--radius-lg); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }.user-list, .activity-list { display: grid; }.user-row, .activity-row { display: grid; min-width: 0; align-items: center; gap: 11px; padding: 12px 5px; border-top: 1px solid var(--line); }.user-row { grid-template-columns: auto minmax(0, 1fr) auto auto; transition: background .2s; }.user-row:hover { background: rgba(255, 255, 255, .025); }.user-row__identity, .user-row__identity strong, .user-row__identity small, .activity-row__main, .activity-row__main strong, .activity-row__main small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.user-row__identity strong, .activity-row__main strong { font-size: .8rem; }.user-row__identity small, .activity-row__main small, .user-row time { color: var(--muted); font-size: .67rem; }.activity-row { grid-template-columns: 38px minmax(0, 1fr) auto; }.activity-row__poster { display: grid; width: 34px; height: 44px; place-items: center; overflow: hidden; border-radius: 5px; color: var(--muted); background: var(--surface-raised); }.activity-row__poster img { width: 100%; height: 100%; object-fit: cover; }.mini-empty { padding: 55px 20px; color: var(--muted); font-size: .8rem; text-align: center; }
.account-state, .role-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .63rem; font-weight: 750; white-space: nowrap; }.account-state--active { border-color: rgba(84, 214, 155, .2); color: var(--green); background: rgba(84, 214, 155, .07); }.account-state--inactive { border-color: rgba(255, 77, 85, .2); color: #ff777e; background: var(--red-soft); }.role-badge--admin { border-color: rgba(170, 140, 255, .24); color: #c4afff; background: rgba(170, 140, 255, .08); }.role-badge--user { color: var(--muted); background: rgba(255, 255, 255, .03); }
.admin-search { margin-top: 0; }.table-panel { overflow: hidden; border-radius: var(--radius-lg); box-shadow: 0 18px 45px rgba(0, 0, 0, .22); }.table-panel__header { display: flex; align-items: center; justify-content: space-between; padding: 23px 25px; border-bottom: 1px solid var(--line); }.table-panel__header h2 { margin: 0; font-size: 1.1rem; }.table-panel__header span { color: var(--muted); font-size: .73rem; }.table-scroll { overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; text-align: left; }.data-table th { padding: 12px 18px; color: var(--muted); background: rgba(0, 0, 0, .12); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.data-table td { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: .76rem; white-space: nowrap; }.data-table tbody tr { transition: background .2s; }.data-table tbody tr:hover { background: rgba(255, 255, 255, .023); }.table-user { display: flex; min-width: 210px; align-items: center; gap: 10px; }.table-user strong, .table-user small { display: block; }.table-user strong { color: var(--text); font-size: .78rem; }.table-user small { max-width: 210px; overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; }
.profile-heading { display: flex; align-items: center; gap: 22px; }.profile-heading h1 { margin-top: 8px; }.detail-grid { display: grid; grid-template-columns: 370px minmax(0, 1fr); align-items: start; gap: 20px; }.profile-card, .profile-items { padding: 26px; border-radius: var(--radius-lg); }.detail-list { margin: 0; }.detail-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }.detail-list dt { color: var(--muted); font-size: .72rem; }.detail-list dd { min-width: 0; margin: 0; overflow: hidden; color: var(--text-soft); font-size: .76rem; text-overflow: ellipsis; }.admin-actions { display: grid; gap: 9px; margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }.self-notice { margin: 0; padding: 12px; border: 1px solid rgba(242, 180, 95, .15); border-radius: 10px; color: var(--amber); background: rgba(242, 180, 95, .06); font-size: .72rem; }.profile-item-list { display: grid; }.profile-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }.profile-item__poster { display: grid; width: 38px; height: 52px; place-items: center; overflow: hidden; border-radius: 5px; color: var(--muted); background: var(--surface-raised); }.profile-item__poster img { width: 100%; height: 100%; object-fit: cover; }.profile-item h3 { margin: 0 0 3px; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }.profile-item p { margin: 0; color: var(--muted); font-size: .67rem; }.item-score { color: var(--amber); font-size: .72rem; }

/* Error pages */
.error-page { display: flex; min-height: calc(100vh - var(--header-height) - 190px); flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; text-align: center; }.error-page__code { position: relative; color: transparent; background: linear-gradient(180deg, rgba(255, 77, 85, .8), rgba(255, 77, 85, .06)); background-clip: text; font-family: Georgia, serif; font-size: clamp(7rem, 18vw, 14rem); font-weight: 800; line-height: .8; -webkit-background-clip: text; }.error-page h1 { margin: 35px 0 12px; font-size: clamp(1.8rem, 4vw, 3rem); }.error-page p { max-width: 500px; margin-bottom: 25px; color: var(--muted); }

@media (max-width: 1080px) {
  .watch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: minmax(0, .9fr) minmax(390px, 1fr); gap: 45px; }
  .poster-stack { display: none; }
  .admin-grid, .prompt-layout { grid-template-columns: 1fr; }
  .prompt-output { min-height: 500px; }
  .detail-grid { grid-template-columns: 330px minmax(0, 1fr); }
}

@media (max-width: 840px) {
  :root { --header-height: 68px; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: calc(100% + 1px); right: 14px; left: 14px; display: none; flex-direction: column; align-items: stretch; gap: 3px; padding: 13px; border: 1px solid var(--line); border-radius: 0 0 15px 15px; background: rgba(14, 16, 21, .98); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; animation: nav-in .22s var(--ease); }
  @keyframes nav-in { from { opacity: 0; transform: translateY(-7px); } }
  .site-nav__link { padding: 11px; }.site-nav__link.is-active::after { display: none; }.nav-profile { margin: 7px 0 0; padding: 12px 8px 5px; border-top: 1px solid var(--line); border-left: 0; }.nav-logout .button { width: 100%; }
  .nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(6px) rotate(45deg); }.nav-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }.nav-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }
  .auth-shell { min-height: auto; grid-template-columns: 1fr; gap: 35px; padding-block: 52px; }.auth-story { text-align: center; }.auth-story h1 { margin-inline: auto; font-size: clamp(2.7rem, 11vw, 4.5rem); }.auth-story > p { margin-inline: auto; }.auth-story__eyebrow { justify-content: center; }.feature-ticks { display: none; }.auth-card { max-width: 560px; margin: auto; }
  .dashboard-hero { padding: 55px 0 85px; }.dashboard-hero__inner, .admin-hero__inner { align-items: flex-start; flex-direction: column; }.stats-grid, .admin-stats { grid-template-columns: repeat(2, 1fr); }.watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.filter-bar { flex-wrap: wrap; }.filter-bar .search-control { flex-basis: 100%; }.select-control { flex: 1; }.select-control select { width: 100%; }
  .form-layout { grid-template-columns: 1fr; }.form-aside { position: static; grid-template-columns: repeat(2, 1fr); }.edit-poster { display: none; }
  .prompt-hero { padding: 68px 0 85px; }.prompt-hero__inner { grid-template-columns: 1fr; }.prompt-orbit { display: none; }
  .detail-grid { grid-template-columns: 1fr; }.profile-card { order: 2; }.profile-items { order: 1; }
  .site-footer__inner { min-height: 130px; flex-direction: column; justify-content: center; gap: 9px; text-align: center; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .site-header .brand { font-size: 1rem; }.site-header .brand__mark { width: 27px; height: 27px; }
  .flash-region { right: 11px; width: calc(100% - 22px); }
  .auth-shell { padding-block: 35px; }.auth-story h1 { font-size: 2.65rem; }.auth-story > p { font-size: .9rem; }.auth-card { padding: 24px 19px; }.form-grid--two, .form-grid--three { grid-template-columns: 1fr; }
  .dashboard-hero h1, .admin-hero h1 { font-size: 2.6rem; }.dashboard-hero__actions { width: 100%; flex-direction: column; }.dashboard-hero__actions .button { width: 100%; }.stats-grid, .admin-stats { grid-template-columns: 1fr 1fr; gap: 8px; }.stat-card, .admin-stats article { min-height: 106px; padding: 17px; }.stat-card strong, .admin-stats strong { font-size: 1.65rem; }.stat-card__decoration { width: 39px; height: 39px; }.collection { padding-top: 52px; }.watch-grid { grid-template-columns: 1fr; }.watch-card { display: grid; grid-template-columns: 118px minmax(0, 1fr); }.watch-card__poster { height: 100%; min-height: 200px; aspect-ratio: auto; }.watch-card__body { display: flex; min-width: 0; flex-direction: column; padding: 14px; }.watch-card__actions { margin-top: auto; }.watch-card__notes { display: none; }.media-pill { top: 8px; left: 8px; }.rating-pill { top: auto; right: 8px; bottom: 8px; }
  .filter-bar > .button--secondary { flex: 1; }.section-heading { align-items: flex-start; }
  .page-hero { padding: 55px 0 45px; }.page-hero--compact h1 { font-size: 2.4rem; }.form-layout { padding-top: 24px; }.form-panel { padding: 22px 17px; }.input-action { grid-template-columns: 1fr; }.form-aside { grid-template-columns: 1fr; }.form-actions { align-items: stretch; flex-direction: column-reverse; }.form-actions .button { width: 100%; }
  .prompt-hero h1 { font-size: 2.85rem; }.prompt-layout { margin-top: -30px; }.prompt-builder, .prompt-output { min-height: auto; padding: 22px 17px; }.prompt-output { min-height: 440px; }.panel-heading--between { align-items: flex-start; }.generated-prompt { min-height: 330px; padding: 16px; }
  .admin-hero { padding: 52px 0 70px; }.admin-content { margin-top: -28px; }.admin-grid { gap: 12px; }.admin-panel, .profile-card, .profile-items { padding: 20px 16px; }.user-row { grid-template-columns: auto minmax(0, 1fr) auto; }.user-row time { display: none; }.activity-row .status { display: none; }.profile-heading { align-items: flex-start; flex-direction: column; }.avatar--hero { width: 64px; height: 64px; font-size: 1.4rem; }.profile-item { grid-template-columns: 38px minmax(0, 1fr) auto; }.profile-item .status { display: none; }.detail-list > div { grid-template-columns: 90px 1fr; }
  .error-page { min-height: 65vh; }
}

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