/* ==========================================================================
   NEFTFilms — Pixel UI design system
   Palette: Twitch black + purple, shapes and motion inspired by Google Pixel UI
   ========================================================================== */
:root {
    --black: #0B0B0E;
    --surface-1: #131316;
    --surface-2: #1A1A1F;
    --surface-3: #222229;
    --surface-4: #2B2B33;
    --outline: rgba(255, 255, 255, 0.08);
    --outline-strong: rgba(255, 255, 255, 0.16);

    --purple: #9146FF;
    --purple-bright: #A970FF;
    --purple-strong: #772CE8;
    --purple-deep: #5C16C5;
    --purple-soft: rgba(145, 70, 255, 0.16);
    --purple-soft-strong: rgba(145, 70, 255, 0.26);
    --purple-text: #DCC7FF;

    --text: #F2F0F7;
    --text-dim: #B6B3C2;
    --text-mute: #7F7C8D;
    --success: #64F0A6;
    --warning: #FFC46B;
    --danger: #FF6B81;
    --info: #8AB4FF;

    --radius-xl: 32px;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 16px;
    --pill: 999px;

    --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 18px 40px rgba(0, 0, 0, 0.45);
    --shadow-purple: 0 10px 28px rgba(145, 70, 255, 0.32);

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --font-display: "Outfit", "Google Sans", "Roboto", system-ui, sans-serif;
    --font-body: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(70% 55% at 12% -5%, rgba(145, 70, 255, 0.20), transparent 60%),
        radial-gradient(50% 40% at 100% 0%, rgba(92, 22, 197, 0.16), transparent 60%),
        radial-gradient(45% 40% at 50% 105%, rgba(145, 70, 255, 0.10), transparent 65%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--purple);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--purple-bright);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-4);
    border-radius: 999px;
    border: 2px solid var(--black);
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a46;
}

/* ---------- Layout ---------- */
.page {
    position: relative;
    z-index: 1;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 32px 24px 96px;
}

.page--wide {
    width: min(1400px, 100%);
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.page-head__text {
    max-width: 68ch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--purple-text);
    background: var(--purple-soft);
    border-radius: var(--pill);
    padding: 7px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.035em;
    background: linear-gradient(120deg, #FFFFFF 20%, #DCC7FF 70%, #A970FF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
}

.page-sub {
    margin-top: 12px;
    max-width: 62ch;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 40px 0 18px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-title i {
    color: var(--purple-bright);
    font-size: 1rem;
}

.muted {
    color: var(--text-mute);
}

.dim {
    color: var(--text-dim);
}

/* ---------- Top app bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 11, 14, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--outline);
}

.topbar-inner {
    position: relative;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(145deg, #B48CFF 0%, var(--purple) 45%, var(--purple-deep) 100%);
    box-shadow: var(--shadow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark svg {
    width: 19px;
    height: 19px;
    fill: #fff;
    margin-left: 2px;
}

.brand-text span {
    color: var(--purple-bright);
}

.brand:hover .brand-mark {
    transform: translateY(-1px) scale(1.02);
    transition: transform 0.25s var(--ease);
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border-radius: var(--pill);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link i {
    font-size: 0.92rem;
    opacity: 0.9;
}

.nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-link.is-active {
    background: var(--purple-soft);
    color: var(--purple-text);
}

.nav-link--logout:hover {
    background: rgba(255, 107, 129, 0.12);
    color: #FFB3BF;
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: var(--pill);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 190px;
    transition: background 0.2s var(--ease);
}

.nav-user:hover {
    background: var(--surface-3);
}

.nav-user.is-active {
    background: var(--purple-soft);
}

.nav-user img,
.nav-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.05rem;
    transition: background 0.2s var(--ease);
}

.menu-toggle:hover {
    background: var(--surface-3);
}

/* ---------- Bottom navigation (mobile, Pixel style) ---------- */
.bottom-nav {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 45;
    padding: 8px;
    justify-content: space-around;
    background: rgba(24, 24, 27, 0.92);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--outline);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    padding: 7px 10px;
    border-radius: 20px;
    color: var(--text-mute);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.bottom-nav a i {
    font-size: 1.05rem;
}

.bottom-nav a.is-active {
    color: #fff;
    background: var(--purple-soft);
}

.bottom-nav a.is-active i {
    color: var(--purple-bright);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--pill);
    background: var(--purple);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    box-shadow: var(--shadow-purple);
    transition: background 0.2s var(--ease), transform 0.18s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
    background: var(--purple-bright);
    color: #fff;
    box-shadow: 0 12px 32px rgba(145, 70, 255, 0.42);
}

.btn:active {
    transform: scale(0.97);
}

.btn i {
    font-size: 0.92rem;
}

.btn--tonal {
    background: var(--purple-soft);
    color: var(--purple-text);
    box-shadow: none;
}

.btn--tonal:hover {
    background: var(--purple-soft-strong);
    color: #fff;
    box-shadow: none;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--outline-strong);
    color: var(--text);
    box-shadow: none;
}

.btn--ghost:hover {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.btn--danger {
    background: rgba(255, 107, 129, 0.14);
    color: #FFB3BF;
    box-shadow: none;
}

.btn--danger:hover {
    background: rgba(255, 107, 129, 0.26);
    color: #fff;
    box-shadow: none;
}

.btn--sm {
    height: 38px;
    padding: 0 18px;
    font-size: 0.8rem;
}

.btn--block {
    width: 100%;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--outline);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.icon-btn:hover {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--outline-strong);
}

/* ---------- Cards ---------- */
.card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 45%),
        var(--surface-1);
    box-shadow: var(--shadow-1);
}

.card--flush {
    padding: 0;
    overflow: hidden;
}

