* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f9fafb;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, #f43f5e, #db2777);
    box-shadow: 0 14px 28px rgba(219, 39, 119, 0.22);
}

.brand-text {
    font-size: 20px;
}

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

.main-nav a {
    padding: 10px 14px;
    color: #374151;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
    color: #e11d48;
    background: #fff1f2;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 34vw);
    padding: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

.header-search input,
.page-search-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #111827;
    background: transparent;
}

.header-search input {
    padding: 8px 12px;
}

.header-search button,
.page-search-form button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.page-search-form button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e, #db2777);
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.22);
}

.header-search button {
    padding: 8px 16px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.page-search-form button:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 4px;
}

.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #881337, #9d174d 42%, #be123c);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image-wrap,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-image-wrap {
    background: radial-gradient(circle at 70% 30%, rgba(244, 63, 94, 0.35), transparent 44%), #4c0519;
}

.hero-image {
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.04);
}

.hero-shade {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 600px;
}

.hero-copy {
    width: min(720px, 100%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #fecdd3;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #fce7f3;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
}

.hero-tags span {
    color: #fff1f2;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.is-active {
    background: #ffffff;
}

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

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

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-title p {
    margin: 8px 0 0;
    color: #6b7280;
}

.section-title a {
    flex-shrink: 0;
    color: #e11d48;
    font-weight: 800;
}

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

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

.movie-card,
.category-tile,
.mini-card,
.related-panel,
.detail-content,
.category-block {
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #4c0519, #9f1239);
}

.card-media img,
.tile-cover img,
.mini-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .card-media img,
.category-tile:hover .tile-cover img,
.mini-card:hover .mini-cover img {
    transform: scale(1.06);
}

.play-dot,
.mini-cover span,
.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(244, 63, 94, 0.92);
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.28);
}

.play-dot {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.year-badge,
.rank-number {
    position: absolute;
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 12px;
    bottom: 14px;
    padding: 5px 10px;
    font-size: 12px;
}

.rank-number {
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    text-align: center;
    line-height: 36px;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #6b7280;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 12px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.tag-row span,
.detail-tags a {
    color: #be123c;
    font-size: 12px;
    background: #fff1f2;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 16px;
    overflow: hidden;
    padding: 12px;
    border-radius: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.1);
}

.tile-cover {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    background: linear-gradient(135deg, #4c0519, #be123c);
}

.category-tile h3 {
    margin: 4px 0 6px;
    font-size: 20px;
}

.category-tile p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.ranking-band {
    margin-top: 72px;
    padding: 72px 0;
    color: #ffffff;
    background: radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.42), transparent 32%), linear-gradient(135deg, #111827, #4c0519 54%, #881337);
}

.ranking-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: center;
}

.ranking-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.ranking-copy p {
    max-width: 520px;
    margin: 0 0 26px;
    color: #fce7f3;
}

.ranking-list,
.related-list {
    display: grid;
    gap: 14px;
}

.mini-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-band .mini-card {
    color: #111827;
}

.mini-card:hover {
    transform: translateX(3px);
}

.mini-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: linear-gradient(135deg, #4c0519, #be123c);
}

.mini-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.mini-card h3 {
    display: -webkit-box;
    margin: 4px 0 8px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mini-card p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

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

.page-hero {
    padding: 76px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
}

.category-hero,
.ranking-hero,
.search-hero,
.soft-hero {
    background: radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(135deg, #be123c, #7e22ce);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: #fce7f3;
    font-size: 18px;
}

.stacked-sections {
    display: grid;
    gap: 34px;
    padding: 54px 0 0;
}

.category-block {
    padding: 26px;
    border-radius: 28px;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 240px 1fr;
}

.movie-card-wide .card-media {
    height: 100%;
    min-height: 180px;
    aspect-ratio: auto;
}

.page-search-form {
    display: flex;
    width: min(720px, 100%);
    gap: 10px;
    margin-top: 26px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.page-search-form input {
    padding: 12px 16px;
    color: #ffffff;
}

.page-search-form input::placeholder {
    color: #ffe4e6;
}

.page-search-form button {
    padding: 0 24px;
    font-weight: 900;
}

.player-stage {
    padding: 30px 0;
    background: radial-gradient(circle at 80% 10%, rgba(244, 63, 94, 0.28), transparent 34%), #111827;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.68));
}

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

.big-play {
    width: 76px;
    height: 76px;
    font-size: 30px;
    border-radius: 999px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    padding-top: 34px;
}

.detail-content,
.related-panel {
    border-radius: 28px;
}

.detail-content {
    padding: clamp(24px, 4vw, 42px);
}

.related-panel {
    align-self: start;
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.breadcrumb a {
    color: #e11d48;
    font-weight: 700;
}

.detail-content h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.lead-text {
    margin: 0 0 22px;
    color: #4b5563;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 0 24px;
    margin-bottom: 26px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-meta span {
    display: inline-flex;
    gap: 8px;
    padding: 8px 12px;
    color: #374151;
    border-radius: 999px;
    background: #f3f4f6;
}

.detail-meta strong {
    color: #111827;
}

.story-box,
.review-box,
.tag-panel {
    margin-top: 28px;
}

.story-box h2,
.review-box h2,
.tag-panel h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.story-box p,
.review-box p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.85;
}

.review-box {
    padding: 24px;
    border: 1px solid #fde68a;
    border-radius: 22px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.site-footer {
    margin-top: 72px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 46px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: #d1d5db;
}

.site-footer p {
    margin: 14px 0 0;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
}

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

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

    .related-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: 66px;
        padding: 10px 0;
    }

    .main-nav {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
    }

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

    .header-search {
        order: 3;
        width: 100%;
    }

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

    .hero-section,
    .hero-content {
        min-height: 540px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid,
    .dense-grid,
    .category-grid,
    .ranking-grid,
    .ranking-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-wide,
    .category-tile,
    .mini-card {
        grid-template-columns: 1fr;
    }

    .movie-card-wide .card-media {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .page-search-form {
        border-radius: 24px;
        flex-direction: column;
    }

    .page-search-form button {
        min-height: 46px;
    }

    .footer-bottom,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-copy p,
    .page-hero p,
    .lead-text {
        font-size: 16px;
    }

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

    .card-body h3 {
        min-height: auto;
    }

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