/* ==========================================================
   BoredFlix shared theme: tokens, nav, search, buttons,
   cards/rails, modal, footer. Used with ui.js.
   ========================================================== */
:root {
    --bg: #050505;
    --bg-2: #0a0a0c;
    --surface: #0f0f12;
    --surface-2: #17171c;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #ffffff;
    --muted: #ffffff;
    --dim: #8a8a94;
    --accent: #e50914;
    --accent-hot: #ff2d3a;
    --accent-glow: rgba(229, 9, 20, 0.45);
    --gold: #f5c518;

    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --maxw: 1480px;
    --gutter: clamp(16px, 4vw, 56px);
    --rail-pad: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
    --card-w: clamp(132px, 14vw, 196px);
    --radius: 14px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

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

:focus-visible {
    outline: 2px solid var(--accent-hot);
    outline-offset: 3px;
    border-radius: 6px;
}

.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;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.35) 60%, transparent 100%);
    transition: background 0.4s ease;
    z-index: -1;
}

.navbar.scrolled::before {
    background: rgba(5, 5, 5, 0.82);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
}

.nav-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 76px;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    transition: height 0.4s var(--ease);
}

.navbar.scrolled .nav-container {
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.logo-img {
    height: 32px;
    width: auto;
    transition: transform 0.3s var(--ease);
}

.logo:hover .logo-img {
    transform: scale(1.04);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 999px;
    transition: background 0.25s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    transform: translateX(-50%);
    background: var(--accent);
}

.nav-link--app {
    margin-left: 0.5rem;
    border: 1px solid var(--line-strong);
}

.nav-link--app svg {
    width: 15px;
    height: 15px;
    color: #3ddc84;
}

.nav-link--app:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 42px;
    padding: 0 0.6rem 0 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-search:focus-within {
    background: rgba(10, 10, 12, 0.9);
    border-color: #fff;
}

.nav-search-icon {
    color: #fff;
    flex-shrink: 0;
}

.nav-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font: 700 0.9rem var(--font-body);
    width: 200px;
    transition: width 0.4s var(--ease);
}

.nav-search:focus-within .nav-search-input {
    width: 260px;
}

.nav-search-input::placeholder {
    color: #fff;
    opacity: 1;
}

.nav-kbd {
    font: 800 0.7rem var(--font-body);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 0.05rem 0.45rem;
}

.nav-search:focus-within .nav-kbd {
    opacity: 0;
}

.nav-search-autocomplete {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: 380px;
    max-height: 460px;
    overflow-y: auto;
    padding: 0.4rem;
    background: rgba(14, 14, 17, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    display: none;
    z-index: 1000;
}

.nav-search-autocomplete.show {
    display: block;
    animation: pop 0.25s var(--ease);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.autocomplete-poster {
    width: 44px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-2);
    flex-shrink: 0;
}

.autocomplete-info {
    min-width: 0;
}

.autocomplete-title {
    font-weight: 800;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-meta {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 600;
}

.autocomplete-empty {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.icon-btn {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.icon-btn svg {
    width: 19px;
    height: 19px;
}

.hamburger {
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 3;
}

.hamburger-line {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.35s var(--ease), opacity 0.2s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.nav-scrim.show {
    opacity: 1;
    pointer-events: auto;
}

.mobile-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 1rem;
    background: rgba(5, 5, 5, 0.97);
}

.mobile-search-overlay.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-search-close {
    display: flex;
}

.mobile-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 48px;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
}

.mobile-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font: 700 1rem var(--font-body);
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding-top: 1rem;
}

.mobile-search-hint {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 52px;
    padding: 0 1.6rem;
    border-radius: 999px;
    font: 800 0.98rem var(--font-body);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease), background 0.3s ease, border-color 0.3s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

.btn-primary {
    background: var(--accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--accent-hot);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.btn-round {
    width: 52px;
    padding: 0;
}

/* ---------- Section heads, rails, cards ---------- */
.row-head {
    max-width: var(--maxw);
    margin: 0 auto 0.6rem;
    padding: 0 var(--gutter);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.row-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-hot);
    margin-bottom: 0.2rem;
}

.row-eyebrow::before {
    content: '';
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.row-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: #fff;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.rail-wrap {
    position: relative;
}

.rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--rail-pad);
    padding: 14px var(--rail-pad) 28px;
    scrollbar-width: none;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail-btn {
    position: absolute;
    top: 14px;
    bottom: 28px;
    width: var(--rail-pad);
    min-width: 64px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rail-btn.prev {
    left: 0;
    background: linear-gradient(90deg, var(--bg) 20%, transparent);
}

.rail-btn.next {
    right: 0;
    background: linear-gradient(270deg, var(--bg) 20%, transparent);
}

.rail-btn span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(25, 25, 30, 0.85);
    border: 1px solid var(--line-strong);
    transition: transform 0.3s var(--ease), background 0.3s ease;
}

.rail-btn:hover span {
    transform: scale(1.1);
    background: var(--accent);
    border-color: var(--accent);
}

.rail-btn svg {
    width: 20px;
    height: 20px;
}

@media (hover: hover) {
    .rail-wrap:hover .rail-btn {
        opacity: 1;
    }
}

.rail-wrap.at-start .rail-btn.prev,
.rail-wrap.at-end .rail-btn.next {
    opacity: 0 !important;
    pointer-events: none;
}

.card {
    flex: 0 0 var(--card-w);
    width: var(--card-w);
    min-width: 0;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
    color: inherit;
    animation: cardIn 0.7s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.card-media {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(145deg, #18181d, #0c0c0f);
    transition: transform 0.5s var(--ease);
    transform: translateZ(0);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease), filter 0.5s ease;
}

.card-noimg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--dim);
}