.card--sm {
    padding: 18px;
    border-radius: var(--radius-md);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.card-title i {
    color: var(--purple-bright);
    font-size: 0.95rem;
}

.card-sub {
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.card + .card {
    margin-top: 18px;
}

/* ---------- Chips / badges ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--pill);
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.chip i {
    font-size: 0.72rem;
    opacity: 0.9;
}

.chip--purple {
    background: var(--purple-soft);
    color: var(--purple-text);
}

.chip--success {
    background: rgba(100, 240, 166, 0.13);
    color: var(--success);
}

.chip--warning {
    background: rgba(255, 196, 107, 0.14);
    color: var(--warning);
}

.chip--danger {
    background: rgba(255, 107, 129, 0.14);
    color: var(--danger);
}

.chip--info {
    background: rgba(138, 180, 255, 0.14);
    color: var(--info);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--pill);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.rating-pill i {
    font-size: 0.72rem;
}

.rating--high {
    background: rgba(100, 240, 166, 0.13);
    color: var(--success);
}

.rating--mid {
    background: rgba(255, 196, 107, 0.14);
    color: var(--warning);
}

.rating--low {
    background: rgba(255, 107, 129, 0.14);
    color: var(--danger);
}

.rating-text--high {
    color: var(--success) !important;
}

.rating-text--mid {
    color: var(--warning) !important;
}

.rating-text--low {
    color: var(--danger) !important;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.rank-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.analysis-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.admin-card {
    display: flex;
}

.admin-user__name {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-user__bio {
    min-height: 2.6em;
    color: var(--text-mute);
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-user__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.analysis-user__names {
    min-width: 0;
    flex: 1;
}

.analysis-user__name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-user__meta {
    color: var(--text-mute);
    font-size: 0.76rem;
}

.details {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--outline);
}

.details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.details summary::-webkit-details-marker {
    display: none;
}

.details summary i {
    color: var(--purple-bright);
    font-size: 0.72rem;
    transition: transform 0.2s var(--ease);
}

.details[open] summary i {
    transform: rotate(180deg);
}

.details .rank-section:first-of-type {
    margin-top: 14px;
}

/* ---------- Toolbar / search ---------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 340px;
    min-width: 0;
    height: 58px;
    padding: 0 8px 0 20px;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: var(--surface-2);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.searchbar:focus-within {
    border-color: rgba(145, 70, 255, 0.6);
    background: var(--surface-3);
    box-shadow: 0 0 0 4px rgba(145, 70, 255, 0.14);
}

.searchbar > i {
    color: var(--text-mute);
    font-size: 0.95rem;
}

.searchbar input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
}

.searchbar input::placeholder {
    color: var(--text-mute);
}

.searchbar .btn {
    height: 42px;
    padding: 0 22px;
}

.select-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.select-pill > i {
    position: absolute;
    left: 18px;
    color: var(--purple-bright);
    font-size: 0.82rem;
    pointer-events: none;
}

.select-pill select {
    height: 58px;
    padding: 0 44px 0 42px;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23B6B3C2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.select-pill select:hover {
    background-color: var(--surface-3);
    color: var(--text);
}

.select-pill select:focus {
    outline: none;
    border-color: rgba(145, 70, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(145, 70, 255, 0.14);
}

.select-pill option {
    background: var(--surface-1);
    color: var(--text);
}

/* ---------- Forms ---------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.field:last-child {
    margin-bottom: 0;
}

.field > label,
.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-dim);
}

.form-control,
.input,
.select,
.textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.5;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-control::placeholder,
.input::placeholder,
.textarea::placeholder {
    color: var(--text-mute);
}

.form-control:hover,
.input:hover,
.select:hover,
.textarea:hover {
    background: var(--surface-3);
}

.form-control:focus,
.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    background: var(--surface-3);
    border-color: rgba(145, 70, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(145, 70, 255, 0.16);
}

.textarea,
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control,
.select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23B6B3C2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

textarea.form-control {
    background-image: none;
}

input[type="file"],
.form-control-file {
    width: 100%;
    padding: 12px 14px;
    border: 1px dashed var(--outline-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

input[type="file"]:hover {
    border-color: rgba(145, 70, 255, 0.55);
    background: var(--surface-3);
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--pill);
    background: var(--purple-soft);
    color: var(--purple-text);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.errors {
    margin: 2px 0 0;
    padding: 10px 14px;
    list-style: none;
    border-radius: 12px;
    background: rgba(255, 107, 129, 0.1);
    color: #FFB3BF;
    font-size: 0.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ---------- Alerts / flash ---------- */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--outline);
    border-left: 3px solid var(--purple);
    border-radius: 18px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.88rem;
    box-shadow: var(--shadow-1);
    animation: flash-in 0.4s var(--ease) both;
}

.flash i {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--purple-bright);
}

.flash--success {
    border-left-color: var(--success);
}

.flash--success i {
    color: var(--success);
}

.flash--danger {
    border-left-color: var(--danger);
}

.flash--danger i {
    color: var(--danger);
}

.flash--warning {
    border-left-color: var(--warning);
}

.flash--warning i {
    color: var(--warning);
}

.flash--info {
    border-left-color: var(--info);
}

.flash--info i {
    color: var(--info);
}

.flash__text {
    flex: 1;
}

.flash__close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-mute);
    font-size: 0.85rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.flash__close:hover {
    background: var(--surface-4);
    color: var(--text);
}

@keyframes flash-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Movie cards ---------- */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 20px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(145, 70, 255, 0.38);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(145, 70, 255, 0.12);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.movie-card:hover .movie-poster img {
    transform: scale(1.06);
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 14, 0) 45%, rgba(11, 11, 14, 0.92));
    pointer-events: none;
}

.movie-poster__empty {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: rgba(220, 199, 255, 0.35);
    font-size: 2.4rem;
}

.movie-poster__rating {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--pill);
    background: rgba(11, 11, 14, 0.68);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.movie-poster__rating i {
    color: var(--warning);
    font-size: 0.72rem;
}

.movie-poster__rating--high {
    color: var(--success);
}

.movie-poster__rating--high i {
    color: var(--success);
}

.movie-poster__rating--mid {
    color: var(--warning);
}

.movie-poster__rating--low {
    color: var(--danger);
}

.movie-poster__rating--low i {
    color: var(--danger);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 18px;
}

.movie-card-title {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-title:hover {
    color: var(--purple-text);
}

.movie-card-year {
    color: var(--text-mute);
    font-weight: 400;
}

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.movie-card-meta .chip {
    padding: 5px 10px;
    font-size: 0.7rem;
}

.movie-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mute);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Empty state ---------- */
.empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 72px 24px;
    border: 1px dashed var(--outline-strong);
    border-radius: var(--radius-lg);
    color: var(--text-mute);
    text-align: center;
}

.empty i {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--purple-soft);
    color: var(--purple-bright);
    font-size: 1.4rem;
}

