/* ==========================================================================
   CINEMATRIX · Interfaz estilo plataforma de streaming
   ========================================================================== */

:root {
    --bg: #141414;
    --bg-deep: #000;
    --surface: #181818;
    --surface-2: #232323;
    --surface-3: #2f2f2f;
    --line: #333;
    --line-soft: #262626;
    --text: #fff;
    --text-2: #e5e5e5;
    --muted: #a3a3a3;
    --muted-2: #808080;
    --brand: #e50914;
    --brand-hover: #c11119;
    --match: #46d369;
    --gold: #f5c518;
    --danger: #e87c03;
    --error: #eb3942;
    --radius: 6px;
    --nav-h: 68px;
    --gutter: clamp(16px, 4vw, 60px);
    --font: "Helvetica Neue", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow: 0 10px 40px rgba(0, 0, 0, .6);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text); font-family: var(--font);
    font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p a, .muted a, .page-sub a, .eyebrow a, .auth-alt a, .explain a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
code { background: var(--surface-3); padding: .1rem .4rem; border-radius: 4px; font-size: .9em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: #fff; color: #000; padding: .5rem 1rem; border-radius: 4px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- Marca ---------- */
.brand {
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem); letter-spacing: -.02em; color: var(--brand);
    text-transform: uppercase; text-decoration: none !important; flex: none;
    transform: scaleY(1.12); display: inline-block;
}
.brand-sm { font-size: 1.2rem; }
.brand-mark {
    display: inline-grid; place-items: center; width: 1.3em; height: 1.6em; margin-right: .4rem;
    font-family: "Arial Black", Arial, sans-serif; font-weight: 900; color: var(--brand); font-size: 1.1em;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .6rem 1.35rem; border: 1px solid transparent; border-radius: 4px;
    font-weight: 700; font-size: 1rem; line-height: 1.2; white-space: nowrap;
    text-decoration: none !important; transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-hover); }
