/* ============================================================
   MoovieHub – Premium Dark Theme Stylesheet
   Design tokens → Layout → Components → Animations → Responsive
   ============================================================ */

/* ============================
   1. CSS CUSTOM PROPERTIES
   ============================ */
:root {
    /* Colors */
    --bg-primary: #14141f;
    --bg-secondary: #1c1c2e;
    --bg-sidebar: #0f0f1a;
    --bg-card: #1a1a2c;
    --bg-card-hover: #22223a;
    --bg-input: #1e1e32;
    --bg-overlay: rgba(10, 10, 18, 0.7);
    --accent: #e50914;
    --accent-hover: #ff2d2d;
    --accent-glow: rgba(229, 9, 20, 0.35);
    --text-primary: #f0f0f5;
    --text-secondary: #9a9ab0;
    --text-muted: #5a5a72;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.08);
    --status-online: #44b700;
    --status-away: #a855f7;
    --status-busy: #ef4444;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --sidebar-width: 230px;
    --topbar-height: 68px;
    --content-padding: 28px;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 30px var(--accent-glow);
}

/* ============================
   1.1 LIGHT THEME CUSTOM PROPERTIES
   ============================ */
html[data-theme="light"] {
    --bg-primary: #f0f0f5;
    --bg-secondary: #e4e4eb;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f9fb;
    --bg-input: #f0f0f5;
    --bg-overlay: rgba(255, 255, 255, 0.8);
    --accent: #e50914;
    --accent-hover: #ff2d2d;
    --accent-glow: rgba(229, 9, 20, 0.2);
    --text-primary: #14141f;
    --text-secondary: #5a5a72;
    --text-muted: #9a9ab0;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-card: rgba(0, 0, 0, 0.05);

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ============================
   2. RESET & BASE
   ============================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

[hidden] {
    display: none !important;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: block;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

ul,
ol {
    list-style: none;
}

fieldset {
    border: none;
}

input,
button,
textarea {
    font: inherit;
}

dialog {
    border: none;
    padding: 0;
    background: none;
    max-width: none;
    max-height: none;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ============================
   3. UTILITY CLASSES
   ============================ */
.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;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 16px;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================
   4. SCROLLBAR
   ============================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) transparent;
}

/* ============================
   5. BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--accent:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn--accent:active {
    transform: translateY(0) scale(0.98);
}

.btn--watch {
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-text:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.btn-text__icon {
    flex-shrink: 0;
}

.btn-text--logout {
    color: var(--status-busy);
    opacity: 0.7;
}

.btn-text--logout:hover {
    opacity: 1;
    color: var(--status-busy);
    background: rgba(239, 68, 68, 0.08);
}

/* ============================
   6. INDICATORS
   ============================ */
.indicator {
    display: inline-block;
    width: 32px;
    height: 14px;
    border-radius: 7px;
    vertical-align: middle;
    margin-left: 10px;
}

.indicator--live {
    background: var(--accent);
    animation: pulse-glow 2s ease-in-out infinite;
}

.indicator--progress {
    background: linear-gradient(90deg, var(--accent) 60%, var(--bg-card) 60%);
    border: 1px solid var(--border-card);
}

/* ============================
   7. SIDEBAR
   ============================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition-slow);
}

.sidebar__brand {
    margin-bottom: 36px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--text-primary);
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.85;
}

.logo__wordmark {
    font-family: 'Arial Black', 'Segoe UI Black', var(--font-family);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.055em;
    text-transform: uppercase;
}

.logo__hub {
    position: relative;
    isolation: isolate;
    display: inline-block;
    margin-inline-start: 0.15em;
    /* Balance the visible glyphs without moving their baseline. */
    padding-block: 0.115em 0.165em;
    padding-inline: 0.175em 0.265em;
    color: #fff;
}

.logo__hub::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    transform: translate(1px, 1px);
    border-radius: 0.24em;
    background: #cb101d;
}

@media (forced-colors: active) {
    .logo__hub {
        color: LinkText;
    }

    .logo__hub::before {
        outline: 1px solid LinkText;
    }
}

.logo__film {
    position: relative;
    flex: none;
    width: 25px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 4px;
    color: var(--accent);
}

.logo__film::before,
.logo__film::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0 2px,
        currentColor 2px 4px,
        transparent 4px 5px
    ) center / 2px 100% no-repeat;
}