.empty strong {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

/* ---------- Movie detail ---------- */
.detail {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.poster-card {
    position: sticky;
    top: 92px;
    overflow: hidden;
    padding: 0;
    border-radius: var(--radius-lg);
}

.poster-card__media {
    position: relative;
    aspect-ratio: 2 / 3;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
}

.poster-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-card__body {
    padding: 20px;
    border-top: 1px solid var(--outline);
}

.detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.detail-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.detail-year {
    color: var(--text-mute);
    font-weight: 400;
}

.detail-desc {
    margin-top: 16px;
    color: var(--text-dim);
    font-size: 0.96rem;
    line-height: 1.7;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.stat {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-mute);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-label i {
    color: var(--purple-bright);
    font-size: 0.72rem;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-value small {
    color: var(--text-mute);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
}

.stat-value i {
    font-size: 0.7rem;
    color: var(--text-mute);
}

/* ---------- Reviews ---------- */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review {
    position: relative;
    padding: 22px;
    border: 1px solid var(--outline);
    border-radius: 24px;
    background: var(--surface-2);
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.review:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.review--pinned {
    border-color: rgba(145, 70, 255, 0.45);
    background:
        linear-gradient(180deg, rgba(145, 70, 255, 0.14), rgba(145, 70, 255, 0) 55%),
        var(--surface-2);
}

.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--purple-strong), var(--purple-deep));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    object-fit: cover;
}

.avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
}

.avatar--lg {
    width: 104px;
    height: 104px;
    font-size: 2rem;
}

.avatar--xl {
    width: 132px;
    height: 132px;
    font-size: 2.4rem;
}

.review-author__name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-author__name:hover {
    color: var(--purple-text);
}

.review-author__meta {
    color: var(--text-mute);
    font-size: 0.74rem;
}

.review-head__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.review-text {
    margin-top: 14px;
    color: var(--text-dim);
    font-size: 0.93rem;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.vote {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.vote i {
    font-size: 0.82rem;
}

.vote:hover {
    background: var(--purple-soft);
    color: var(--purple-text);
}

.vote.is-voted {
    background: var(--purple-soft);
    border-color: rgba(145, 70, 255, 0.4);
    color: var(--purple-text);
}

.review-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.review-admin-actions .btn {
    height: 34px;
    padding: 0 14px;
    font-size: 0.75rem;
}

.review-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(145, 70, 255, 0.1);
    color: var(--purple-text);
    font-size: 0.88rem;
}

.review-note i {
    color: var(--purple-bright);
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow: auto;
    max-height: 520px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline);
    background: var(--surface-3);
    color: var(--text-mute);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    color: var(--text-dim);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover td {
    background: rgba(145, 70, 255, 0.07);
    color: var(--text);
}

.table tbody td:first-child {
    color: var(--purple-bright);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    width: 52px;
}

.table tbody td:last-child {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------- Analysis / leaderboard ---------- */
.podium {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.rank-card {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
}

.rank-card--gold {
    grid-column: 1 / -1;
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(255, 196, 107, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(145, 70, 255, 0.12), transparent 60%),
        var(--surface-1);
    border-color: rgba(255, 196, 107, 0.32);
}

.rank-card--silver {
    border-color: rgba(198, 198, 214, 0.24);
}

.rank-card--bronze {
    border-color: rgba(215, 143, 96, 0.28);
}

.rank-medal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 13px;
    border-radius: var(--pill);
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rank-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.rank-card--gold .rank-name {
    font-size: 2rem;
}

.rank-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
    color: var(--text-mute);
    font-size: 0.82rem;
}

.rank-count strong {
    color: var(--purple-text);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.rank-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--outline);
}

.rank-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rank-section__title i {
    color: var(--purple-bright);
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow: auto;
    padding-right: 4px;
    list-style: none;
}

.rank-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-size: 0.83rem;
}

.rank-list li > span:first-child {
    overflow-wrap: anywhere;
}

.rank-list li > span:last-child {
    flex-shrink: 0;
    color: var(--purple-text);
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* ---------- Profile ---------- */
.profile-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 32px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(80% 150% at 0% 0%, rgba(145, 70, 255, 0.18), transparent 55%),
        var(--surface-1);
    overflow: hidden;
}

.profile-hero::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 4%;
    width: 340px;
    height: 340px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(145, 70, 255, 0.22), rgba(92, 22, 197, 0.06) 55%, transparent 70%);
    pointer-events: none;
}

.profile-hero > * {
    position: relative;
    z-index: 1;
}

.profile-hero__info {
    flex: 1 1 320px;
    min-width: 0;
}

.profile-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.profile-bio {
    margin-top: 10px;
    max-width: 60ch;
    color: var(--text-dim);
    font-size: 0.93rem;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.profile-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.rec-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.rec-card:hover {
    transform: translateY(-3px);
    border-color: rgba(145, 70, 255, 0.35);
}

.rec-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
}

.rec-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rec-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.rec-card__title {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
}

.rec-card__title span {
    color: var(--text-mute);
    font-weight: 400;
}

.rec-card .btn {
    margin-top: auto;
}

.review-movie-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--text-mute);
    font-size: 0.78rem;
    font-weight: 500;
}

.review-movie-link:hover {
    color: var(--purple-text);
}

.review-movie-link i {
    font-size: 0.7rem;
}

/* ---------- Auth ---------- */
.auth {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 260px);
    padding: 12px 0 32px;
}

.auth-card {
    position: relative;
    width: min(460px, 100%);
    padding: 36px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(145, 70, 255, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--surface-1);
    box-shadow: var(--shadow-2);
}

.auth-card__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    border-radius: 18px;
    background: linear-gradient(145deg, #B48CFF, var(--purple) 50%, var(--purple-deep));
    box-shadow: var(--shadow-purple);
    color: #fff;
    font-size: 1.2rem;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.auth-sub {
    margin-top: 8px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.auth-card--wide {
    width: min(500px, 100%);
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 24px;
    padding: 4px;
    border: 1px solid var(--outline);
    border-radius: var(--pill);
    background: var(--surface-2);
}

.segment {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--pill);
    color: var(--text-dim);
    font-size: 0.86rem;
    font-weight: 600;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.segment:hover {
    color: var(--text);
}

.segment.is-active {
    background: var(--surface-4);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.auth-panel[hidden] {
    display: none;
}

.auth-panel .auth-form {
    margin-top: 20px;
}

/* ---------- Dialogs ---------- */
.dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: min(90vh, 920px);
    padding: 0;
    border: 1px solid var(--outline-strong);
    border-radius: var(--radius-xl);
    background: var(--surface-1);
    color: var(--text);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.dialog::backdrop {
    background: rgba(5, 5, 8, 0.74);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.dialog[open] {
    animation: dialog-in 0.26s var(--ease);
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dialog__form {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 920px);
}

.dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--outline);
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(145, 70, 255, 0.16), transparent 55%),
        var(--surface-1);
}

.dialog__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.dialog__sub {
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.dialog__body {
    padding: 24px 26px;
    overflow-y: auto;
}

.dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 26px;
    border-top: 1px solid var(--outline);
    background: var(--surface-2);
}

.dialog__section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--outline);
}

.dialog__section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
}

.dialog__section-title i {
    color: var(--purple-bright);
    font-size: 0.9rem;
}

.dialog__section-sub {
    margin-top: 6px;
    color: var(--text-mute);
    font-size: 0.8rem;
}

.movie-pick-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
}

.movie-pick {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.movie-pick__label {
    color: var(--text-dim);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.profile-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border: 1px dashed var(--outline-strong);
    border-radius: var(--radius-md);
    color: var(--text-mute);
    font-size: 0.9rem;
}

.profile-empty i {
    flex-shrink: 0;
    color: var(--purple-bright);
    font-size: 1.1rem;
}

.profile-empty a {
    color: var(--purple-text);
    font-weight: 600;
}

.auth-form {
    margin-top: 28px;
}

.auth-footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--outline);
    color: var(--text-mute);
    font-size: 0.85rem;
    text-align: center;
}

.auth-footer a {
    color: var(--purple-text);
    font-weight: 600;
}

.auth-footer a:hover {
    color: #fff;
}

/* ---------- Changelog ---------- */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.log-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
}

.log-version {
    align-self: start;
}

.log-content ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    list-style: none;
}

