:root {
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --teal-600: #0d9488;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    color: var(--slate-800);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.96), rgba(13, 148, 136, 0.96));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(12px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #ecfeff;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    color: #cffafe;
    font-size: 12px;
    margin-top: -2px;
}

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

.main-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ecfeff;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 290px;
}

.header-search input {
    min-width: 0;
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.22);
    color: var(--white);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.header-search button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--cyan-700);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    gap: 18px;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: var(--white);
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding-top: 140px;
    padding-bottom: 72px;
}

.hero-text {
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--cyan-600);
    color: var(--white);
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
}

.eyebrow {
    background: rgba(8, 145, 178, 0.12);
    color: var(--cyan-700);
    margin-bottom: 10px;
}

.hero-text h1 {
    margin: 18px 0 8px;
    color: #cffafe;
    font-size: clamp(22px, 3vw, 34px);
}

.hero-text h2 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-text p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ecfeff;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 30px;
    background: var(--cyan-600);
    color: var(--white);
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.32);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.header-search button:hover {
    transform: translateY(-2px);
}

.hero-panel {
    width: min(360px, 100%);
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-panel strong {
    display: block;
    color: #67e8f9;
    margin-bottom: 8px;
}

.hero-panel a {
    display: block;
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-panel p {
    margin: 0;
    color: #d1d5db;
}

.content-section {
    padding: 72px 0;
}

.white-section {
    background: var(--white);
}

.split-section {
    background: linear-gradient(135deg, #ecfeff, #f8fafc);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    color: var(--slate-800);
}

.section-heading p {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--slate-600);
}

.section-more {
    flex-shrink: 0;
    background: var(--cyan-600);
    color: var(--white);
    padding: 10px 18px;
}

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

.rail-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 300px);
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-900);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: auto;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: var(--cyan-600);
    color: var(--white);
    font-size: 22px;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: scale(1);
}

.cover-type {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: var(--white);
    padding: 5px 9px;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    color: var(--slate-800);
}

.movie-info h3 a:hover,
.rank-body h3 a:hover {
    color: var(--cyan-600);
}

.movie-info p {
    min-height: 44px;
    margin: 0 0 13px;
    color: var(--slate-600);
    font-size: 14px;
}

.tag-row span {
    background: #ecfeff;
    color: var(--cyan-700);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--slate-500);
    font-size: 13px;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    aspect-ratio: 16 / 7;
    background: var(--slate-900);
}

.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card > div:last-child {
    padding: 20px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-card p {
    min-height: 50px;
    margin: 0 0 16px;
    color: var(--slate-600);
    font-size: 14px;
}

.category-card span {
    color: var(--cyan-700);
    font-weight: 800;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 32px;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-card {
    display: grid;
    grid-template-columns: 54px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border-radius: 18px;
    background: var(--white);
    padding: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan-600), var(--teal-600));
    color: var(--white);
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--slate-900);
}

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

.rank-body h3 {
    margin: 0 0 4px;
    color: var(--slate-800);
    font-size: 18px;
}

.rank-body p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.rank-card strong {
    color: var(--cyan-700);
    font-size: 22px;
}

.latest-list {
    display: grid;
    gap: 16px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
}

.movie-card-wide .movie-cover {
    height: 100%;
    aspect-ratio: auto;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0e7490, #0f172a);
    color: var(--white);
}

.small-hero {
    padding: 72px 0 44px;
}

.small-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
}

.small-hero p {
    max-width: 780px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cffafe;
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px;
    gap: 12px;
    max-width: 720px;
}

.wide-filter {
    grid-template-columns: minmax(240px, 1fr) 150px 150px 150px;
    max-width: 980px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--slate-800);
}

.full-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-main {
    background: var(--slate-50);
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: var(--white);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 64px;
    padding-bottom: 54px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.36);
    background: var(--slate-900);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
}

.detail-info p {
    max-width: 820px;
    color: #e5e7eb;
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    color: #cffafe;
}

.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 7px 12px;
}

.player-section {
    padding-top: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover span {
    position: relative;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: var(--cyan-600);
    color: var(--white);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.36);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
}

.movie-article,
.side-panel {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 28px;
}

.movie-article h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: var(--slate-800);
}

.movie-article p {
    margin: 0 0 24px;
    color: var(--slate-700);
    font-size: 17px;
}

.movie-article p:last-child {
    margin-bottom: 0;
}

.side-panel dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.side-panel dl div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.side-panel dt {
    color: var(--slate-500);
}

.side-panel dd {
    margin: 0;
    color: var(--slate-800);
    font-weight: 700;
}

.site-footer {
    background: var(--slate-950);
    color: #cbd5e1;
    padding: 46px 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer-links a:hover {
    color: #67e8f9;
}

.is-hidden {
    display: none !important;
}

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

    .header-search {
        display: none;
    }
}

@media (max-width: 860px) {
    .header-inner {
        min-height: 66px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

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

    .hero-content {
        align-items: flex-end;
        flex-direction: column;
        justify-content: flex-end;
    }

    .hero-panel {
        width: 100%;
    }

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

    .two-column,
    .article-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(280px, 76vw);
    }

    .wide-filter,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 44px 78px minmax(0, 1fr);
    }

    .rank-card strong {
        display: none;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .brand small {
        display: none;
    }

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

    .hero-content {
        padding-top: 96px;
        padding-bottom: 40px;
    }

    .hero-text h2 {
        font-size: 40px;
    }

    .content-section {
        padding: 48px 0;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .full-category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .rank-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .rank-poster {
        display: none;
    }

    .player-shell {
        border-radius: 18px;
    }

    .player-cover span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .footer-grid {
        flex-direction: column;
    }

    .footer-links {
        align-items: flex-start;
        flex-direction: column;
    }
}