.logo__film::before {
    left: 0;
    border-right: 1px solid currentColor;
}

.logo__film::after {
    right: 0;
    border-left: 1px solid currentColor;
}

.sidebar__heading {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    padding-left: 4px;
}

.sidebar__nav {
    margin-bottom: 32px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar__country {
    margin-top: 24px;
}

.sidebar__country .sidebar__heading {
    display: block;
}

.country-select-field {
    position: relative;
    --country-tint: color-mix(in srgb, var(--accent) 12%, transparent);
    --country-border: color-mix(in srgb, var(--text-primary) 14%, transparent);
    --country-icon: color-mix(in srgb, var(--accent) 65%, var(--text-primary));
}

.country-select-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 11px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border-radius: var(--radius-sm);
    background: var(--country-tint);
    color: var(--country-icon);
    pointer-events: none;
}

.country-select-icon::before,
.country-select-icon::after {
    content: "";
    grid-area: 1 / 1;
    height: 15px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.country-select-icon::before {
    width: 15px;
    background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}

.country-select-icon::after {
    width: 7px;
}

.country-select {
    width: 100%;
    min-height: 50px;
    padding: 9px 10px 9px 49px;
    border: 1px solid var(--country-border, var(--border-subtle));
    border-radius: var(--radius-md);
    background: linear-gradient(115deg, var(--bg-input), var(--bg-card));
    color: var(--text-primary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.country-select:is(:hover, :open) {
    border-color: var(--country-icon);
}

.country-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.country-select:focus-visible {
    outline: 2px solid var(--country-icon);
    outline-offset: 2px;
}

@supports (appearance: base-select) and selector(::picker(select)) {
    .country-select,
    .country-select::picker(select) {
        appearance: base-select;
    }

    .country-select {
        align-items: center;
        padding-right: 15px;
    }

    .country-select::picker-icon {
        width: 7px;
        height: 7px;
        margin-left: auto;
        border-right: 1.5px solid var(--text-secondary);
        border-bottom: 1.5px solid var(--text-secondary);
        content: "";
        rotate: 45deg;
        transition: rotate var(--transition-fast);
    }

    .country-select:open::picker-icon {
        rotate: 225deg;
    }

    .country-select::picker(select) {
        position-area: block-end span-inline-end;
        position-try-fallbacks: none;
        max-height: min(370px, calc(100% - 12px));
        overflow-y: auto;
        overscroll-behavior: contain;
        margin-block: 6px;
        padding: 5px;
        border: 1px solid var(--country-border, var(--border-subtle));
        border-radius: var(--radius-md);
        background: var(--bg-card);
        box-shadow: var(--shadow-elevated);
        font: inherit;
        font-size: 0.85rem;
    }

    .country-select option {
        min-height: 36px;
        padding: 7px 10px;
        border-radius: var(--radius-xs);
        cursor: pointer;
    }

    .country-select option::checkmark {
        order: 1;
        margin-inline-start: auto;
        color: var(--country-icon);
    }

    .country-select option:checked {
        background: var(--country-tint);
        font-weight: 600;
    }

    .country-select option:hover,
    .country-select option:focus-visible {
        background: var(--bg-card-hover);
        outline: 1px solid var(--country-border);
        outline-offset: -1px;
    }
}

.genre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.genre-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-base);
}

.genre-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.genre-btn.genre-btn--active {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link--active {
    color: var(--text-primary);
    background: rgba(229, 9, 20, 0.1);
}

.nav-link--active .nav-link__icon {
    color: var(--accent);
}

.nav-link--active::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-link__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: color var(--transition-fast);
}

.sidebar__following {
    flex: 1;
    margin-bottom: 16px;
}

/* Following list */
.following-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.following-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.following-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.following-item__avatar {
    position: relative;
    flex-shrink: 0;
}

.following-item__avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.following-item__status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-sidebar);
}

.following-item__status--online {
    background: var(--status-online);
}

.following-item__status--away {
    background: var(--status-away);
}

.following-item__status--busy {
    background: var(--status-busy);
}