.log-content li {
    position: relative;
    padding-left: 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.log-content li::before {
    content: "";
    position: absolute;
    top: 0.58em;
    left: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
}

.log-content li strong {
    color: var(--text);
}

/* ---------- Map ---------- */
.map-frame {
    width: 100%;
    height: min(76vh, 760px);
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    box-shadow: var(--shadow-2);
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 28px 24px 40px;
    border-top: 1px solid var(--outline);
    color: var(--text-mute);
    font-size: 0.74rem;
    text-align: center;
}

.site-footer strong {
    color: var(--text-dim);
    font-weight: 600;
}

/* ---------- Motion ---------- */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card,
.rank-card,
.review,
.card,
.log-card {
    animation: rise 0.45s var(--ease) both;
}

.movie-card:nth-child(2),
.review:nth-child(2) {
    animation-delay: 0.04s;
}

.movie-card:nth-child(3),
.review:nth-child(3) {
    animation-delay: 0.08s;
}

.movie-card:nth-child(4),
.review:nth-child(4) {
    animation-delay: 0.12s;
}

.movie-card:nth-child(5) {
    animation-delay: 0.16s;
}

.movie-card:nth-child(6) {
    animation-delay: 0.2s;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .detail {
        grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    }

    .poster-card {
        top: 84px;
    }
}

@media (max-width: 900px) {
    .page {
        padding: 24px 18px 24px;
    }

    .site-footer {
        padding-bottom: 110px;
    }

    .topbar-inner {
        padding: 10px 18px;
    }

    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 14px;
        right: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 10px;
        border: 1px solid var(--outline);
        border-radius: 24px;
        background: var(--surface-1);
        box-shadow: var(--shadow-2);
    }

    .topbar.is-open .nav {
        display: flex;
    }

    .nav-link {
        padding: 14px 16px;
        border-radius: 16px;
        font-size: 0.92rem;
    }

    .nav-user {
        margin-top: 4px;
        padding: 10px 14px;
        border-radius: 16px;
        max-width: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .bottom-nav {
        display: flex;
    }

    .detail {
        grid-template-columns: 1fr;
    }

    .poster-card {
        position: static;
        max-width: 340px;
        width: 100%;
        margin: 0 auto;
    }

    .podium {
        grid-template-columns: 1fr;
    }

    .rank-card--gold {
        grid-column: auto;
    }

    .profile-hero {
        padding: 24px;
        gap: 20px;
    }

    .log-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rank-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .page {
        padding: 20px 16px 24px;
    }

    .page-head {
        margin-bottom: 22px;
    }

    .page-title {
        font-size: clamp(1.85rem, 9vw, 2.4rem);
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }

    .movie-card-body {
        padding: 12px 13px 14px;
        gap: 8px;
    }

    .movie-card-title {
        font-size: 0.9rem;
    }

    .movie-card-meta .chip {
        padding: 4px 8px;
        font-size: 0.65rem;
    }

    .movie-card-time {
        font-size: 0.66rem;
    }

    .toolbar {
        gap: 10px;
    }

    .searchbar {
        height: 54px;
        flex-basis: 100%;
        padding-left: 16px;
    }

    .searchbar .btn {
        height: 40px;
        padding: 0 16px;
    }

    .select-pill {
        flex: 1;
    }

    .select-pill select {
        width: 100%;
        height: 52px;
    }

    .card {
        padding: 20px;
        border-radius: 24px;
    }

    .auth-card {
        padding: 26px;
        border-radius: 28px;
    }

    .dialog {
        width: calc(100vw - 20px);
        border-radius: 26px;
    }

    .dialog__head,
    .dialog__body,
    .dialog__actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .dialog__title {
        font-size: 1.35rem;
    }

    .auth-title {
        font-size: 1.7rem;
    }

    .profile-hero {
        padding: 22px;
        border-radius: 28px;
    }

    .avatar--xl {
        width: 104px;
        height: 104px;
        font-size: 2rem;
    }

    .detail-title {
        font-size: 1.9rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review {
        padding: 18px;
    }

    .review-head__right {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .table {
        font-size: 0.78rem;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 12px;
    }
}

/* ==========================================================================
   Live search, filter chips & friendly error pages
   ========================================================================== */
.search-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.searchbar {
    width: 100%;
    flex: none;
    height: 60px;
    padding: 0 14px 0 22px;
    gap: 14px;
}

.searchbar .searchbar__icon {
    color: var(--text-mute);
    font-size: 1rem;
    transition: color 0.2s var(--ease);
}

.searchbar:focus-within .searchbar__icon {
    color: var(--purple-bright);
}

.searchbar input {
    font-size: 1rem;
}

.search-kbd {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border: 1px solid var(--outline-strong);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-mute);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
}

.search-clear {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 0.82rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.search-clear:hover {
    background: var(--surface-4);
    color: #fff;
}

.search-clear:active {
    transform: scale(0.92);
}

.search-clear[hidden] {
    display: none;
}

.search-spinner {
    display: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--purple-bright);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.searchbar.is-loading .search-spinner {
    display: block;
}

.searchbar.is-loading .search-kbd {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-mute);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.filter-label i {
    color: var(--purple-bright);
    font-size: 0.76rem;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.filter-chip {
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--outline);
    border-radius: var(--pill);
    background: var(--surface-1);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.filter-chip:hover {
    border-color: var(--outline-strong);
    background: var(--surface-2);
    color: var(--text);
}

.filter-chip:active {
    transform: scale(0.97);
}

.filter-chip.is-active {
    border-color: rgba(145, 70, 255, 0.45);
    background: var(--purple-soft);
    color: var(--purple-text);
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 22px;
}

.results-status {
    color: var(--text-mute);
    font-size: 0.78rem;
    line-height: 1.4;
}

.results-status--error {
    color: var(--danger);
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--purple-text);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s var(--ease);
}

.link-button:hover {
    color: #fff;
}

.link-button[hidden] {
    display: none;
}

.toolbar-progress {
    height: 3px;
    border-radius: var(--pill);
    background: var(--surface-2);
    overflow: hidden;
}

.toolbar-progress[hidden] {
    display: none;
}

.toolbar-progress span {
    display: block;
    width: 34%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple-strong), var(--purple-bright));
    animation: progress-slide 1s var(--ease) infinite;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(400%);
    }
}

#movies-list {
    transition: opacity 0.2s var(--ease);
    scroll-margin-top: 96px;
}

#movies-list.is-loading {
    opacity: 0.45;
}

/* ---------- Error pages ---------- */
.error-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 280px);
    padding: 24px 0 48px;
}

.error-card {
    position: relative;
    width: min(600px, 100%);
    padding: 48px 40px 40px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(110% 90% at 100% 0%, rgba(145, 70, 255, 0.2), transparent 58%),
        radial-gradient(80% 70% at 0% 100%, rgba(92, 22, 197, 0.12), transparent 60%),
        var(--surface-1);
    box-shadow: var(--shadow-2);
    text-align: center;
    overflow: hidden;
}

.error-card::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(145, 70, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.error-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border: 1px solid rgba(145, 70, 255, 0.35);
    border-radius: 22px;
    background: var(--purple-soft);
    color: var(--purple-bright);
    font-size: 1.45rem;
}

.error-code {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 13vw, 7.5rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.06em;
    background: linear-gradient(150deg, #FFFFFF 10%, #DCC7FF 55%, #9146FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.error-text {
    position: relative;
    z-index: 1;
    max-width: 44ch;
    margin: 12px auto 0;
    color: var(--text-dim);
    font-size: 0.93rem;
    line-height: 1.65;
}

.error-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .chip-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-right: -18px;
        padding-right: 18px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .chip-group::-webkit-scrollbar {
        display: none;
    }

    .search-kbd {
        display: none;
    }
}

