:root {
    --primary: #4a7c54;
    --primary-dark: #3d6744;
    --primary-soft: #f4f7f5;
    --accent: #e88f1a;
    --dark: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --shadow: 0 14px 40px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--dark);
    background: var(--bg);
    font-family: Inter, 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: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.header-inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: #111827;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(74, 124, 84, 0.25);
}

.brand-text {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    position: relative;
    color: #4b5563;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-soft);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary-dark);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
    background: white;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #4b5563;
    font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide > img,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 96px;
    color: white;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    margin-bottom: 16px;
    color: white;
    background: var(--primary);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
}

.hero h1,
.simple-hero h1,
.detail-info h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero p,
.simple-hero p,
.detail-info p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    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: white;
    background: var(--primary);
    box-shadow: 0 14px 28px rgba(74, 124, 84, 0.32);
}

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

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

.btn.inline {
    margin-top: 20px;
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    font-size: 34px;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: white;
}

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

.light-section {
    background: white;
}

.home-search {
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

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

.section-head h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-kicker {
    display: inline-block;
    width: 6px;
    height: 32px;
    margin-right: 12px;
    border-radius: 999px;
    background: var(--primary);
    vertical-align: middle;
}

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

.feature-card,
.category-tile,
.category-visual {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: #111827;
}

.feature-card img,
.category-tile img,
.category-visual img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.feature-card:hover img,
.category-tile:hover img,
.category-visual:hover img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.25));
}

.feature-card div,
.category-tile strong,
.category-tile em,
.category-visual strong {
    position: absolute;
    left: 24px;
    right: 24px;
    color: white;
}

.feature-card div {
    bottom: 24px;
}

.feature-card span {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 10px;
    color: white;
    background: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.feature-card h3,
.category-tile strong,
.category-visual strong {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.2;
}

.feature-card p,
.category-tile em {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: normal;
}

.category-tile strong {
    bottom: 68px;
}

.category-tile em {
    bottom: 26px;
    font-size: 14px;
}

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

.movie-card {
    min-width: 0;
}

.card-link,
.movie-card > a {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.movie-card > a:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.badge {
    position: absolute;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.primary {
    top: 12px;
    left: 12px;
    color: white;
    background: var(--primary);
}

.badge.year {
    top: 12px;
    right: 12px;
    color: white;
    background: rgba(0, 0, 0, 0.68);
}

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-link:hover h3 {
    color: var(--primary);
}

.card-body p {
    flex: 1;
    margin: 0 0 14px;
    color: #5b6472;
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #7a8392;
    font-size: 12px;
}

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

.search-panel {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: white;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 124, 84, 0.14);
}

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

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 68px minmax(0, 1fr) 60px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.07);
}

.rank-row img {
    width: 68px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-no {
    color: var(--primary);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.side-card,
.info-panel,
.text-panel,
.category-panel {
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.side-card {
    padding: 30px;
}

.side-card h2,
.info-panel h2,
.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.side-card p,
.info-panel p,
.text-panel p,
.category-panel p {
    color: #4b5563;
}

.pill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pill-cloud a,
.tag-cloud span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 750;
}

.page-hero {
    position: relative;
    padding: 76px 0;
    color: white;
    background: radial-gradient(circle at top left, rgba(232, 143, 26, 0.28), transparent 34%), linear-gradient(135deg, #111827, #1f2937 54%, #243629);
}

.simple-hero .breadcrumb {
    margin-bottom: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: white;
}

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

.category-panel {
    overflow: hidden;
    padding-bottom: 22px;
}

.category-visual {
    display: block;
    min-height: 220px;
    border-radius: 0;
    box-shadow: none;
}

.category-visual strong {
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 30px;
}

.category-panel p {
    min-height: 74px;
    margin: 18px 20px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: #374151;
    font-size: 13px;
    font-weight: 750;
}

.compact-card img {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
}

.compact-card span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.text-link {
    display: inline-flex;
    margin: 18px 20px 0;
    color: var(--primary-dark);
    font-weight: 800;
}

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

.ranking-card > a {
    display: grid;
    grid-template-columns: 80px 160px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 14px;
}

.ranking-card img {
    width: 160px;
    height: 105px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-card p {
    margin: 0 0 8px;
    color: #4b5563;
}

.ranking-card span {
    color: #6b7280;
}

.ranking-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: white !important;
    background: var(--primary);
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: white;
    background: #111827;
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding-top: 76px;
    padding-bottom: 68px;
}

.detail-hero .breadcrumb {
    grid-column: 1 / -1;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

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

.detail-info p {
    font-size: 18px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

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

.player-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    background: #000;
}

.player-cover.is-hidden {
    display: none;
}

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

.player-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
}

.player-button {
    position: absolute;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.text-panel {
    margin-top: 22px;
    padding: 28px;
}

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

.detail-side {
    display: grid;
    gap: 22px;
}

.info-panel {
    padding: 24px;
}

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

.info-panel dl div {
    display: grid;
    gap: 4px;
}

.info-panel dt {
    color: #6b7280;
    font-size: 13px;
}

.info-panel dd {
    margin: 0;
    color: #111827;
    font-weight: 750;
}

.side-related {
    display: grid;
    gap: 12px;
}

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

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 52px 0 32px;
}

.footer-brand {
    margin-bottom: 12px;
    color: white;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: white;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 980px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        height: 66vh;
        min-height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .feature-grid,
    .category-panels,
    .detail-layout,
    .two-column,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        max-width: 260px;
    }
}

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

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

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 76px;
    }

    .hero h1,
    .simple-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .movie-grid,
    .category-grid,
    .filter-row,
    .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .section-head h2 {
        font-size: 28px;
    }

    .ranking-card > a {
        grid-template-columns: 52px 86px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-card img {
        width: 86px;
        height: 64px;
    }

    .ranking-card p {
        display: none;
    }
}