.card-badge,
.card-rate {
    position: absolute;
    top: 9px;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.5rem;
    border-radius: 7px;
    background: rgba(8, 8, 10, 0.62);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-badge {
    left: 9px;
}

.card-rate {
    right: 9px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gold);
}

.card-rate svg {
    width: 10px;
    height: 10px;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    transition: transform 0.45s var(--ease), opacity 0.3s ease;
}

.card-play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
}

.card-body {
    padding: 0.7rem 0.15rem 0;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}

.card-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.card:hover .card-media,
.card:focus-visible .card-media {
    transform: translateY(-8px);
}

.card:hover .card-media img,
.card:focus-visible .card-media img {
    transform: scale(1.08);
    filter: brightness(0.62);
}

.card:hover .card-play,
.card:focus-visible .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card:focus-visible {
    outline: none;
}

.skeleton-block {
    background: linear-gradient(100deg, #111114 30%, #1c1c22 50%, #111114 70%);
    background-size: 300% 100%;
    animation: shimmer 1.6s linear infinite;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--gutter);
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    position: relative;
    width: min(1100px, 100%);
    animation: pop 0.4s var(--ease);
}

.modal-frame {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line-strong);
}

.modal-frame iframe,
.modal-frame img {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -56px;
    right: 0;
    display: flex;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 3500;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font-weight: 800;
    font-size: 0.9rem;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.3s ease;
}

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

/* ---------- Footer ---------- */
.footer {
    position: relative;
    margin-top: 6rem;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(60% 120% at 50% 0%, rgba(229, 9, 20, 0.08), transparent 60%),
        linear-gradient(180deg, var(--bg-2), #000);
}

.footer-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-cta {
    position: relative;
    margin: -64px 0 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.5rem;
    border-radius: 24px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(229, 9, 20, 0.35), transparent 55%),
        linear-gradient(135deg, #16161b, #0c0c0f);
    border: 1px solid var(--line-strong);
    overflow: hidden;
}

.footer-cta h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    line-height: 1.15;
}

.footer-cta p {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-cta .btn {
    flex-shrink: 0;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 4rem;
    padding-bottom: 3rem;
}

.footer-logo img {
    height: 34px;
    width: auto;
}

.footer-description {
    font-size: 0.92rem;
    line-height: 1.8;
    margin: 1.1rem 0 1.5rem;
    max-width: 380px;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.social-link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    transition: all 0.3s var(--ease);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-link {
    position: relative;
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: var(--accent-hot);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.footer-link:hover::after {
    transform: scaleX(1);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 0.84rem;
}

.footer-bottom a {
    color: var(--dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-extra {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.heart {
    color: var(--accent-hot);
    display: inline-block;
    animation: heartbeat 1.6s ease-in-out infinite;
}

.footer-tmdb {
    padding-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-weight: 600;
}

.footer-wordmark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.5rem, 16vw, 15rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
    text-align: center;
    white-space: nowrap;
    color: transparent;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 35%, var(--accent) 75%, rgba(229, 9, 20, 0.15) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.9;
    padding-top: 1rem;
    margin-bottom: -0.1em;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
}

/* ---------- Animations ---------- */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes shimmer {
    from {
        background-position: 100% 0;
    }

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

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.2);
    }

    40% {
        transform: scale(1);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 960px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(84vw, 340px);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 96px 1.25rem 2rem;
        background: rgba(10, 10, 12, 0.98);
        border-left: 1px solid var(--line);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
        overflow-y: auto;
        z-index: 1;
    }

    .nav-menu.active {
        transform: none;
        visibility: visible;
        transition: transform 0.45s var(--ease), visibility 0s;
    }

    .nav-link {
        width: 100%;
        padding: 0.95rem 1.1rem;
        font-size: 1.05rem;
        border-radius: 14px;
    }

    .nav-link.active {
        background: rgba(229, 9, 20, 0.14);
    }

    .nav-link.active::after {
        left: 0;
        top: 50%;
        bottom: auto;
        width: 3px;
        height: 20px;
        transform: translateY(-50%);
    }

    .nav-link--app {
        margin: 1rem 0 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: 64px;
        gap: 1rem;
    }

    .logo-img {
        height: 26px;
    }

    .nav-search {
        display: none;
    }

    .mobile-search-toggle {
        display: flex;
    }

    .btn {
        height: 48px;
        padding: 0 1.3rem;
        font-size: 0.92rem;
    }

    .btn-round {
        width: 48px;
        padding: 0;
    }

    .rail {
        gap: 0.75rem;
    }

    .card-play {
        display: none;
    }

    .footer-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.75rem;
        margin-top: -48px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --card-w: 128px;
    }

    .card-title {
        font-size: 0.84rem;
    }

    .footer-cta .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

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