@media (max-width: 640px) {
    .searchbar {
        height: 54px;
        padding-left: 16px;
        padding-right: 10px;
    }

    .filter-chip {
        height: 38px;
        padding: 0 14px;
        font-size: 0.76rem;
    }

    .results-status {
        font-size: 0.74rem;
    }

    .error-card {
        padding: 34px 22px 28px;
        border-radius: 28px;
    }

    .error-icon {
        width: 56px;
        height: 56px;
        border-radius: 18px;
        font-size: 1.25rem;
    }

    .error-actions .btn {
        flex: 1;
    }
}

.movie-poster__rating--empty {
    padding: 7px 11px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(11, 11, 14, 0.72);
    color: var(--text-mute);
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.stat-value--empty {
    align-items: center;
    color: var(--text-mute);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    line-height: 1.3;
}

/* ==========================================================================
   Movie page extras: rating chart, comments, share & global conveniences
   ========================================================================== */
.detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rating-breakdown {
    margin-top: 20px;
    padding: 22px 24px;
}

.rating-breakdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.rating-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
}

.rating-row__score {
    color: var(--text-mute);
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.rating-row__track {
    height: 8px;
    border-radius: var(--pill);
    background: var(--surface-3);
    overflow: hidden;
}

.rating-row__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple-strong), var(--purple-bright));
    transition: width 0.45s var(--ease);
}

.rating-row__count {
    color: var(--text-dim);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.review-votes {
    display: flex;
    gap: 6px;
}

.vote--down.is-voted {
    border-color: rgba(255, 107, 129, 0.4);
    background: rgba(255, 107, 129, 0.14);
    color: #FFB3BF;
}

.vote--down:hover {
    background: rgba(255, 107, 129, 0.12);
    color: #FFB3BF;
}

.review-comments {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--outline);
}

.review-comments summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.review-comments summary::-webkit-details-marker {
    display: none;
}

.review-comments summary > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.review-comments summary i {
    color: var(--purple-bright);
    font-size: 0.82rem;
}

.review-comments__count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--pill);
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 0.68rem;
}

.review-comments__chevron {
    transition: transform 0.2s var(--ease);
}

.review-comments[open] .review-comments__chevron {
    transform: rotate(180deg);
}

.review-comments__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment__content {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--surface-3);
}

.comment__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    font-size: 0.74rem;
}

.comment__meta a {
    color: var(--text);
    font-weight: 600;
}

.comment__meta a:hover {
    color: var(--purple-text);
}

.comment__meta span {
    color: var(--text-mute);
    font-size: 0.68rem;
}

.comment__text {
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.review-comments__empty {
    color: var(--text-mute);
    font-size: 0.78rem;
}

.review-comments__empty a {
    color: var(--purple-text);
    font-weight: 600;
}

.comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form .form-control {
    height: 44px;
    padding: 0 16px;
    border-radius: var(--pill);
    font-size: 0.85rem;
}

.comment-form__submit {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-color: transparent;
    background: var(--purple-soft);
    color: var(--purple-text);
}

.comment-form__submit:hover {
    border-color: transparent;
    background: var(--purple);
    color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 70;
    padding: 13px 20px;
    border: 1px solid var(--outline-strong);
    border-radius: var(--pill);
    background: rgba(24, 24, 27, 0.95);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: var(--shadow-2);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
    pointer-events: none;
}

.toast[hidden] {
    display: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 44;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--outline-strong);
    border-radius: 50%;
    background: rgba(26, 26, 31, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--text);
    font-size: 0.95rem;
    box-shadow: var(--shadow-2);
    transition: background 0.2s var(--ease), transform 0.18s var(--ease);
}

.scroll-top:hover {
    background: var(--purple);
    color: #fff;
    transform: translateY(-2px);
}

.scroll-top:active {
    transform: scale(0.96);
}

.scroll-top[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .toast {
        bottom: 92px;
    }

    .scroll-top {
        right: 16px;
        bottom: 92px;
    }
}

@media (max-width: 640px) {
    .rating-breakdown {
        padding: 18px;
    }

    .review-head__right {
        gap: 6px;
    }

    .review-votes {
        gap: 4px;
    }

    .comment__content {
        padding: 9px 12px;
    }
}

[hidden] {
    display: none !important;
}

.admin-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-searchbar {
    max-width: 520px;
    height: 52px;
}

.admin-toolbar .results-status {
    min-height: 18px;
}

.empty .btn {
    margin-top: 10px;
}

.searchbar.has-value .search-kbd {
    display: none;
}
/* ==========================================================================
   Large feature pack: notifications, filters, profile, admin, auth
   ========================================================================== */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: var(--pill);
    background: var(--purple);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
}

.nav-badge--floating {
    position: absolute;
    top: 4px;
    right: 8px;
    margin: 0;
}

.notif-wrap {
    position: relative;
}

.notif-toggle {
    position: relative;
    width: 40px;
    height: 40px;
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--black);
    border-radius: var(--pill);
    background: var(--purple);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: 370px;
    max-height: min(70vh, 520px);
    padding: 8px;
    border: 1px solid var(--outline-strong);
    border-radius: 24px;
    background: rgba(19, 19, 22, 0.98);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow-2);
    overflow: auto;
}

.notif-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 10px;
}

.notif-panel__head strong {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    color: var(--text-dim);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.notif-item:hover {
    background: var(--surface-3);
    color: var(--text);
}

.notif-item.is-unread {
    background: rgba(145, 70, 255, 0.1);
}

.notif-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

.notif-item__body small {
    color: var(--text-mute);
    font-size: 0.66rem;
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 12px;
    color: var(--text-mute);
    font-size: 0.8rem;
}

.notif-empty i {
    font-size: 1.2rem;
    color: var(--purple-bright);
}

.confirm-dialog {
    max-width: 430px;
    width: min(430px, calc(100vw - 32px));
}

.confirm-dialog__body {
    padding: 30px 28px 24px;
    text-align: center;
}

.confirm-dialog__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: rgba(255, 107, 129, 0.13);
    color: var(--danger);
    font-size: 1.2rem;
}

.confirm-dialog__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.confirm-dialog__text {
    margin-top: 8px;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.confirm-dialog__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-mute);
    font-size: 0.76rem;
}

.breadcrumbs a {
    color: var(--text-dim);
    transition: color 0.2s var(--ease);
}

.breadcrumbs a:hover {
    color: var(--purple-text);
}

.breadcrumbs i {
    font-size: 0.54rem;
    opacity: 0.65;
}

.breadcrumbs span {
    color: var(--text);
    max-width: 46ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Movie cards with quick view */
.movie-card {
    position: relative;
}

.movie-card__link {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    color: inherit;
}

.movie-quick {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(11, 11, 14, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.movie-card:hover .movie-quick,
.movie-card:focus-within .movie-quick {
    opacity: 1;
    transform: scale(1);
}

.movie-quick:hover {
    background: var(--purple);
}

@media (hover: none) {
    .movie-quick {
        opacity: 1;
        transform: scale(1);
    }
}

/* Sticky sorting + filters */
.catalog {
    min-width: 0;
}

.filter-sticky {
    position: sticky;
    top: 72px;
    z-index: 22;
    padding: 9px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--outline);
    background: rgba(11, 11, 14, 0.84);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
}

.sort-direction {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.filter-chip--settings {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.filter-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: var(--pill);
    background: var(--purple);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(145, 70, 255, 0.35);
    border-radius: var(--pill);
    background: var(--purple-soft);
    color: var(--purple-text);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.active-filter:hover {
    background: var(--purple-soft-strong);
    color: #fff;
}

.active-filter i {
    font-size: 0.62rem;
    opacity: 0.8;
}

/* Settings dialog */
.settings-dialog {
    width: min(780px, calc(100vw - 32px));
}

.settings-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--outline);
}

.settings-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-top: 14px;
    align-items: start;
}

.segmented--small {
    display: inline-grid;
    margin-top: 0;
}

.segmented--small .segment {
    height: 42px;
    padding: 0 12px;
    font-size: 0.76rem;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--purple);
}

