
* {
    box-sizing: border-box;
}

:root {
    --red-950: #450a0a;
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --gray-950: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: #f9fafb;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red-600), var(--red-700));
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.28);
}

.top-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--red-800);
    background: var(--yellow-400);
    box-shadow: 0 8px 20px rgba(250, 204, 21, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 650;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--yellow-400);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(circle at top left, #ef4444, var(--red-900) 45%, var(--red-950));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
    align-items: center;
    gap: 56px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 88px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background-image: linear-gradient(90deg, rgba(69, 10, 10, 0.94), rgba(127, 29, 29, 0.78), rgba(127, 29, 29, 0.2)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    z-index: -1;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.hero-copy {
    color: var(--white);
}

.hero-label {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    border: 1px solid rgba(250, 204, 21, 0.42);
    color: var(--yellow-400);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy h1 {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    margin: 0 0 22px;
    letter-spacing: -1.2px;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    font-size: clamp(18px, 2.3vw, 24px);
    color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 14px;
    font-weight: 650;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--gray-900);
    background: var(--yellow-400);
    box-shadow: 0 16px 30px rgba(250, 204, 21, 0.22);
}

.btn-primary:hover {
    background: var(--yellow-500);
}

.btn-light {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-poster {
    align-self: stretch;
    display: grid;
    grid-template-rows: 1fr auto;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.hero-poster span {
    color: var(--white);
    text-align: center;
    font-weight: 800;
    padding: 16px;
    background: rgba(15, 23, 42, 0.78);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
}

.hero-dots button.active {
    width: 34px;
    background: var(--yellow-400);
}

.panel {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.quick-search,
.controls {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    padding: 26px;
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.quick-search h2 {
    font-size: 28px;
}

.quick-search p {
    color: var(--gray-500);
}

label {
    display: grid;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 700;
}

input,
select {
    width: min(420px, 72vw);
    min-height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--gray-800);
    background: var(--white);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--red-600);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.section-wrap.tint {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

.section-head.center {
    align-items: center;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--gray-800);
}

.section-head p {
    margin: 0;
    color: var(--gray-500);
    font-size: 18px;
}

.section-head a {
    color: var(--red-600);
    font-weight: 800;
}

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

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

.movie-card {
    display: grid;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--gray-200);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 42px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.22s ease, opacity 0.22s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
    background: rgba(0, 0, 0, 0.34);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--gray-900);
    font-weight: 900;
    border-radius: 10px;
    background: var(--yellow-400);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.card-body {
    display: grid;
    gap: 5px;
    padding: 12px;
}

.card-title {
    color: var(--gray-800);
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title.small {
    font-size: 16px;
}

.card-meta,
.card-desc {
    color: var(--gray-500);
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    -webkit-line-clamp: 2;
}

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

.category-card,
.category-overview-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--gray-900);
    box-shadow: var(--soft-shadow);
}

.category-card img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img,
.category-overview-card:hover img {
    opacity: 0.76;
    transform: scale(1.06);
}

.category-card span,
.category-overview-body {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 8px;
    padding: 18px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.category-card strong,
.category-overview-body strong {
    font-size: 20px;
}

.category-card em,
.category-overview-body em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

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

.category-overview-card {
    min-height: 260px;
}

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

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

.page-hero {
    color: var(--white);
    background: linear-gradient(120deg, var(--red-600), var(--red-800));
    padding: 74px 0;
}

.page-hero > div,
.breadcrumb-bar,
.watch-layout,
.detail-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 6vw, 58px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.back-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb-bar a:hover {
    color: var(--red-600);
}

.breadcrumb-bar strong {
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    margin-top: 28px;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    z-index: 2;
}

.player-overlay.hidden {
    display: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    box-shadow: 0 14px 34px rgba(250, 204, 21, 0.28);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 22px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    padding: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.player-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.player-controls button:hover {
    background: rgba(255, 255, 255, 0.26);
}

.watch-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.watch-side img {
    width: 100%;
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

.detail-panel {
    margin-top: 30px;
    padding: 34px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-panel h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 5vw, 48px);
}

.detail-panel h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-weight: 700;
}

.one-line {
    color: var(--red-700);
    font-size: 18px;
    font-weight: 750;
}

.related-section {
    padding-top: 44px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card img {
    width: 86px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card span {
    display: grid;
    align-content: center;
    gap: 6px;
}

.related-card strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card em {
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
}

.site-footer {
    margin-top: 50px;
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.3fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid h2,
.footer-grid h3 {
    color: var(--white);
    margin: 0 0 14px;
}

.footer-grid a {
    display: block;
    margin-bottom: 8px;
    color: #d1d5db;
}

.footer-grid a:hover {
    color: var(--yellow-400);
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

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

@media (max-width: 1080px) {
    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 22px;
        background: var(--red-700);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 620px;
    }

    .hero-poster {
        display: none;
    }

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

    .watch-layout {
        grid-template-columns: 1fr;
    }

    .watch-side {
        grid-template-columns: 180px minmax(0, 1fr);
        align-items: center;
    }
}

@media (max-width: 720px) {
    .top-nav {
        width: calc(100% - 24px);
    }

    .logo {
        font-size: 19px;
    }

    .hero {
        min-height: 620px;
    }

    .hero-slide {
        width: calc(100% - 24px);
        padding-top: 48px;
    }

    .quick-search,
    .controls,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    input,
    select {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.wide,
    .ranking-list,
    .ranking-list.compact-list,
    .category-grid,
    .category-overview-grid,
    .related-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .watch-side {
        display: none;
    }

    .detail-panel {
        padding: 22px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .movie-grid.wide,
    .ranking-list,
    .ranking-list.compact-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-desc {
        display: none;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .play-circle {
        width: 66px;
        height: 66px;
    }
}
