:root {
    --ocean-deep: #0a4a6b;
    --ocean-blue: #1a7fa0;
    --ocean-light: #4fb3d4;
    --sand-light: #f5ebe0;
    --sand-warm: #e3d5ca;
    --coral-accent: #ff6b6b;
    --coral-light: #ff9999;
    --seafoam: #88d4ab;
    --sunset-orange: #ff9f1c;
    --cloud-white: #ffffff;
    --text-dark: #20333d;
    --text-gray: #667781;
    --shadow-ocean: 0 18px 45px rgba(10, 74, 107, 0.18);
    --shadow-soft: 0 12px 28px rgba(32, 51, 61, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    background: linear-gradient(180deg, #f9f7f2 0%, #eef8fb 45%, #f5ebe0 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-blue));
    color: var(--cloud-white);
    box-shadow: 0 14px 32px rgba(10, 74, 107, 0.25);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--ocean-deep);
    background: linear-gradient(135deg, var(--seafoam), var(--sand-light));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    font-weight: 650;
}

.main-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
    color: var(--seafoam);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-nav input,
.home-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 0 0 1px rgba(10, 74, 107, 0.08);
}

.top-search button,
.mobile-nav button,
.home-search button,
.search-page-form button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    color: var(--cloud-white);
    background: var(--coral-accent);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-nav button:hover,
.home-search button:hover,
.search-page-form button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(255, 107, 107, 0.34);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--cloud-white);
    background: rgba(255, 255, 255, 0.12);
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

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

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

.mobile-nav form {
    display: flex;
    gap: 8px;
    flex: 1 1 100%;
}

.mobile-nav input {
    flex: 1;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: var(--cloud-white);
    background: var(--ocean-deep);
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 74px max(32px, calc((100vw - 1180px) / 2)) 96px;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(12px) saturate(1.08);
    transform: scale(1.08);
    opacity: 0.38;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(136, 212, 171, 0.35), transparent 28%),
        radial-gradient(circle at 78% 30%, rgba(255, 107, 107, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(10, 74, 107, 0.96), rgba(26, 127, 160, 0.72));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--coral-accent);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.96;
    max-width: 860px;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.detail-meta,
.rank-meta,
.card-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags {
    margin: 22px 0 30px;
}

.hero-tags span,
.detail-meta span,
.rank-meta span,
.card-meta span,
.tag-row span {
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 750;
}

.hero-actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.ghost-btn.dark {
    color: var(--ocean-deep);
    background: rgba(26, 127, 160, 0.08);
    box-shadow: inset 0 0 0 1px rgba(26, 127, 160, 0.15);
}

.hero-poster {
    display: block;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(32px, calc((100vw - 1180px) / 2));
    bottom: 46px;
    display: flex;
    gap: 12px;
}

.hero-controls button,
.hero-dots button {
    border: 0;
    color: var(--cloud-white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.hero-controls button {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    font-size: 34px;
    line-height: 1;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 62px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    padding: 0;
}

.hero-dots button.active {
    background: var(--seafoam);
}

.quick-panel {
    margin-top: -42px;
    position: relative;
    z-index: 5;
    border-radius: 28px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-ocean);
}

.home-search {
    display: flex;
    flex: 1;
    gap: 12px;
}

.home-search input {
    flex: 1;
    background: var(--cloud-white);
}

.quick-links a {
    padding: 11px 15px;
    border-radius: 999px;
    color: var(--ocean-deep);
    background: var(--sand-light);
    font-weight: 800;
}

.content-section,
.category-overview-card {
    width: min(1180px, calc(100% - 32px));
    margin: 56px auto;
}

.section-title,
.category-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.section-title h2,
.category-overview-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--ocean-deep);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-title a,
.category-overview-head a {
    color: var(--ocean-blue);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
}

.poster-link img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.play-badge,
.year-badge {
    position: absolute;
    z-index: 2;
}

.play-badge {
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cloud-white);
    background: rgba(255, 107, 107, 0.92);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge {
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--cloud-white);
    background: rgba(10, 74, 107, 0.82);
    font-weight: 850;
    font-size: 12px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--text-dark);
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
    color: var(--ocean-blue);
}

.card-body p,
.rank-info p,
.page-hero p,
.detail-info p,
.text-panel p,
.search-result p,
.category-tile strong,
.category-tile em {
    color: var(--text-gray);
    line-height: 1.75;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    font-size: 14px;
}

.card-meta span,
.tag-row span {
    background: var(--sand-light);
}

.tag-row {
    margin-top: 10px;
}

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