.check-row--compact {
    margin: 14px 0;
    font-size: 0.82rem;
}

.check-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.check-row--remember {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--outline);
}

.check-row--privacy {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.rating-range {
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    transition: opacity 0.2s var(--ease);
}

.rating-range.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.rating-range__labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-mute);
    font-size: 0.74rem;
}

.rating-range__labels strong {
    color: var(--purple-text);
    font-weight: 600;
}

.range-pair {
    display: grid;
    gap: 8px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: var(--pill);
    background: var(--surface-4);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    border: 2px solid var(--surface-1);
    border-radius: 50%;
    background: var(--purple-bright);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface-1);
    border-radius: 50%;
    background: var(--purple-bright);
    cursor: pointer;
}

.rating-slider__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.rating-slider__head label {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
}

.rating-slider__value {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--pill);
    background: var(--purple-soft);
    color: var(--purple-text);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.rating-range[type="range"] {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: linear-gradient(90deg, var(--purple) var(--rating-fill, 50%), var(--surface-4) var(--rating-fill, 50%));
}

.rating-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--text-mute);
    font-size: 0.66rem;
}

/* Quick view */
.quick-view {
    width: min(840px, calc(100vw - 32px));
    padding: 0;
    overflow: visible;
}

.quick-view__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.quick-view__grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 26px;
    padding: 28px;
}

.quick-view__poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
}

.quick-view__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(220, 199, 255, 0.4);
    font-size: 2rem;
}

.quick-view__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-top: 8px;
}

.quick-view__desc {
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 9.5em;
    overflow: auto;
}

.quick-view__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.quick-view__actions {
    margin-top: 22px;
}

/* Skeletons */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 20px;
}

.skeleton-card {
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    padding-bottom: 16px;
}

.skeleton-poster {
    aspect-ratio: 2 / 3;
    background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 40%, var(--surface-2) 60%);
    background-size: 220% 100%;
    animation: shimmer 1.3s linear infinite;
}

.skeleton-line {
    height: 11px;
    margin: 14px 16px 0;
    border-radius: var(--pill);
    background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 40%, var(--surface-2) 60%);
    background-size: 220% 100%;
    animation: shimmer 1.3s linear infinite;
}

.skeleton-line--title {
    height: 14px;
    width: 65%;
}

@keyframes shimmer {
    to {
        background-position: -220% 0;
    }
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.load-more-wrap .btn[hidden] {
    display: none;
}

/* View transitions */
@view-transition {
    navigation: auto;
}

#movies-list {
    view-transition-name: movie-grid;
}

::view-transition-old(movie-grid),
::view-transition-new(movie-grid) {
    animation-duration: 0.32s;
    animation-timing-function: var(--ease);
}

/* Reviews extras */
.section-head--reviews {
    align-items: flex-start;
}

.review-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.review-sort .filter-chip {
    height: 34px;
    padding: 0 13px;
    font-size: 0.73rem;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--outline);
}

.review-actions form {
    display: inline-flex;
}

.review-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--pill);
    background: transparent;
    color: var(--text-mute);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.review-action:hover {
    background: var(--surface-3);
    color: var(--text);
}

.review-action--danger:hover {
    background: rgba(255, 107, 129, 0.12);
    color: #FFB3BF;
}

.comment-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-left: 14px;
    border-left: 1px solid var(--outline);
}

.comment--reply .avatar {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
}

.comment--reply .comment__content {
    background: var(--surface-4);
}

.reply-box {
    margin-top: 8px;
}

.reply-box summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--purple-text);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.reply-box summary::-webkit-details-marker {
    display: none;
}

.comment-form--reply {
    margin-top: 8px;
}

.comment-form--reply .form-control {
    height: 38px;
    font-size: 0.8rem;
}

.comment-form--reply .comment-form__submit {
    width: 38px;
    height: 38px;
}

/* Profile extras */
.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 20px;
    padding: 22px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
}

.privacy-note__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--purple-soft);
    color: var(--purple-text);
}

.privacy-note strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.privacy-note p {
    margin-top: 4px;
    color: var(--text-mute);
    font-size: 0.84rem;
}

.profile-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.profile-metric {
    padding: 16px 18px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.profile-metric span {
    display: block;
    color: var(--text-mute);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-metric strong {
    display: block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.section-head--achievements {
    align-items: center;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.achievement {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    opacity: 0.55;
    transition: opacity 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.achievement.is-unlocked {
    opacity: 1;
    border-color: rgba(145, 70, 255, 0.3);
    background: linear-gradient(180deg, rgba(145, 70, 255, 0.09), transparent 70%), var(--surface-1);
}

.achievement.is-secret {
    border-style: dashed;
}

.achievement__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--surface-3);
    color: var(--text-mute);
    font-size: 1rem;
}

.achievement.is-unlocked .achievement__icon {
    background: var(--purple-soft);
    color: var(--purple-bright);
}

.achievement__body {
    min-width: 0;
    flex: 1;
}

.achievement__title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.achievement__desc {
    margin-top: 4px;
    color: var(--text-mute);
    font-size: 0.75rem;
    line-height: 1.45;
}

.achievement__done {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    color: var(--success);
    font-size: 0.68rem;
    font-weight: 600;
}

.achievement__progress {
    height: 5px;
    margin-top: 10px;
    border-radius: var(--pill);
    background: var(--surface-3);
    overflow: hidden;
}

.achievement__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--purple);
}

.achievement__count,
.achievement__hint {
    display: block;
    margin-top: 5px;
    color: var(--text-mute);
    font-size: 0.66rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--outline);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--surface-3);
    color: var(--purple-bright);
    font-size: 0.8rem;
}

.activity-item__body {
    flex: 1;
    min-width: 0;
}

.activity-item__body a {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 500;
}

.activity-item__body a:hover {
    color: var(--purple-text);
}

.activity-item__body p {
    margin-top: 2px;
    color: var(--text-mute);
    font-size: 0.74rem;
}

.activity-item time {
    flex-shrink: 0;
    color: var(--text-mute);
    font-size: 0.68rem;
}

.profile-review-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.searchbar--compact {
    flex: 1 1 280px;
    height: 48px;
    max-width: 420px;
    padding-left: 16px;
}

.searchbar--compact input {
    font-size: 0.86rem;
}

.profile-review[hidden] {
    display: none;
}

/* Admin extras */
.admin-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid var(--outline);
    border-radius: var(--pill);
    background: var(--surface-2);
}

.admin-tabs .segment {
    height: 46px;
    font-size: 0.84rem;
    white-space: nowrap;
}

.tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: var(--pill);
    background: var(--surface-4);
    color: var(--text-dim);
    font-size: 0.64rem;
    font-weight: 600;
}

