:root {
    --dark-950: #1a1f2e;
    --dark-900: #2d374c;
    --mirror-900: #172336;
    --mirror-800: #243b53;
    --mirror-700: #334e68;
    --realm-500: #d4941f;
    --realm-400: #e8a84d;
    --realm-300: #eec078;
    --text-main: #f3f4f6;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --border-soft: rgba(255, 255, 255, 0.1);
    --shadow-realm: 0 8px 30px rgba(212, 148, 31, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(212, 148, 31, 0.16), transparent 26rem),
        radial-gradient(circle at top right, rgba(36, 59, 83, 0.9), transparent 32rem),
        linear-gradient(180deg, #111827 0%, var(--dark-950) 36%, #121826 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 75%);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--realm-400), #b87d15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.backdrop-glass,
.glass-panel {
    border: 1px solid var(--border-soft);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.85rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: var(--realm-500);
    box-shadow: 0 10px 28px rgba(212, 148, 31, 0.28);
}

.btn-primary:hover {
    background: #b87d15;
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--text-main);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.08);
}

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

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(26, 31, 46, 0.76);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    color: #1a1f2e;
    background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
    box-shadow: var(--shadow-realm);
}

.brand-name {
    font-size: 1.45rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-link,
.mobile-link {
    color: var(--text-soft);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--realm-400);
}

.mobile-menu-button {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 0.75rem;
    color: #fff;
    background: transparent;
}

.mobile-menu-button span {
    display: block;
    width: 1.35rem;
    height: 2px;
    margin: 0.28rem auto;
    border-radius: 99px;
    background: var(--text-main);
    transition: 0.2s ease;
}

.mobile-menu {
    display: none;
    padding-bottom: 1rem;
}

.mobile-menu.is-open {
    display: grid;
    gap: 0.5rem;
}

.mobile-link {
    display: block;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.hero-section {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 78vh;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(26, 31, 46, 0.92), rgba(26, 31, 46, 0.48), rgba(26, 31, 46, 0.88)),
        linear-gradient(0deg, var(--dark-950), rgba(26, 31, 46, 0.2) 42%, transparent 72%);
}

.hero-content-wrap {
    position: relative;
    z-index: 2;
    min-height: 78vh;
    display: flex;
    align-items: flex-end;
    padding-top: 7rem;
    padding-bottom: 7rem;
}

.hero-content {
    max-width: 48rem;
    animation: fadeIn 0.6s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    color: var(--realm-400);
    font-weight: 700;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(2.55rem, 8vw, 5rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 44rem;
    margin: 1.25rem 0 0;
    color: var(--text-soft);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.hero-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.hero-meta {
    margin-top: 1.25rem;
}

.hero-meta strong,
.movie-meta strong {
    color: var(--realm-400);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.8rem;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(-50%);
}

.hero-arrow,
.slider-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    transition: 0.2s ease;
}

.hero-arrow:hover,
.slider-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
    display: flex;
    gap: 0.48rem;
}

.hero-dot {
    width: 0.48rem;
    height: 0.48rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    transition: 0.2s ease;
}

.hero-dot.is-active {
    width: 2rem;
    background: var(--realm-400);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.section-title h1,
.section-title h2 {
    margin: 0;
    font-size: clamp(1.85rem, 3.8vw, 2.75rem);
    line-height: 1.12;
}

.section-title p {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
}

.card-slider {
    display: flex;
    gap: 1.35rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.25rem 0.15rem 1.2rem;
    scrollbar-width: none;
}

.card-slider::-webkit-scrollbar {
    display: none;
}

.card-slider .movie-card {
    min-width: 18rem;
    scroll-snap-align: start;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(12px);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-realm);
    background: rgba(255, 255, 255, 0.09);
}

.poster-link {
    position: relative;
    display: block;
    height: 16rem;
    overflow: hidden;
}

.large-card .poster-link {
    height: 22rem;
}

.poster-link img,
.horizontal-cover img,
.detail-cover img,
.category-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.movie-card:hover .horizontal-cover img,
.category-preview-card:hover img {
    transform: scale(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.poster-play,
.play-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.92);
    transition: 0.2s ease;
}

.poster-play {
    top: 50%;
    left: 50%;
    width: 3.2rem;
    height: 3.2rem;
    transform: translate(-50%, -50%) scale(0.92);
}

.play-chip {
    inset: 50% auto auto 50%;
    width: 2.8rem;
    height: 2.8rem;
    transform: translate(-50%, -50%) scale(0.92);
}