.category-tile {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 28px;
    padding: 22px;
    color: var(--cloud-white);
    background:
        radial-gradient(circle at top right, rgba(136, 212, 171, 0.38), transparent 40%),
        linear-gradient(135deg, var(--ocean-deep), var(--ocean-blue));
    box-shadow: var(--shadow-ocean);
    transition: transform 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-tile em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
}

.page-main {
    padding: 46px 0 70px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: clamp(34px, 6vw, 72px);
    margin-bottom: 36px;
    background:
        radial-gradient(circle at 15% 20%, rgba(136, 212, 171, 0.3), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 235, 224, 0.88));
    box-shadow: var(--shadow-soft);
}

.filter-panel,
.search-page-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.filter-panel input,
.search-page-form input {
    min-width: min(420px, 100%);
    flex: 1;
}

.filter-panel select {
    min-width: 160px;
}

.page-grid {
    align-items: stretch;
}

.category-overview-card {
    padding: 28px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.rank-num {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--cloud-white);
    background: linear-gradient(135deg, var(--coral-accent), var(--sunset-orange));
    font-weight: 950;
    font-size: 20px;
}

.rank-poster img {
    width: 92px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
}

.rank-info h2 {
    margin: 0 0 8px;
    color: var(--ocean-deep);
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 10px;
}

.detail-main {
    background: linear-gradient(180deg, #f7fbfc, #f5ebe0);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--cloud-white);
    background: var(--ocean-deep);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(14px) saturate(1.08);
    opacity: 0.38;
    transform: scale(1.08);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 74, 107, 0.96), rgba(26, 127, 160, 0.7));
}

.detail-layout {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding: 62px 0;
}

.detail-cover {
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 34px 76px rgba(0, 0, 0, 0.3);
}

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

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
}

.detail-info h1 {
    color: var(--cloud-white);
    font-size: clamp(42px, 7vw, 78px);
}

.detail-info p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.detail-meta {
    margin: 24px 0 14px;
}

.detail-tags span {
    color: var(--cloud-white);
    background: rgba(255, 255, 255, 0.15);
}

.detail-info .primary-btn {
    display: inline-flex;
    margin-top: 24px;
}

.player-section {
    margin-top: -80px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #020b10;
    box-shadow: 0 32px 80px rgba(10, 74, 107, 0.34);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    color: var(--cloud-white);
    background: linear-gradient(135deg, rgba(10, 74, 107, 0.72), rgba(0, 0, 0, 0.48));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cloud-white);
    background: var(--coral-accent);
    font-size: 38px;
    box-shadow: 0 20px 36px rgba(255, 107, 107, 0.34);
}

.player-cover strong {
    font-size: clamp(22px, 4vw, 38px);
}

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

.detail-content {
    padding: 42px 0 70px;
}

.text-panel {
    padding: 30px;
    margin-bottom: 22px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.text-panel h2 {
    margin: 0 0 14px;
    color: var(--ocean-deep);
    font-size: 28px;
}

.text-panel p {
    margin: 0;
    font-size: 17px;
}

.search-results {
    display: grid;
    gap: 16px;
}

.search-result {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.search-result img {
    width: 110px;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    object-fit: cover;
}

.search-result h2 {
    margin: 0 0 8px;
    color: var(--ocean-deep);
}

.search-result p {
    margin: 0 0 10px;
}

.site-footer {
    color: var(--cloud-white);
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-blue));
}

.footer-inner {
    min-height: 98px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-inner a {
    color: var(--seafoam);
    font-weight: 850;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .main-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

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

@media (max-width: 760px) {
    .container,
    .content-section,
    .category-overview-card {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 19px;
    }

    .hero,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 42px 20px 96px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        justify-self: center;
        transform: rotate(0deg);
    }

    .hero-controls {
        right: 20px;
        bottom: 32px;
    }

    .hero-dots {
        left: 20px;
        bottom: 48px;
    }

    .quick-panel,
    .home-search,
    .section-title,
    .category-overview-head,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

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

    .card-body {
        padding: 12px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .detail-cover {
        width: min(280px, 78vw);
        justify-self: center;
    }

    .player-section {
        margin-top: -34px;
    }

    .rank-item {
        grid-template-columns: 48px 72px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-num {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .rank-poster img {
        width: 72px;
    }

    .search-result {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .search-result img {
        width: 88px;
    }
}

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

    .hero h1 {
        font-size: 40px;
    }

    .mobile-nav form,
    .filter-panel,
    .search-page-form {
        flex-direction: column;
    }
}

.index-links {
    columns: 4 220px;
    padding-left: 18px;
    line-height: 1.9;
}

.index-links a {
    color: var(--ocean-blue);
    font-weight: 700;
}