.tab-count--alert {
    background: rgba(255, 107, 129, 0.18);
    color: #FFB3BF;
}

.admin-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-toolbar__row--between {
    justify-content: space-between;
}

.admin-panel {
    animation: rise 0.35s var(--ease) both;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.health-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.health-card--warn {
    border-color: rgba(255, 196, 107, 0.28);
    background: linear-gradient(180deg, rgba(255, 196, 107, 0.07), transparent 70%), var(--surface-1);
}

.health-card__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--surface-3);
    color: var(--warning);
}

.health-card div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.health-card strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
}

.health-card span {
    color: var(--text-mute);
    font-size: 0.74rem;
}

.health-card .link-button {
    flex-shrink: 0;
}

.admin-movie-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-movie {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 80px auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid var(--outline);
    border-radius: 16px;
    background: var(--surface-1);
}

.admin-movie__poster {
    width: 44px;
    height: 64px;
    overflow: hidden;
    border-radius: 9px;
    background: var(--surface-3);
}

.admin-movie__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-movie__poster span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--text-mute);
}

.admin-movie__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.admin-movie__info a {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-movie__info a:hover {
    color: var(--purple-text);
}

.admin-movie__info span {
    color: var(--text-mute);
    font-size: 0.72rem;
}

.admin-movie__rating {
    color: var(--purple-text);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.admin-movie__rating i {
    font-size: 0.62rem;
    color: var(--warning);
}

.admin-movie__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-movie__actions form {
    display: inline-flex;
}

.icon-btn--danger:hover {
    border-color: rgba(255, 107, 129, 0.35);
    background: rgba(255, 107, 129, 0.12);
    color: #FFB3BF;
}

.moderation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moderation-item {
    padding: 16px 18px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.moderation-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.moderation-item__head a {
    font-weight: 600;
}

.moderation-item p {
    color: var(--text-dim);
    font-size: 0.84rem;
}

.moderation-item__quote {
    margin-top: 8px;
    padding: 10px 14px;
    border-left: 2px solid var(--purple);
    border-radius: 0 10px 10px 0;
    background: var(--surface-2);
    color: var(--text-dim) !important;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.moderation-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.moderation-item__actions form {
    display: inline-flex;
}

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    overflow: hidden;
}

.audit-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline);
}

.audit-item:last-child {
    border-bottom: 0;
}

.audit-item__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--purple-bright);
    font-size: 0.62rem;
}

.audit-item div {
    flex: 1;
    min-width: 0;
}

.audit-item p {
    color: var(--text-dim);
    font-size: 0.82rem;
}

.audit-item em {
    color: var(--purple-text);
    font-style: normal;
}

.audit-item time {
    flex-shrink: 0;
    color: var(--text-mute);
    font-size: 0.66rem;
}

/* Movie forms */
.movie-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.movie-form-fields {
    min-width: 0;
}

.movie-form-preview {
    position: sticky;
    top: 92px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
}

.movie-form-preview__poster {
    position: relative;
    aspect-ratio: 2 / 3;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
}

.movie-form-preview__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-form-preview__poster span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(220, 199, 255, 0.35);
    font-size: 2rem;
}

.movie-form-preview__body {
    padding: 18px;
}

.movie-form-preview__body h3 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

.movie-form-preview__body p {
    margin-top: 6px;
    max-height: 5.5em;
    overflow: hidden;
    color: var(--text-mute);
    font-size: 0.78rem;
    line-height: 1.45;
}

.movie-form-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.movie-form-preview__meta .chip {
    padding: 5px 9px;
    font-size: 0.68rem;
}

.date-field {
    display: flex;
    gap: 8px;
}

.date-field .form-control {
    flex: 1;
}

.date-field__button {
    display: grid;
    place-items: center;
    width: 48px;
    flex-shrink: 0;
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--purple-bright);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.date-field__button:hover {
    background: var(--surface-3);
    border-color: rgba(145, 70, 255, 0.4);
}

.field-hint {
    color: var(--text-mute);
    font-size: 0.74rem;
}

/* Auth extras */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-mute);
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.password-toggle:hover {
    background: var(--surface-3);
    color: var(--text);
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
}

.password-strength__bar {
    flex: 1;
    height: 5px;
    border-radius: var(--pill);
    background: var(--surface-3);
    overflow: hidden;
}

.password-strength__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--danger);
    transition: width 0.25s var(--ease), background 0.25s var(--ease);
}

.password-strength small {
    color: var(--text-mute);
    font-size: 0.66rem;
    white-space: nowrap;
}

.password-strength.is-weak span {
    background: var(--danger);
}

.password-strength.is-fair span {
    background: var(--warning);
}

.password-strength.is-good span,
.password-strength.is-strong span {
    background: var(--success);
}

.auth-footnote {
    margin-top: 18px;
    color: var(--text-mute);
    font-size: 0.78rem;
    text-align: center;
}

.field__between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Error page extras */
.error-reels {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--purple-bright);
}

.error-reels span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--outline);
    border-radius: 13px;
    background: var(--surface-2);
    font-size: 0.9rem;
    animation: reel-float 3s var(--ease) infinite;
}

.error-reels span:nth-child(2) {
    animation-delay: 0.35s;
}

.error-reels span:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes reel-float {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.75;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--outline);
    position: relative;
    z-index: 1;
}

.error-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-mute);
    font-size: 0.78rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}

.error-links a:hover {
    color: var(--purple-text);
}