.movie-card:hover .poster-play,
.movie-card:hover .play-chip,
.horizontal-card:hover .play-chip {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-rating,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.poster-rating {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.32rem 0.62rem;
    color: var(--realm-300);
    background: rgba(0, 0, 0, 0.64);
}

.rank-badge {
    top: 0.75rem;
    left: 0.75rem;
    min-width: 2rem;
    padding: 0.32rem 0.55rem;
    color: #1a1f2e;
    text-align: center;
    background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    display: block;
    overflow: hidden;
    margin-bottom: 0.45rem;
    color: var(--text-main);
    font-size: 1.08rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--realm-400);
}

.movie-info p,
.horizontal-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-row span,
.detail-tag,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    color: var(--text-soft);
    font-size: 0.85rem;
    background: rgba(36, 59, 83, 0.62);
}

.detail-tag:first-child,
.category-chip.is-active {
    color: var(--realm-300);
    background: rgba(212, 148, 31, 0.16);
}

.horizontal-card {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.horizontal-cover {
    position: relative;
    overflow: hidden;
    min-height: 7.8rem;
    border-radius: 0.85rem;
}

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

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-chip {
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.category-chip:hover {
    color: var(--realm-300);
    border-color: rgba(212, 148, 31, 0.34);
    background: rgba(212, 148, 31, 0.14);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 13.5rem;
    border-radius: 1.1rem;
    padding: 1.3rem;
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.82), rgba(26, 31, 46, 0.86));
    border: 1px solid var(--border-soft);
    transition: 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 168, 77, 0.4);
    box-shadow: var(--shadow-realm);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0.75rem 0 1.25rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-preview-card {
    position: relative;
    overflow: hidden;
    height: 5.4rem;
    border-radius: 0.7rem;
}

.page-hero {
    padding-top: 8.5rem;
    padding-bottom: 3rem;
}

.page-hero .glass-panel {
    border-radius: 1.4rem;
    padding: clamp(1.2rem, 4vw, 2.2rem);
}

.search-panel {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.search-input {
    width: 100%;
    min-height: 3.35rem;
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    padding: 0 1.15rem;
    color: var(--text-main);
    outline: none;
    background: rgba(255, 255, 255, 0.07);
}

.search-input:focus {
    border-color: rgba(232, 168, 77, 0.52);
    box-shadow: 0 0 0 4px rgba(212, 148, 31, 0.12);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.86fr);
    gap: 2rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.2rem;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.22));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(4.6rem, 8vw, 6.25rem);
    height: clamp(4.6rem, 8vw, 6.25rem);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 2.4rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    transition: 0.2s ease;
}

.player-start:hover {
    transform: scale(1.05);
    background: rgba(212, 148, 31, 0.9);
}

.detail-title {
    margin: 1.6rem 0 0.75rem;
    font-size: clamp(2rem, 4.6vw, 3.3rem);
    line-height: 1.1;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.1rem 0;
}

.content-card {
    margin-top: 1rem;
    border-radius: 1.05rem;
    padding: 1.25rem;
}

.content-card h2,
.sidebar-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.content-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.82;
}

.sidebar-card {
    position: sticky;
    top: 6rem;
    border-radius: 1.05rem;
    padding: 1.25rem;
}

.info-list {
    display: grid;
    gap: 0.85rem;
}

.info-list dt {
    margin: 0 0 0.2rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.info-list dd {
    margin: 0;
    color: var(--text-soft);
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--realm-400);
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(17, 24, 39, 0.55);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 2rem;
    padding-top: 3.8rem;
    padding-bottom: 2.2rem;
}

.footer-brand p,
.footer-links a,
.copyright {
    color: var(--text-muted);
}

.footer-brand p {
    max-width: 30rem;
    line-height: 1.75;
}

.footer-grid h2 {
    margin: 0 0 1rem;
    color: var(--text-soft);
    font-size: 1.1rem;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
}

.footer-links a:hover {
    color: var(--realm-400);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    font-size: 0.9rem;
}

.hidden-by-search {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 1024px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .container-custom {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: inline-block;
    }

    .hero-section,
    .hero-content-wrap,
    .hero-slide img {
        min-height: 74vh;
    }

    .hero-content-wrap {
        padding-bottom: 6rem;
    }

    .hero-controls {
        bottom: 1.2rem;
    }

    .section-head {
        display: grid;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .poster-link {
        height: 13.5rem;
    }

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .horizontal-cover {
        min-height: 13rem;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-slider .movie-card {
        min-width: 78vw;
    }

    .hero-actions {
        display: grid;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
