:root {
    --orange: #ea580c;
    --orange-deep: #c2410c;
    --red: #dc2626;
    --amber: #f97316;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --page: #f9fafb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 10px 30px rgba(194, 65, 12, 0.22);
}

.nav-wrap {
    max-width: 1240px;
    margin: 0 auto;
    height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    min-width: 184px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: var(--orange);
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    font-size: 16px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

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

.brand-copy small {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.88;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
    font-weight: 700;
    flex: 1;
}

.nav-links > a,
.nav-dropdown > button {
    border: 0;
    padding: 10px 0;
    color: #fff;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.active,
.nav-dropdown > button:hover {
    opacity: 0.78;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -18px;
    width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
}

.dropdown-menu a:hover {
    color: var(--orange);
    background: var(--soft);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.nav-search input,
.mobile-panel input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.nav-search input::placeholder,
.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-panel button,
.primary-btn,
.secondary-btn,
.play-overlay,
.filter-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-panel button {
    padding: 10px 16px;
    color: var(--orange);
    background: #fff;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 20px;
}

.mobile-panel {
    display: none;
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(154, 52, 18, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.main-shell,
.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 22px 70px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    align-items: center;
    gap: 48px;
    padding: 76px calc((100vw - 1240px) / 2 + 22px) 82px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.42), transparent 34%),
        radial-gradient(circle at 86% 36%, rgba(220, 38, 38, 0.34), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.74), rgba(17, 24, 39, 0.55));
}

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

.hero-kicker,
.detail-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1 {
    margin: 18px 0 18px;
    color: #fff;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 730px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.primary-btn,
.secondary-btn,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.24);
}

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

.primary-btn:hover,
.secondary-btn:hover,
.filter-button:hover,
.nav-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.16);
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #fb923c, #ef4444, #111827);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.2s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    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: 36px;
    background: #fff;
}

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

.section-head h2,
.page-title h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-head h2,
.page-title h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-tile {
    min-height: 142px;
    padding: 22px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 16px 35px rgba(234, 88, 12, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #f97316, #be123c);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #fb923c, #dc2626);
}

.category-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    font-size: 34px;
}

.category-tile strong {
    display: block;
    margin-top: 14px;
    font-size: 19px;
}

.category-tile em {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    font-size: 13px;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fdba74, #ef4444, #1f2937);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.poster-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
}

.movie-card-body strong {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body em {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: #9ca3af;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--orange-deep);
    background: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

.movie-card-compact .movie-card-body strong {
    min-height: auto;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-row img {
    width: 72px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #fdba74, #ef4444, #1f2937);
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em,
.rank-info small {
    display: block;
}

.rank-info strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
}

.rank-info em {
    display: -webkit-box;
    margin: 4px 0 6px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-info small {
    color: #9ca3af;
}

.page-title {
    position: relative;
    padding: 48px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.20), transparent 26%),
        linear-gradient(135deg, var(--orange), var(--red));
    overflow: hidden;
}

.page-title p {
    color: rgba(255, 255, 255, 0.88);
}

.category-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.side-card,
.content-card,
.player-card,
.detail-text,
.related-block {
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.side-card h2,
.content-card h2,
.player-card h2,
.detail-text h2,
.related-block h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.side-card nav {
    display: grid;
    gap: 8px;
}

.side-card nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
    background: #f9fafb;
}

.side-card nav a:hover,
.side-card nav a.active {
    color: var(--orange);
    background: var(--soft);
}

.content-card {
    padding: 24px;
}

.filter-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px auto;
    gap: 12px;
    align-items: center;
    margin: 26px 0;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
}

.filter-input,
.filter-select {
    color: var(--ink);
    border-color: var(--line);
    background: #fff;
    backdrop-filter: none;
}

.filter-button {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--orange);
    font-weight: 700;
}

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 32px;
    padding: 34px;
    border-radius: 30px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, rgba(249, 115, 22, 0.45), transparent 34%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.78));
}

.detail-cover,
.detail-info {
    position: relative;
    z-index: 1;
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #fdba74, #ef4444, #1f2937);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.28);
}

.detail-cover img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}

.detail-info {
    align-self: center;
    color: #fff;
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(32px, 5vw, 58px);
}

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

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.detail-facts span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 800;
}

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

.player-card {
    overflow: hidden;
}

.player-head {
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.video-shell {
    position: relative;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    padding: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
}

.play-overlay span {
    margin-left: 5px;
    font-size: 30px;
}

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

.player-message {
    display: none;
    padding: 12px 18px;
    color: #fff;
    background: #991b1b;
}

.player-message.show {
    display: block;
}

.detail-text {
    margin-top: 24px;
    padding: 30px;
}

.detail-text p {
    margin: 0 0 18px;
    color: #374151;
}

.related-block {
    margin-top: 24px;
    padding: 28px;
}

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

.side-list {
    display: grid;
    gap: 10px;
}

.side-list a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    background: #f9fafb;
}

.side-list a:hover {
    background: var(--soft);
}

.side-list span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.side-list strong,
.side-list small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-list small {
    color: var(--muted);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 22px 30px;
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 34px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 20px;
}

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

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

.footer-links a {
    color: #d1d5db;
}

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

.compact-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.compact-links span {
    color: #9ca3af;
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.spacer-lg {
    height: 54px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

.empty-state.show {
    display: block;
}

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 320px;
        padding: 58px 22px 78px;
    }

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 44px 16px 82px;
    }

    .hero-poster {
        max-width: 290px;
        transform: none;
    }

    .hero-poster img {
        height: 420px;
    }

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

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

    .category-grid,
    .rank-list,
    .footer-grid,
    .detail-hero,
    .filter-shell {
        grid-template-columns: 1fr;
    }

    .page-title {
        padding: 32px 24px;
    }

    .detail-hero {
        padding: 22px;
    }

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

    .detail-cover img {
        height: 390px;
    }

    .watch-layout {
        gap: 18px;
    }

    .rank-row {
        grid-template-columns: 42px 62px minmax(0, 1fr);
    }

    .rank-row img {
        width: 62px;
        height: 86px;
    }
}