.following-item__name {
    flex: 1;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.following-item__action {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.following-item__action--online {
    color: var(--status-online);
}

.following-item__action--away {
    color: var(--status-away);
}

.sidebar__footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

/* Sidebar toggle */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border-radius: var(--radius-sm);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-toggle svg {
    transition: transform 0.6s ease;
}

.sidebar-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* ============================
   8. MAIN CONTENT
   ============================ */
.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0 var(--content-padding) var(--content-padding);
    transition: margin-left var(--transition-base);
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

body.sidebar-collapsed .main {
    margin-left: 0;
}

/* ============================
   9. TOPBAR
   ============================ */
.topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, var(--bg-primary) 60%, transparent 100%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.topbar__history {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.topbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.topbar__btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.topbar__btn--avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    border: 2px solid var(--border-card);
    transition: border-color var(--transition-fast);
}

.topbar__btn--avatar:hover {
    border-color: var(--accent);
    background: none;
}

.topbar__avatar-placeholder {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
}

.topbar__avatar-placeholder::before,
.topbar__avatar-placeholder::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
}

.topbar__avatar-placeholder::before {
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.topbar__avatar-placeholder::after {
    top: 18px;
    width: 17px;
    height: 9px;
    border-radius: 10px 10px 4px 4px;
}

.topbar__btn--avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watchlist-login__icon {
    position: relative;
    flex: none;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 3px solid currentColor;
    border-radius: 50%;
    color: var(--text-secondary);
}

.watchlist-login__icon::before,
.watchlist-login__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
}

.watchlist-login__icon::before {
    top: 8px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
}

.watchlist-login__icon::after {
    top: 31px;
    width: 44px;
    height: 38px;
    border-radius: 50% 50% 0 0;
}

/* Search */
.search {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}

.search__icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search__input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-base);
}

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

.search__input:focus {
    border-color: rgba(229, 9, 20, 0.4);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search__settings {
    position: absolute;
    right: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.search__settings:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

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

/* User Menu & Dropdown */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-dropdown__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    width: 100%;
    text-align: left;
}

.user-dropdown__link svg {
    color: var(--text-muted);
}

.user-dropdown__link:hover {
    background: var(--bg-card-hover);
}

.user-dropdown__link--logout {
    color: var(--accent);
}

.user-dropdown__link--logout svg {
    color: var(--accent);
}

.user-dropdown__divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 0;
}

.user-dropdown__theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}

.theme-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.theme-label svg {
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    border-radius: 22px;
    transition: .3s ease;
    border: 1px solid var(--border-subtle);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: .3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

input:checked+.slider {
    background-color: var(--accent);
    border-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(18px);
    background-color: #fff;
}

/* ============================
   10. SECTION HEADERS
   ============================ */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ============================
   11. HERO SECTION
   ============================ */
.hero {
    margin-bottom: 32px;
}

.hero-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 400px;
    background: var(--bg-card);
    box-shadow: var(--shadow-elevated);
    display: flex;
    animation: fadeInUp 0.6s ease;
}

.hero-card__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
}

.hero-card__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-card__backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
            rgba(15, 15, 26, 0.97) 0%,
            rgba(15, 15, 26, 0.88) 25%,
            rgba(15, 15, 26, 0.6) 50%,
            rgba(15, 15, 26, 0.15) 75%,
            transparent 100%);
}

/* Bottom gradient for readability */
.hero-card__backdrop::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(15, 15, 26, 0.7), transparent);
    z-index: 1;
}

.hero-card__body {
    position: relative;
    z-index: 2;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    max-width: 55%;
    /* Force light text on hero card regardless of theme (backdrop is always dark) */
    color: #f0f0f5;
}

/* Override all text colors inside hero to stay light on any theme */
.hero-card__body .hero-card__title,
.hero-card__body .meta-badge,
.hero-card__body .meta-badge strong,
.hero-card__body .meta-badge__lang,
.hero-card__body .meta-badge__quality,
.hero-card__body .hero-card__desc {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.hero-card__title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 18px;
}

.hero-card__title em {
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-card__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.meta-badge__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #f5c518;
    color: #000;
}

.meta-badge strong {
    color: var(--text-primary);
}

.meta-badge__flag {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
}

.meta-badge__separator {
    font-size: 0.4rem;
    color: #3b3b55;
}