.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: rgba(255, 255, 255, .75); }
.btn-gray { background: rgba(109, 109, 110, .7); color: #fff; }
.btn-gray:hover { background: rgba(109, 109, 110, .45); }
.btn-ghost { background: rgba(0, 0, 0, .25); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-danger { background: #b3261e; color: #fff; }
.btn-danger:hover { background: #8c1d17; }
.btn-danger-text { color: #ff8a80; }
.btn-sm { padding: .4rem .85rem; font-size: .875rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1.1rem; }
.btn-xl { padding: .9rem 1.9rem; font-size: 1.4rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.btn-circle {
    display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: rgba(42, 42, 42, .6);
    color: #fff; transition: border-color .2s, background .2s, transform .2s;
}
.btn-circle:hover { border-color: #fff; text-decoration: none; }
.btn-circle .icon { width: 16px; height: 16px; }
.btn-circle-light { background: #fff; border-color: #fff; color: #000; }
.btn-circle-light:hover { background: rgba(255, 255, 255, .8); }
.btn-more { margin-left: auto; }
.btn-icon {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 4px;
    border: 1px solid var(--line); background: transparent; color: var(--text-2);
}
.btn-icon:hover { background: var(--surface-3); color: #fff; }
.btn-icon-danger:hover { background: #5c1a16; border-color: #8c1d17; color: #fff; }
.link-danger { background: none; border: 0; color: var(--muted); padding: .4rem 0; display: inline-flex; gap: .35rem; align-items: center; font-size: .9rem; }
.link-danger:hover { color: #ff8a80; }

.watch-btn .when-on { display: none; }
.watch-btn.is-on .when-on { display: inline-flex; align-items: center; gap: .55rem; }
.watch-btn.is-on .when-off { display: none; }
.watch-btn .when-off { display: inline-flex; align-items: center; gap: .55rem; }
.btn-circle.watch-btn.is-on { border-color: #fff; }
.watch-form { display: contents; }

/* ---------- Navegación ---------- */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
    background: linear-gradient(180deg, rgba(0, 0, 0, .75) 10%, transparent);
    transition: background .4s;
}
.nav.is-scrolled, .page-default .nav, .page-error .nav { background: var(--bg); }
.nav-inner { height: 100%; padding: 0 var(--gutter); display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.nav-links { display: flex; gap: clamp(12px, 1.6vw, 22px); }
.nav-link { font-size: .9rem; color: var(--text-2); transition: color .3s; white-space: nowrap; }
.nav-link:hover { color: #b3b3b3; text-decoration: none; }
.nav-link.is-active { color: #fff; font-weight: 700; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-icon { display: inline-grid; place-items: center; color: #fff; }
.nav-icon .icon { width: 22px; height: 22px; }
.nav-icon.is-active { color: var(--brand); }

.nav-search { position: relative; display: flex; align-items: center; border: 1px solid transparent; transition: border-color .3s, background .3s; }
.nav-search-toggle { background: none; border: 0; padding: 4px; color: #fff; display: grid; place-items: center; }
.nav-search-toggle .icon { width: 22px; height: 22px; }
.nav .nav-search input[type=search] {
    width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff; outline: none; box-shadow: none;
    font-size: .9rem; transition: width .3s var(--ease), padding .3s;
}
.nav-search.is-open { border-color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .75); }
.nav .nav-search.is-open input[type=search] { width: min(240px, 46vw); padding: 6px 8px 6px 2px; }
.suggest {
    position: absolute; top: calc(100% + 6px); right: 0; width: min(340px, 90vw);
    background: rgba(0, 0, 0, .95); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden;
}
.suggest a { display: flex; gap: 12px; align-items: center; padding: 8px 12px; }
.suggest a:hover, .suggest a.is-active { background: var(--surface-3); text-decoration: none; }
.suggest img, .suggest .thumb { width: 36px; height: 54px; object-fit: cover; border-radius: 2px; background: var(--surface-3); }
.suggest small { color: var(--muted); display: block; }
.suggest .suggest-all { justify-content: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: #fff; }
.dropdown-toggle .caret { width: 16px; height: 16px; transition: transform .25s; }
.dropdown.is-open .caret { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 14px); min-width: 240px; padding: 8px 0;
    background: rgba(0, 0, 0, .94); border: 1px solid rgba(255, 255, 255, .15); border-radius: 2px;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.dropdown-menu::before { content: ""; position: absolute; top: -8px; right: 22px; border: 8px solid transparent; border-top: 0; border-bottom-color: #fff; opacity: .9; }
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { display: flex; gap: 12px; align-items: center; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head small { display: block; color: var(--muted); font-size: .8rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.dropdown-menu a, .dropdown-menu button {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; background: none; border: 0;
    font-size: .875rem; color: var(--text-2); text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { text-decoration: underline; color: #fff; }
.dropdown-menu .icon { color: var(--muted); }
.dropdown-menu form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* ---------- Avatares ---------- */
.avatar {
    display: inline-grid; place-items: center; flex: none; border-radius: 4px;
    background: var(--avatar, var(--brand)); color: #fff; font-weight: 800; letter-spacing: -.02em;
    width: 40px; height: 40px; font-size: .95rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.avatar-xs { width: 22px; height: 22px; font-size: .6rem; border-radius: 3px; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.6rem; border-radius: 8px; }

/* ---------- Contenido general ---------- */
.app-main { flex: 1; padding-top: var(--nav-h); }
.page-browse .app-main, .page-movie .app-main { padding-top: 0; }
.page { padding: 32px var(--gutter) 48px; }
.page-narrow { max-width: 980px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 12px 0 24px; }
.page-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin: .45rem 0 0; max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section { margin: 40px 0; }
.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: .6rem; }
.count { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--surface-3); border-radius: 999px; padding: .1rem .55rem; }
.fine-print { color: var(--muted-2); font-size: .8rem; margin-top: 32px; max-width: 760px; }

.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 24px; margin-bottom: 20px; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.panel-danger { border-color: #5c1a16; background: linear-gradient(180deg, #1f1212, var(--surface)); }
.stack { display: grid; gap: 16px; }

.nudge {
    display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin: 0 0 28px;
    background: linear-gradient(90deg, rgba(229, 9, 20, .22), rgba(35, 35, 35, .9) 60%); border: 1px solid rgba(229, 9, 20, .35);
    border-radius: 6px; color: var(--text-2);
}
.nudge > div { flex: 1; }
.nudge-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(229, 9, 20, .25); color: #fff; flex: none; }

.alert { display: flex; gap: .6rem; align-items: center; padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; }
.alert-error { background: #3b1414; border: 1px solid #6b1f1f; color: #ffc9c9; }

/* ---------- Hero (inicio) ---------- */
.hero {
    position: relative; min-height: 560px; height: min(90vh, 56.25vw); display: flex; align-items: flex-end;
    padding-bottom: calc(9vw + 48px);
    background: var(--bg) var(--hero-img) center 20% / cover no-repeat;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(77deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
}
.hero::after {
    content: ""; position: absolute; inset: auto 0 0; height: 40%;
    background: linear-gradient(180deg, transparent, rgba(20, 20, 20, .6) 50%, var(--bg));
}
.hero-content { position: relative; z-index: 1; padding: var(--nav-h) var(--gutter) 0; max-width: min(680px, 92vw); }
.hero-kicker { display: flex; align-items: center; margin: 0 0 .8rem; font-size: .95rem; font-weight: 700; letter-spacing: .02em; color: var(--text-2); text-shadow: 1px 1px 3px rgba(0, 0, 0, .7); }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 4.4rem); font-weight: 900; letter-spacing: -.02em; text-shadow: 2px 2px 8px rgba(0, 0, 0, .45); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 1rem 0; font-size: 1rem; color: var(--text-2); }
.hero-overview { font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.45; text-shadow: 1px 1px 4px rgba(0, 0, 0, .6); margin: 0 0 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.match { color: var(--match); font-weight: 700; }
.pill { border: 1px solid rgba(255, 255, 255, .4); padding: 0 .45rem; border-radius: 3px; font-size: .85em; }
.score { display: inline-flex; align-items: center; gap: .2rem; color: var(--text-2); font-weight: 600; }
.score .icon { color: var(--gold); width: 1em; height: 1em; }

/* ---------- Filas ---------- */
.rows { position: relative; z-index: 2; margin-top: -9vw; padding-bottom: 40px; }
.rows-no-hero { margin-top: 0; padding-top: 32px; }
.rows > .empty, .rows > .nudge { margin-left: var(--gutter); margin-right: var(--gutter); }
.row { margin: 0 0 2.6vw; }
.row-head { padding: 0 var(--gutter); }
.row-title { font-size: clamp(1.05rem, 1.5vw, 1.45rem); font-weight: 700; color: var(--text-2); margin-bottom: .2rem; }
.row-title a { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.row-more { display: inline-flex; align-items: center; gap: .1rem; font-size: .8rem; color: #54b9c5; opacity: 0; transform: translateX(-12px); transition: opacity .3s, transform .3s; }
.row-title a:hover .row-more { opacity: 1; transform: none; }
.row-viewport { position: relative; }
.row-track {
    --per-row: 6; --gap: 8px;
    display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    padding: 18px var(--gutter) 22px; scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > .card { flex: 0 0 calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); scroll-snap-align: start; }
.row-backdrop .row-track { --per-row: 4; }
.row-top10 .row-track { --per-row: 5; }
.row-arrow {
    position: absolute; top: 18px; bottom: 22px; z-index: 5; width: calc(var(--gutter) - 6px); min-width: 28px;
    display: grid; place-items: center; border: 0; background: rgba(20, 20, 20, .55); color: #fff;
    opacity: 0; transition: opacity .2s, background .2s;
}
.row-arrow .icon { width: 38px; height: 38px; transition: transform .2s; }
.row-arrow:hover { background: rgba(20, 20, 20, .8); }
.row-arrow:hover .icon { transform: scale(1.25); }
.row-prev { left: 0; border-radius: 0 4px 4px 0; }
.row-next { right: 0; border-radius: 4px 0 0 4px; }
.row-viewport:hover .row-arrow:not([disabled]) { opacity: 1; }
.row-arrow[disabled] { opacity: 0 !important; pointer-events: none; }

/* ---------- Tarjetas ---------- */
.card { position: relative; min-width: 0; }
.card-frame {
    position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2);
    transition: transform .3s var(--ease), box-shadow .3s; transform-origin: center;
}
.card-media { display: block; aspect-ratio: 2 / 3; position: relative; }
.card-backdrop .card-media { aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-fallback {
    display: grid; place-items: center; width: 100%; height: 100%; padding: 12px; text-align: center;
    font-weight: 800; font-size: 1.05rem; color: var(--text-2); background: linear-gradient(135deg, #2b2b2b, #151515);
}
.card-caption {
    position: absolute; inset: auto 0 0; padding: 28px 12px 10px; font-weight: 800; font-size: 1.05rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85)); text-shadow: 0 1px 3px #000;
}
.card-badge {
    position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: .15rem;
    padding: .1rem .4rem; border-radius: 3px; background: rgba(0, 0, 0, .8); font-size: .8rem; font-weight: 700;
}
.card-badge .icon { color: var(--gold); width: .9em; height: .9em; }
.card-panel {
    position: absolute; inset: auto 0 0; padding: 40px 10px 10px; display: grid; gap: 6px;
    background: linear-gradient(180deg, transparent, rgba(10, 10, 10, .92) 32%, #141414);
    opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .3s var(--ease);
    pointer-events: none;
}
.card-actions { display: flex; gap: 6px; align-items: center; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: .78rem; }
.card-title { font-size: .9rem; font-weight: 700; line-height: 1.25; }
.card-title a { text-decoration: none; }
.card-genres { margin: 0; font-size: .75rem; color: var(--text-2); }
.card-under { padding: 8px 2px 0; font-size: .85rem; }
.card-reason { margin: .15rem 0 0; display: flex; gap: .35rem; align-items: flex-start; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.card-reason .icon { color: var(--brand); width: 1em; height: 1em; margin-top: .1rem; }

@media (hover: hover) and (min-width: 600px) {
    .card:hover, .card:focus-within { z-index: 10; }
    .card:hover .card-frame, .card:focus-within .card-frame { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0, 0, 0, .75); }
    .card:hover .card-panel, .card:focus-within .card-panel { opacity: 1; transform: none; pointer-events: auto; }
    .row-track > .card:first-child:hover .card-frame { transform-origin: left center; }
    .row-track > .card:last-child:hover .card-frame { transform-origin: right center; }
}
@media (hover: none), (max-width: 599px) {
    .card-panel { display: none; }
}

/* Top 10 */
.card-top10 { display: flex; align-items: flex-end; }
.card-top10 .rank {
    flex: 0 0 44%; margin-right: -5%; text-align: right; font-family: "Arial Black", Arial, sans-serif; font-weight: 900;
    font-size: clamp(6rem, 13vw, 13.5rem); line-height: .74; letter-spacing: -.1em; color: var(--bg);
    -webkit-text-stroke: 7px #6b6b6b; paint-order: stroke fill; user-select: none;
}
.card-top10:hover .rank { -webkit-text-stroke-color: #9a9a9a; }
.card-top10 .card-frame { flex: 1; }

/* Cuadrícula */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 14vw, 200px), 1fr)); gap: 28px 10px; }
.grid-cards .card-panel { padding-top: 48px; }
.card-wrap { display: grid; gap: 4px; align-content: start; }

/* ---------- Ficha de película ---------- */
.detail-hero {
    position: relative; min-height: 78vh; display: flex; align-items: flex-end;
    background: var(--surface) var(--hero-img) center 20% / cover no-repeat;
}
.detail-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 20, 20, .97) 0%, rgba(20, 20, 20, .8) 45%, rgba(20, 20, 20, .3) 100%); }
.detail-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.detail-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(24px, 4vw, 56px); padding: calc(var(--nav-h) + 48px) var(--gutter) 40px; width: 100%; max-width: 1400px; }
.detail-poster { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 2 / 3; background: var(--surface-2); align-self: start; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; }
.detail-info { max-width: 820px; }
.detail-overview { font-size: 1.1rem; line-height: 1.6; color: var(--text-2); margin: 1.1rem 0 1.5rem; }
.detail-scores { display: flex; flex-wrap: wrap; gap: 28px; margin: 1rem 0 1.2rem; }
.score-block { display: flex; align-items: center; gap: 12px; }
.score-block small { display: block; color: var(--muted); font-size: .82rem; }
.score-big { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.score-block-muted .score-big { font-size: 1.8rem; color: var(--text-2); }
.detail-body { padding-top: 8px; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.page .row-head, .page .row-track { padding-left: 0; padding-right: 0; scroll-padding: 0; }
.page .row-arrow { width: 44px; }
.inline-select select { min-width: 220px; }

/* Estrellas */
.stars { display: inline-flex; gap: 1px; font-size: 1.05rem; line-height: 1; vertical-align: -.1em; }
.star { position: relative; color: #4d4d4d; }
.star::before { content: "★"; position: absolute; inset: 0; width: var(--fill); overflow: hidden; color: var(--gold); }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: #4d4d4d; transition: color .15s, transform .15s; }
.star-input label .icon { width: 40px; height: 40px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid #fff; border-radius: 4px; }
.star-caption { margin: .3rem 0 0; font-weight: 700; color: var(--text-2); min-height: 1.5em; }
.rate-form { display: grid; gap: 12px; }
.review-label { font-size: .85rem; color: var(--muted); font-weight: 600; }

.dist { display: grid; gap: 8px; }
.dist-row { display: grid; grid-template-columns: 44px 1fr 40px; gap: 10px; align-items: center; font-size: .9rem; color: var(--text-2); }
.dist-row .icon { color: var(--gold); width: .9em; height: .9em; }
.dist-bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.dist-bar > span { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.dist-n { text-align: right; color: var(--muted); }

.reviews { display: grid; gap: 12px; }
.review { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.review-user { display: flex; gap: 12px; align-items: center; align-self: start; text-decoration: none !important; }
.review-user small { display: block; color: var(--muted); font-size: .8rem; }
.review-body p { margin: .5rem 0 0; color: var(--text-2); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; padding: .7rem .85rem; background: #0f0f0f; border: 1px solid #444; border-radius: 4px; color: #fff;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem; }
textarea { resize: vertical; min-height: 90px; }
.hint { margin: -6px 0 0; font-size: .8rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field-inline { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; }
.field-inline .icon { position: absolute; left: .8rem; color: var(--muted); pointer-events: none; }
.field-inline input { padding-left: 2.5rem !important; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select { width: auto; }
.filters-bar { margin-bottom: 16px; }
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.toolbar-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-form > select, .toolbar-form > input { flex: 1; min-width: 180px; width: auto; }

.segmented { display: inline-flex; background: #0f0f0f; border: 1px solid #444; border-radius: 4px; padding: 3px; width: fit-content; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 3px; cursor: pointer; color: var(--muted); font-weight: 600; }
.segmented input:checked + span { background: var(--surface-3); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid #fff; }

.strength { height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: -8px; }
.strength span { display: block; height: 100%; width: 0; background: var(--error); transition: width .3s, background .3s; }

/* Campos flotantes (autenticación) */
.float-field { position: relative; display: block; }
.float-field input {
    height: 56px; padding: 22px 16px 6px !important; background: rgba(22, 22, 22, .7) !important;
    border: 1px solid rgba(128, 128, 128, .7) !important; border-radius: 4px; font-size: 1rem;
}
.float-field input:focus { border-color: #fff !important; box-shadow: 0 0 0 1px #fff; }
.float-field > span {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .7);
    pointer-events: none; transition: all .15s var(--ease); font-size: 1rem;
}
.float-field input:focus + span, .float-field input:not(:placeholder-shown) + span { top: 14px; font-size: .75rem; transform: none; }
.reveal { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: .8rem; font-weight: 700; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin-bottom: 24px; scrollbar-width: thin; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border: 1px solid #555; border-radius: 999px;
    font-size: .88rem; color: var(--text-2); white-space: nowrap; background: rgba(0, 0, 0, .3); text-decoration: none !important;
}
a.chip:hover { border-color: #fff; color: #fff; }
.chip small { color: var(--muted); }
.chip.is-active { background: #fff; color: #000; border-color: #fff; }
.chip.is-active small { color: #555; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span {
    display: inline-flex; align-items: center; gap: .35rem; padding: .45rem 1rem; border: 1px solid #555; border-radius: 999px;
    cursor: pointer; user-select: none; transition: all .15s; font-size: .92rem;
}
.chip-check .icon { width: 0; opacity: 0; transition: width .15s, opacity .15s; }
.chip-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-check input:checked + span .icon { width: 1em; opacity: 1; }
.chip-check input:focus-visible + span { outline: 2px solid #fff; }
.chips-lg .chip-check span { padding: .7rem 1.3rem; font-size: 1.05rem; }

/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; gap: .45rem; align-items: center; padding: .75rem 1rem; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: #fff; }
.tab.is-active { color: #fff; border-bottom-color: var(--brand); }
.tabs-sticky { position: sticky; top: var(--nav-h); z-index: 20; background: var(--bg); }

/* Paginación */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 36px 0 8px; color: var(--muted); }
.pagination a { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; }
.pagination a:hover { border-color: #fff; color: #fff; }
.pagination a.is-current { background: #fff; color: #000; border-color: #fff; font-weight: 700; }

/* Estado vacío */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); margin-bottom: 14px; }
.empty-icon .icon { width: 28px; height: 28px; }
.empty h2 { color: #fff; font-size: 1.3rem; margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 460px; }

/* ---------- Notificaciones ---------- */
.flash-stack, .toast-stack { position: fixed; top: calc(var(--nav-h) + 12px); right: 20px; z-index: 300; display: grid; gap: 10px; width: min(420px, calc(100vw - 40px)); }
.toast-stack { top: auto; bottom: 20px; }
.toast {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; background: #1f1f1f; border-left: 4px solid var(--match);
    border-radius: 4px; box-shadow: var(--shadow); animation: toast-in .35s var(--ease);
}
.toast-error { border-left-color: var(--error); }
.toast-info { border-left-color: #54b9c5; }
.toast-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--match); color: #000; flex: none; margin-top: 1px; }
.toast-icon .icon { width: 14px; height: 14px; stroke-width: 3; }
.toast-error .toast-icon { background: var(--error); color: #fff; }
.toast-info .toast-icon { background: #54b9c5; }
.toast-text { flex: 1; font-size: .93rem; }
.toast-close { background: none; border: 0; color: var(--muted); padding: 0; display: grid; }
.toast-close:hover { color: #fff; }
.toast.is-leaving { animation: toast-out .3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Comunidad y perfiles ---------- */
.stat-inline { display: flex; gap: 28px; flex-wrap: wrap; }
.stat-inline > div { display: grid; }
.stat-inline strong { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat-inline span { color: var(--muted); font-size: .82rem; }
.community-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.community-side { position: sticky; top: calc(var(--nav-h) + 16px); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed-item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.feed-poster { aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.feed-poster img { width: 100%; height: 100%; object-fit: cover; }
.feed-body p { margin: 0 0 .3rem; }
.feed-line { color: var(--muted); }
.feed-line strong { color: #fff; }
.feed-user { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-weight: 700; }
.feed blockquote { margin: .4rem 0 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--text-2); font-style: italic; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; border-radius: 6px; }
.people li:hover { background: var(--surface-2); }
.people a { display: flex; gap: 12px; align-items: center; min-width: 0; text-decoration: none !important; }
.people small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 24px 0 32px; border-bottom: 1px solid var(--line-soft); }
.profile-head > .btn { grid-column: 3; justify-self: end; }
.profile-quote { font-size: 1.15rem; font-style: italic; color: var(--text-2); margin: .5rem 0; }
.profile-bio { color: var(--muted); margin: .3rem 0 .8rem; max-width: 640px; }
.list-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.list-card { display: grid; padding: 14px 18px; border-radius: 6px; background: var(--surface-2); min-width: 200px; text-decoration: none !important; }
.list-card:hover { background: var(--surface-3); }
.list-card small { color: var(--muted); }

.rating-list { display: grid; }
.rating-item { display: grid; grid-template-columns: 70px 1fr auto; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.rating-poster { aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.rating-poster img { width: 100%; height: 100%; object-fit: cover; }
.rating-poster .card-fallback { font-size: .6rem; }
.rating-item h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.rating-item p { margin: 0 0 .3rem; }
.rating-review { color: var(--text-2); font-style: italic; }
.rating-compare { font-size: .85rem; color: var(--muted); }
.rating-actions { display: flex; gap: 8px; }

.explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.explain-item { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); font-size: .9rem; }
.explain-num { font-size: 2rem; font-weight: 900; color: #fff; line-height: 1; }

/* Colecciones */
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.collection { display: grid; background: var(--surface); border-radius: 8px; overflow: hidden; border: 1px solid var(--line-soft); text-decoration: none !important; transition: transform .25s var(--ease), border-color .25s; }
.collection:hover { transform: translateY(-4px); border-color: #555; }
.collection-cover { display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 16 / 7; background: var(--surface-2); }
.collection-cover span { background: var(--surface-3) center / cover; border-right: 1px solid var(--bg); }
.collection-body { padding: 14px 16px 16px; }
.collection-body h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.collection-body p { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.collection-body small { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; color: var(--muted-2); font-size: .8rem; }
.members { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.member { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .4rem .25rem .3rem; background: var(--surface-2); border-radius: 999px; font-size: .88rem; }
.member button { background: none; border: 0; color: var(--muted); padding: 0 .2rem; display: grid; }
.member button:hover { color: #fff; }

/* ---------- Administración ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 12px 0 20px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { display: grid; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; }
.kpi-label { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.kpi strong { font-size: 2.2rem; font-weight: 900; line-height: 1.1; }
.kpi .kpi-sm { font-size: 1.3rem; }
.kpi small { color: var(--muted-2); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-grid .panel { margin: 0; }
.admin-grid-2 { margin-bottom: 24px; }
.admin-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.mini-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.mini-list li > span:last-child { color: var(--muted); white-space: nowrap; display: inline-flex; gap: .25rem; align-items: center; }
.mini-list .icon { color: var(--gold); width: .9em; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 12px 16px; background: #121212; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: #1c1c1c; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.cell-user, .cell-movie { display: flex; gap: 12px; align-items: center; }
.cell-user small, .cell-movie small { display: block; color: var(--muted); font-size: .8rem; }
.cell-movie img, .thumb-empty { width: 40px; height: 60px; object-fit: cover; border-radius: 3px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex: none; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-active { background: rgba(70, 211, 105, .15); color: var(--match); }
.badge-inactive { background: rgba(235, 57, 66, .15); color: #ff7b82; }
.badge-admin { background: rgba(229, 9, 20, .18); color: #ff6b73; }
.badge-user { background: var(--surface-3); color: var(--text-2); }
.poster-preview { padding: 12px; }
.poster-preview img, .poster-preview .card-fallback { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.tmdb-card { display: grid; gap: 8px; align-content: start; }
.tmdb-card h3 { font-size: .95rem; }
.tmdb-card p { margin: 0; font-size: .82rem; }
.tmdb-card .icon { color: var(--gold); width: .9em; }
.tmdb-poster { aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.tmdb-poster img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Visitantes (bienvenida / autenticación) ---------- */
body.guest { background: #000; }
.poster-wall {
    position: fixed; inset: -8%; z-index: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px;
    transform: rotate(-8deg) scale(1.15); opacity: .55;
}
.poster-wall-item { aspect-ratio: 2 / 3; border-radius: 6px; background: #1b1b1b center / cover; }
body.guest::before {
    content: ""; position: fixed; inset: 0; z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .85) 75%), linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, transparent 25%, transparent 70%, #000 100%);
}
.guest-header, .guest-main, .guest-footer, .guest .flash-stack { position: relative; z-index: 2; }
.guest .flash-stack { position: fixed; z-index: 300; }
.guest-header { display: flex; justify-content: space-between; align-items: center; padding: 24px var(--gutter); max-width: 1500px; margin: 0 auto; width: 100%; }
.guest-header .brand { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.guest-main { flex: 1; }
.guest-main.is-centered { display: grid; place-items: center; padding: 20px var(--gutter) 60px; }
.guest-footer { padding: 32px var(--gutter); color: var(--muted-2); font-size: .85rem; background: rgba(0, 0, 0, .8); border-top: 1px solid #222; }
.guest-footer p { max-width: 1100px; margin: 0 auto .5rem; }

.landing-hero { min-height: 72vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 40px var(--gutter) 80px; }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; max-width: 900px; letter-spacing: -.02em; }
.landing-sub { font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 1rem 0 1.5rem; color: var(--text-2); max-width: 700px; }
.landing-cta-text { margin: 0 0 1rem; font-size: 1.1rem; }
.landing-form { display: flex; gap: 8px; width: min(640px, 100%); justify-content: center; }
.landing-form .float-field { flex: 1; }
.landing-band { position: relative; z-index: 2; background: #000; border-top: 8px solid #232323; padding: 56px var(--gutter); }
.landing-band > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.landing-band h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 700; margin-bottom: 20px; }
.landing-trending { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 20px; overflow-x: auto; padding: 8px 0 16px 40px; scrollbar-width: none; }
.landing-trend { position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: visible; }
.landing-trend img, .landing-trend .card-fallback { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.landing-trend .rank {
    position: absolute; left: -36px; bottom: -6px; z-index: 1; font-family: "Arial Black", Arial, sans-serif; font-weight: 900; font-size: 6.5rem; line-height: 1;
    color: #000; -webkit-text-stroke: 3px #fff; paint-order: stroke fill;
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { position: relative; min-height: 220px; padding: 22px 22px 70px; border-radius: 16px; background: linear-gradient(149deg, #192247 0%, #210e17 96%); }
.feature h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.feature p { color: rgba(255, 255, 255, .72); margin: 0; }
.feature-icon { position: absolute; right: 18px; bottom: 16px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #7b2ff7); }
.feature-icon .icon { width: 26px; height: 26px; }
.faq { display: grid; gap: 8px; margin-bottom: 40px; }
.faq details { background: #2d2d2d; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; font-size: clamp(1.05rem, 2vw, 1.45rem); display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 2.2rem; font-weight: 300; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: #414141; }
.faq details p { margin: 0; padding: 22px 24px; border-top: 1px solid #000; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.landing-band > .landing-form { margin-top: 16px; }

.auth-card { width: min(450px, 100%); background: rgba(0, 0, 0, .78); border-radius: 6px; padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 64px); }
.auth-card-wide { width: min(780px, 100%); }
.auth-card h1 { font-size: 2rem; font-weight: 800; margin-bottom: 24px; }
.auth-lead { color: var(--text-2); margin: -12px 0 24px; }
.auth-card .eyebrow { margin-bottom: .3rem; }
.auth-alt { color: var(--muted); margin: 24px 0 0; }
.auth-fine { color: var(--muted-2); font-size: .8rem; margin: 12px 0 0; }
.onboarding-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Código QR (bienvenida y póster imprimible) ---------- */
.landing-hero-qr { grid-template-columns: minmax(0, 1fr) auto; place-content: center; align-items: center; gap: clamp(32px, 5vw, 80px); text-align: left; justify-items: start; max-width: 1280px; margin: 0 auto; }
.landing-hero-qr .landing-form { justify-content: flex-start; }
.landing-copy { max-width: 720px; }
.qr-card {
    width: 300px; padding: 22px 22px 18px; border-radius: 16px; text-align: center;
    background: rgba(20, 20, 20, .88); border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.qr-step { margin: 0; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.qr-card h2 { font-size: 1.3rem; margin: .3rem 0 14px; }
.qr-code { display: block; background: #fff; border-radius: 10px; padding: 10px; }
.qr-code svg, .qr-poster-code svg { display: block; width: 100%; height: auto; }
.qr-steps { list-style: none; margin: 16px 0 10px; padding: 0; display: grid; gap: 8px; text-align: left; font-size: .92rem; color: var(--text-2); }
.qr-steps li { display: flex; align-items: center; gap: 10px; }
.qr-steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.qr-url { margin: 6px 0 4px; font-size: .78rem; color: var(--muted-2); word-break: break-all; }
.qr-print { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.qr-welcome { display: flex; gap: .5rem; align-items: flex-start; margin: -10px 0 22px; padding: 12px 14px; border-radius: 6px; background: rgba(229, 9, 20, .18); border: 1px solid rgba(229, 9, 20, .4); color: #fff; }
.qr-welcome .icon { color: var(--brand); margin-top: .15rem; }

.qr-poster-page { background: #fff; color: #111; min-height: 100vh; display: grid; place-items: center; }
.qr-poster { width: min(640px, 100%); padding: 40px 28px; text-align: center; }
.qr-poster-brand { font-size: 2.6rem; margin: 0 0 12px; }
.qr-poster h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; }
.qr-poster-sub { font-size: 1.2rem; color: #444; margin: 12px 0 24px; }
.qr-poster-code { width: min(380px, 80vw); margin: 0 auto; border: 3px solid #111; border-radius: 16px; padding: 12px; }
.qr-steps-print { width: fit-content; margin: 24px auto 8px; color: #222; font-size: 1.1rem; }
.qr-poster .qr-url { color: #555; font-size: .95rem; }
.qr-warning { background: #fff3cd; color: #664d03; border-radius: 6px; padding: 10px 14px; font-size: .9rem; }
.qr-poster-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.qr-poster-actions .btn-ghost { color: #111; border-color: #999; background: transparent; }
@media print {
    .no-print { display: none !important; }
    .qr-poster-page { min-height: 0; }
    .qr-poster { padding-top: 0; }
}

/* ---------- Calificación rápida ---------- */
.rate-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rate-progress strong { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--gold); }
.rate-progress > span { color: var(--muted); margin-right: 8px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 190px), 1fr)); gap: 28px 14px; }
.quick-card { display: grid; gap: 6px; align-content: start; transition: opacity .3s; }
.quick-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); outline: 3px solid transparent; transition: outline-color .2s; }
.quick-poster img { width: 100%; height: 100%; object-fit: cover; transition: filter .3s; }
.quick-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.quick-done .icon { width: 56px; height: 56px; padding: 10px; border-radius: 50%; background: var(--match); color: #000; stroke-width: 3; }
.quick-card.is-rated .quick-poster { outline-color: var(--match); }
.quick-card.is-rated .quick-done { opacity: 1; }
.quick-card.is-skipped { opacity: .3; }
.quick-card.is-skipped .quick-poster img { filter: grayscale(1); }
.quick-title { font-size: .9rem; font-weight: 700; line-height: 1.25; }
.quick-title small { color: var(--muted); font-weight: 500; }
.quick-stars { display: flex; gap: 2px; }
.quick-stars button { background: none; border: 0; padding: 2px; color: #4d4d4d; transition: color .12s, transform .12s; }
.quick-stars button .icon { width: 26px; height: 26px; }
.quick-stars button.is-on { color: var(--gold); }
.quick-stars:hover button { color: var(--gold); }
.quick-stars button:hover ~ button { color: #4d4d4d; }
.quick-stars button:hover { transform: scale(1.15); }
.quick-label { margin: 0; font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.quick-skip { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted-2); font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.quick-skip:hover { color: #fff; }
.quick-card.is-skipped .quick-skip { color: #fff; }
.rate-more { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 40px 0 8px; }

/* ---------- Errores ---------- */
.error-page { min-height: 70vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 40px var(--gutter); }
.error-code { font-family: "Arial Black", Arial, sans-serif; font-size: clamp(5rem, 16vw, 10rem); font-weight: 900; line-height: 1; margin: 0; color: transparent; -webkit-text-stroke: 2px var(--brand); }
.error-page h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 8px 0 10px; }
.error-text { color: var(--muted); max-width: 520px; }
.error-actions { display: flex; gap: 12px; margin-top: 16px; }

/* ---------- Pie ---------- */
.site-footer { padding: 40px var(--gutter); color: var(--muted-2); font-size: .85rem; border-top: 1px solid var(--line-soft); }
.footer-inner { max-width: 980px; }
.footer-inner p { margin: .6rem 0 0; }
.footer-legal { font-size: .75rem; }

/* ---------- Responsivo ---------- */
@media (min-width: 1400px) { .row-track { --per-row: 7; } .row-backdrop .row-track { --per-row: 5; } .row-top10 .row-track { --per-row: 6; } }
@media (max-width: 1100px) {
    .row-track { --per-row: 5; } .row-backdrop .row-track { --per-row: 3; } .row-top10 .row-track { --per-row: 4; }
    .community-grid, .admin-form-grid { grid-template-columns: 1fr; }
    .community-side { position: static; }
    .poster-wall { grid-template-columns: repeat(6, 1fr); }
    .landing-hero-qr { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    :root { --nav-h: 104px; }
    .nav-inner { flex-wrap: wrap; align-content: center; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
    .nav-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .nav { background: linear-gradient(180deg, rgba(0, 0, 0, .9) 30%, transparent); }
    .detail-grid, .admin-grid, .explain, .toolbar { grid-template-columns: 1fr; }
    .detail-hero-inner { grid-template-columns: 140px 1fr; }
    .review { grid-template-columns: 1fr; gap: 8px; }
    .profile-head { grid-template-columns: auto 1fr; }
    .profile-head .stat-inline, .profile-head > .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 700px) {
    .row-track { --per-row: 3.3; } .row-backdrop .row-track { --per-row: 1.6; } .row-top10 .row-track { --per-row: 2.3; }
    .row-arrow { display: none; }
    .rows { margin-top: -40px; }
    .hero { height: auto; min-height: 0; padding: calc(var(--nav-h) + 46vw) 0 72px; background-position: center top; }
    .hero-content { padding-top: 0; }
    .hero-overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-actions .btn-lg { padding: .6rem 1.1rem; font-size: 1rem; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .detail-hero-inner { grid-template-columns: 1fr; }
    .detail-poster { width: 150px; }
    .landing-form { flex-direction: column; align-items: center; }
    .landing-hero-qr { text-align: center; justify-items: center; }
    .landing-hero-qr .landing-form { align-items: stretch; }
    .qr-card { width: min(300px, 100%); }
    .landing-form .float-field { width: 100%; }
    .rating-item { grid-template-columns: 56px 1fr; }
    .rating-actions { grid-column: 2; }
    .poster-wall { grid-template-columns: repeat(4, 1fr); }
    .nav-search.is-open input { width: 36vw; }
    .dropdown-toggle .caret { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