/* Responsive additions */
@media (max-width: 900px) {
    .topbar-actions {
        margin-left: auto;
    }

    .menu-toggle {
        margin-left: 0;
    }

    .filter-sticky {
        top: 62px;
        margin-left: -18px;
        margin-right: -18px;
        padding: 9px 18px;
    }

    .filter-chip--settings {
        margin-left: 0;
    }

    .quick-view__grid {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px;
    }

    .quick-view__poster {
        width: min(220px, 60%);
        margin: 0 auto;
    }

    .movie-form-layout {
        grid-template-columns: 1fr;
    }

    .movie-form-preview {
        position: static;
        width: min(320px, 100%);
        margin: 0 auto;
    }

    .admin-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 24px;
    }

    .notif-panel {
        position: fixed;
        top: 66px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .profile-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .filter-sticky {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .filter-row {
        gap: 8px;
    }

    .filter-chip--settings {
        height: 38px;
        padding: 0 14px;
        font-size: 0.76rem;
    }

    .active-filter {
        height: 28px;
        font-size: 0.68rem;
    }

    .settings-dialog {
        width: calc(100vw - 20px);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .quick-view__grid {
        padding: 18px;
    }

    .quick-view__close {
        top: 10px;
        right: 10px;
    }

    .movie-form-preview {
        width: 100%;
    }

    .admin-movie {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px 10px;
    }

    .admin-movie__rating {
        display: none;
    }

    .admin-movie__poster {
        width: 38px;
        height: 56px;
    }

    .admin-toolbar__row--between {
        align-items: flex-start;
        flex-direction: column;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }

    .profile-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .profile-metric {
        padding: 13px 14px;
    }

    .profile-metric strong {
        font-size: 1.25rem;
    }

    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .review-sort {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .review-sort::-webkit-scrollbar {
        display: none;
    }

    .review-action {
        padding: 0 8px;
        font-size: 0.68rem;
    }

    .activity-item {
        flex-wrap: wrap;
    }

    .activity-item time {
        margin-left: 46px;
    }

    .admin-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .admin-tabs .segment {
        height: 42px;
        font-size: 0.76rem;
    }

    .notif-panel {
        top: 62px;
        left: 8px;
        right: 8px;
    }

    .error-reels span {
        width: 34px;
        height: 34px;
    }
}


.bottom-nav a {
    position: relative;
}

.topbar-actions .menu-toggle {
    margin-left: 0;
}

@media (min-width: 901px) {
    .topbar-actions {
        margin-left: 0;
    }
}

.segment {
    background: transparent;
}

.segmented--small .segment {
    white-space: nowrap;
}

.admin-tabs {
    margin-top: 0;
}

.admin-tabs .segment {
    background: transparent;
    color: var(--text-dim);
}

.admin-tabs .segment.is-active {
    background: var(--surface-4);
    color: #fff;
}

.admin-user__name {
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.admin-user__bio {
    overflow-wrap: anywhere;
}

.check-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 1px solid var(--outline-strong);
    border-radius: 6px;
    background: var(--surface-2);
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.check-row input[type="checkbox"]:checked {
    border-color: var(--purple);
    background: var(--purple);
}

.check-row input[type="checkbox"]:checked::after {
    content: "✓";
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.quick-view {
    overflow: auto;
}

html {
    overflow-x: clip;
}

.dialog,
.settings-dialog,
.quick-view {
    width: min(760px, calc(100% - 32px));
    max-width: calc(100% - 32px);
}

.settings-dialog {
    width: min(780px, calc(100% - 32px));
}

.quick-view {
    width: min(840px, calc(100% - 32px));
}

@media (max-width: 900px) {
    .dialog,
    .settings-dialog,
    .quick-view {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
    }

    .filter-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
    }

    .filter-label,
    .chip-group {
        grid-column: 1 / -1;
    }

    .sort-direction {
        grid-column: 1;
        justify-self: start;
    }

    .filter-chip--settings {
        grid-column: 2;
        justify-self: start;
        margin-left: 0;
        width: auto;
    }
}

@media (max-width: 900px) {
    .filter-sticky {
        top: 74px;
    }

    .notif-panel {
        top: 78px;
    }
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
}

.review-sort .filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .page {
        padding-bottom: 110px;
    }
}

.rec-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.rec-card {
    position: relative;
}

.rec-card__media {
    position: relative;
    aspect-ratio: 2 / 3;
}

.rec-card__rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--pill);
    background: rgba(11, 11, 14, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--purple-text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.rec-card__body {
    padding: 18px;
    gap: 14px;
}

.rec-card__title {
    font-size: 1.08rem;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .rec-grid {
        grid-template-columns: 1fr;
    }
}

/* Mini-game easter egg */
.mini-game {
    width: min(560px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    padding: 0;
    overflow: hidden;
}

.mini-game__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--outline);
    background:
        radial-gradient(110% 150% at 100% 0%, rgba(145, 70, 255, 0.18), transparent 58%),
        var(--surface-1);
}

.mini-game__head .dialog__title {
    margin-top: 6px;
}

.mini-game__body {
    padding: 20px 24px 24px;
}

.mini-game__hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-mute);
    font-size: 0.78rem;
}

.mini-game__hud strong {
    color: var(--purple-text);
    font-variant-numeric: tabular-nums;
}

.mini-game__track {
    position: relative;
    height: 86px;
    overflow: hidden;
    border: 1px solid var(--outline-strong);
    border-radius: 18px;
    background:
        repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.055) 18px 24px),
        linear-gradient(180deg, #141418, #0B0B0E);
}

.mini-game__track::before,
.mini-game__track::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 9px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 18px);
    pointer-events: none;
}

.mini-game__track::before {
    top: 6px;
}

.mini-game__track::after {
    bottom: 6px;
}

.mini-game__target {
    position: absolute;
    top: 18px;
    bottom: 18px;
    border: 1px solid rgba(145, 70, 255, 0.65);
    border-radius: 8px;
    background: rgba(145, 70, 255, 0.16);
    box-shadow: 0 0 22px rgba(145, 70, 255, 0.22) inset;
}

.mini-game__perfect {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 5px;
    background: rgba(169, 112, 255, 0.55);
}

.mini-game__marker {
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 4px;
    margin-left: -2px;
    border-radius: var(--pill);
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 22px rgba(145, 70, 255, 0.8);
    will-change: left;
}

.mini-game__hint {
    margin-top: 14px;
    color: var(--text-dim);
    font-size: 0.84rem;
    text-align: center;
}

.mini-game__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.mini-game__result {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 0.86rem;
    text-align: center;
}

.mini-game__result.is-perfect {
    background: rgba(100, 240, 166, 0.12);
    color: var(--success);
}

.mini-game__result.is-hit {
    background: rgba(145, 70, 255, 0.14);
    color: var(--purple-text);
}

.mini-game__result.is-miss {
    background: rgba(255, 107, 129, 0.12);
    color: #FFB3BF;
}

.mini-game__result.is-finished {
    background: var(--surface-3);
    color: var(--text);
}

.mini-game__guest {
    color: var(--text-mute);
    font-size: 0.78rem;
}

@media (max-width: 640px) {
    .mini-game {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
    }

    .mini-game__head,
    .mini-game__body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mini-game__track {
        height: 78px;
    }
}

.profile-review {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.profile-review__poster {
    width: 74px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: 13px;
    background: linear-gradient(150deg, #2A2140, #141418 70%);
}

.profile-review__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-review__poster span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(220, 199, 255, 0.35);
    font-size: 1.2rem;
}

.profile-review__main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 640px) {
    .profile-review {
        gap: 12px;
    }

    .profile-review__poster {
        width: 60px;
        border-radius: 11px;
    }
}

.rec-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.rec-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.rec-grid--1 {
    grid-template-columns: minmax(0, 260px);
    justify-content: center;
}

.rec-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 260px));
    justify-content: center;
}

.rec-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 260px));
    justify-content: center;
}

.rec-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 260px));
    justify-content: center;
}

.rec-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rec-card__body {
    padding: 14px;
    gap: 10px;
}

.rec-card__title {
    font-size: 0.98rem;
}

@media (max-width: 1100px) {
    .rec-grid,
    .rec-grid--3,
    .rec-grid--4,
    .rec-grid--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
    }
}

@media (max-width: 680px) {
    .rec-grid,
    .rec-grid--3,
    .rec-grid--4,
    .rec-grid--5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .rec-grid,
    .rec-grid--2,
    .rec-grid--3,
    .rec-grid--4,
    .rec-grid--5 {
        grid-template-columns: minmax(0, 1fr);
    }
}

.review-comments__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment__meta time {
    color: var(--text-mute);
    font-size: 0.68rem;
}

.review-comments__list {
    display: block;
}

.review-comments__list > .comment {
    margin: 0 0 12px;
}

.review-comments__list > .comment:last-child {
    margin-bottom: 0;
}

.review-comments__list > .comment {
    margin-bottom: 18px;
}

.review-comments__list > .comment:last-child {
    margin-bottom: 0;
}