.meta-badge__lang,
.meta-badge__quality {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.hero-card__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Hero thumbnails */
.hero-card__thumbs {
    position: absolute;
    right: 32px;
    bottom: 32px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-thumb {
    position: relative;
}

.hero-thumb__img {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
    cursor: pointer;
}

.hero-thumb__img:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.hero-thumb__dot {
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    cursor: pointer;
}

/* Hero skeleton overrides */
.hero-card--skeleton .hero-card__body {
    max-width: 100%;
}

/* ============================
   12. PARTIES SECTION
   ============================ */
.parties {
    margin-bottom: 32px;
}

.parties__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.party-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition-base);
    animation: fadeInUp 0.5s ease both;
    cursor: pointer;
}

.party-card:nth-child(2) {
    animation-delay: 0.08s;
}

.party-card:nth-child(3) {
    animation-delay: 0.16s;
}

.party-card:nth-child(4) {
    animation-delay: 0.24s;
}

.party-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.party-card__poster {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.party-card__info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.party-card__genre {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================
   13. CONTINUE WATCHING
   ============================ */
.continue {
    margin-bottom: 32px;
}

.continue__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.continue-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg-card);
    cursor: pointer;
    animation: fadeInUp 0.5s ease both;
    transition: all var(--transition-base);
}

.continue-card:nth-child(2) {
    animation-delay: 0.08s;
}

.continue-card:nth-child(3) {
    animation-delay: 0.16s;
}

.continue-card:nth-child(4) {
    animation-delay: 0.24s;
}

.continue-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-elevated);
}

.continue-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.continue-card:hover .continue-card__img {
    transform: scale(1.08);
}

.continue-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 18, 0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.continue-card:hover .continue-card__overlay {
    opacity: 1;
}

.continue-card__title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-card__progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.continue-card__progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width var(--transition-slow);
}

.continue-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.continue-card:hover .continue-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.continue-card__play svg {
    margin-left: 3px;
}

/* ============================
   13.5. SEARCH DROPDOWN
   ============================ */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    z-index: 1000;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.search-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.search-dropdown__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background var(--transition-base);
    text-decoration: none;
    color: var(--text-primary);
}

.search-dropdown__item:hover {
    background: var(--bg-card-hover);
}

.search-dropdown__poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
    background: var(--bg-card);
}

.search-dropdown__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.search-dropdown__title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown__meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.search-dropdown__more {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: none;
    border-top: 1px solid var(--border-subtle);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-base);
}

.search-dropdown__more:hover {
    background: var(--bg-card-hover);
}

.search-dropdown__empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================
   14. SEARCH RESULTS
   ============================ */
.search-results {
    animation: fadeIn 0.3s ease;
}

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

.search-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: all var(--transition-base);
    animation: fadeInUp 0.4s ease both;
}

.search-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: rgba(255, 255, 255, 0.12);
}

.search-card__poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.search-card__info {
    padding: 12px;
}

.search-card__info h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card__year {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.search-card__rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 700;
    color: #f5c518;
}

.search-results__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================
   15. COMING SOON VIEW
   ============================ */
.coming-soon-view {
    animation: fadeIn 0.3s ease;
}

.trending-slider {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    list-style: none;
    -webkit-overflow-scrolling: touch;
}

.trending-slider {
    scrollbar-width: thin;
    scrollbar-color: var(--border-card) transparent;
}

.trending-slider::-webkit-scrollbar {
    height: 6px;
}

.trending-slider::-webkit-scrollbar-track {
    background: transparent;
}

.trending-slider::-webkit-scrollbar-thumb {
    background-color: var(--border-card);
    border-radius: 10px;
}

.trending-slider::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

.trending-slider .coming-soon-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
}

.coming-soon__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    list-style: none;
}

.coming-soon-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: all var(--transition-base);
    animation: fadeInUp 0.4s ease both;
}

.coming-soon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(229, 9, 20, 0.15), var(--shadow-card);
    border-color: rgba(229, 9, 20, 0.3);
}

.coming-soon-card__poster-wrap {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.coming-soon-card__poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.coming-soon-card:hover .coming-soon-card__poster {
    transform: scale(1.05);
}

.coming-soon-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
}

.coming-soon-card__rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 700;
    color: #f5c518;
}

.coming-soon-card__info {
    padding: 14px;
}

.coming-soon-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.coming-soon-card__origin {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

.coming-soon-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.coming-soon-card__genre {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================
   16. MODAL
   ============================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
}

.modal__content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 440px;
    width: 90%;
    box-shadow: var(--shadow-elevated);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal__header {
    text-align: center;
    margin-bottom: 28px;
}

.modal__logo {
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
}

.modal__header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal__desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.modal__body {
    margin-bottom: 24px;
}

.modal__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal__input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-base);
}

.modal__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.modal__error {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--status-busy);
    min-height: 1.2em;
}

.modal__help {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.modal__help a {
    color: var(--accent);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.modal__help a:hover {
    color: var(--accent-hover);
}

.modal__footer {
    display: flex;
    justify-content: center;
}

.modal__footer .btn {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
}

/* ============================
   16. SKELETON LOADING
   ============================ */
.skeleton {
    display: block;
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            rgba(255, 255, 255, 0.05) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton--full {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.skeleton--title {
    display: block;
    height: 40px;
    width: 60%;
    border-radius: var(--radius-sm);
}

.skeleton--text {
    display: block;
    height: 18px;
    width: 40%;
}

.skeleton--card {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton--poster {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg);
}

/* ============================
   17. ANIMATIONS
   ============================ */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--accent-glow);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 8px 4px var(--accent-glow);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================
   14. WATCH VIEW
   ============================ */
.watch-view {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 16px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.watch-player {
    width: 100%;
    position: relative;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-subtle);
}

.trailer-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.trailer-fallback__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.trailer-fallback__title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.trailer-fallback__desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.trailer-fallback__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: var(--radius-full);
    text-decoration: none;
}

.trailer-fallback__btn svg {
    flex-shrink: 0;
}

.watch-player iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Customize Plyr theme */
.plyr {
    --plyr-color-main: var(--accent-primary);
    --plyr-video-background: #000;
    border-radius: var(--radius-lg);
}

.watch-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.watch-info__header {
    margin-bottom: 24px;
}

.watch-info__title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.watch-info__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.watch-info__desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
}

.watch-episodes {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
}

.watch-episodes__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.watch-episodes__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for episodes list */
.watch-episodes__list::-webkit-scrollbar {
    width: 6px;
}

.watch-episodes__list::-webkit-scrollbar-track {
    background: transparent;
}

.watch-episodes__list::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 10px;
}

.btn-episode {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-episode:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.btn-episode.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Responsive adjustments for watch view */
@media (max-width: 1024px) {
    .watch-details {
        grid-template-columns: 1fr;
    }
}


/* ============================
   15. RESPONSIVE
   ============================ */

/* Large tablets / small desktops */
@media (max-width: 1200px) {
    :root {
        --content-padding: 22px;
    }

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

    .continue__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-card__title {
        font-size: 2.2rem;
    }

    .hero-card__body {
        max-width: 65%;
    }

    .hero-card__thumbs {
        right: 20px;
        bottom: 20px;
    }

    .hero-thumb__img {
        width: 90px;
        height: 58px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .main {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar--open {
        transform: translateX(0);
        box-shadow: var(--shadow-elevated);
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .hero-card {
        min-height: 340px;
    }

    .hero-card__body {
        max-width: 70%;
        padding: 36px 32px;
    }

    .hero-card__title {
        font-size: 2rem;
    }
}

/* Mobile landscape / small tablets */
@media (max-width: 768px) {
    :root {
        --content-padding: 16px;
    }

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

    .continue__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-card {
        min-height: 300px;
    }

    .hero-card__body {
        max-width: 100%;
        padding: 28px 24px;
    }

    .hero-card__title {
        font-size: 1.6rem;
    }

    .hero-card__thumbs {
        display: none;
    }

    .search {
        max-width: 280px;
    }

    .topbar__actions {
        gap: 0;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .parties__grid {
        grid-template-columns: 1fr;
    }

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

    .hero-card {
        min-height: 260px;
    }

    .hero-card__title {
        font-size: 1.35rem;
    }

    .hero-card__meta {
        gap: 10px;
        margin-bottom: 20px;
    }

    .search {
        max-width: 200px;
    }

    .search__input {
        font-size: 0.82rem;
    }

    .topbar {
        gap: 10px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .btn--watch {
        padding: 10px 28px;
        font-size: 0.88rem;
    }

    .modal__content {
        padding: 28px 20px;
    }

    .search-results__grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}