:root {
    --color-teal: #0d9488;
    --color-teal-soft: #ccfbf1;
    --color-blue: #2563eb;
    --color-gold: #f59e0b;
    --color-ink: #111827;
    --color-muted: #5f6b7a;
    --color-line: rgba(13, 148, 136, 0.14);
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body {
    color: var(--color-ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f0fdfa 100%);
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--color-line);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.header-inner,
.container {
    width: min(100% - 32px, 1280px);
    margin-inline: auto;
}

.header-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.18rem, 2vw, 1.55rem);
    font-weight: 800;
    color: transparent;
    background: linear-gradient(90deg, var(--color-teal), var(--color-blue));
    -webkit-background-clip: text;
    background-clip: text;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #5eead4, #14b8a6 46%, #2563eb 100%);
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0.12), 0 12px 28px rgba(37, 99, 235, 0.26);
    position: relative;
    flex: none;
}

.logo-mark::after {
    content: "";
    position: absolute;
    inset: 9px 8px 9px 11px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    background: #ffffff;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 650;
    color: #334155;
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-mini,
.search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-mini input,
.search-panel input,
.search-panel select {
    border: 1px solid #dbe5ea;
    background: #ffffff;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 16px;
    outline: none;
    color: #1f2937;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-mini input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16);
}

.search-mini button,
.search-panel button,
.btn {
    border-radius: 999px;
    border: 0;
    min-height: 42px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 750;
    color: #ffffff;
    background: linear-gradient(90deg, #14b8a6, #3b82f6);
    box-shadow: 0 13px 28px rgba(20, 184, 166, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-mini button:hover,
.search-panel button:hover,
.btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
    filter: saturate(1.08);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 1.4rem;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid #eef2f7;
    background: rgba(255, 255, 255, 0.96);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: #f0fdfa;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-bg,
.hero-bg img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    background:
        radial-gradient(circle at 78% 15%, rgba(45, 212, 191, 0.34), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 72px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5eead4;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: 0.03em;
}

.eyebrow::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #2dd4bf;
    box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.15);
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    line-height: 1.03;
    font-weight: 900;
    margin-bottom: 22px;
    letter-spacing: -0.04em;
}

.hero p {
    font-size: clamp(1.04rem, 2.1vw, 1.35rem);
    line-height: 1.82;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 30px;
}

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

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.section {
    padding: 70px 0;
}

.section-soft {
    background: rgba(255, 255, 255, 0.48);
}

.section-gradient {
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(239, 246, 255, 0.92));
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.18;
    font-weight: 900;
    color: #111827;
}

.title-icon {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.18);
}

.section-link {
    font-weight: 800;
    color: var(--color-teal);
}

.section-link:hover {
    color: #0f766e;
}

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

.movie-card {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.74);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
    border-color: rgba(45, 212, 191, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.poster-link.tall {
    aspect-ratio: 2 / 2.75;
}

.poster-link img,
.related-thumb img,
.rank-thumb img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
}

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

.card-badge,
.rank-badge,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    min-height: 26px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

.play-float {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.92);
    box-shadow: 0 10px 28px rgba(20, 184, 166, 0.35);
}

.play-float::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 12px;
    border-left: 14px solid #ffffff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

.card-body {
    padding: 18px;
}

.card-title {
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 850;
    margin-bottom: 9px;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--color-teal);
}

.card-desc {
    color: var(--color-muted);
    line-height: 1.65;
    font-size: 0.94rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    margin-top: 14px;
    color: #64748b;
    font-size: 0.86rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    min-height: 28px;
    padding: 0 11px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 0.82rem;
    font-weight: 800;
}

.category-stack {
    display: grid;
    gap: 58px;
}

.category-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.category-row-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.55rem;
    font-weight: 900;
}

.category-row-title::before {
    content: "";
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: var(--color-teal);
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.74);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.category-tile h2,
.category-tile h3 {
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.category-tile p {
    color: var(--color-muted);
    line-height: 1.75;
    margin-bottom: 18px;
}

.category-tile span {
    margin-top: auto;
    color: var(--color-teal);
    font-weight: 850;
}

.page-hero {
    padding: 70px 0 42px;
    background: radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 32%), radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.16), transparent 30%);
}

.page-hero h1 {
    font-size: clamp(2.15rem, 4.6vw, 4rem);
    line-height: 1.08;
    font-weight: 920;
    margin-bottom: 18px;
    letter-spacing: -0.035em;
}

.page-hero p {
    width: min(760px, 100%);
    font-size: 1.08rem;
    line-height: 1.82;
    color: var(--color-muted);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 136px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.72);
}

.rank-number {
    font-size: 1.65rem;
    font-weight: 950;
    color: #0f766e;
    text-align: center;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.rank-title {
    font-size: 1.12rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.rank-title a:hover {
    color: var(--color-teal);
}

.rank-text {
    color: var(--color-muted);
    line-height: 1.62;
}

.rank-score {
    min-width: 82px;
    color: var(--color-gold);
    font-size: 1.25rem;
    font-weight: 950;
    text-align: right;
}

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

.player-card,
.detail-card,
.aside-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.72);
}

.player-wrap {
    position: relative;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 4;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(20, 184, 166, 0.96);
    box-shadow: 0 16px 45px rgba(20, 184, 166, 0.38);
    position: relative;
}

.player-button::before {
    content: "";
    position: absolute;
    left: 34px;
    top: 26px;
    border-left: 24px solid #ffffff;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

.player-titlebar {
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    background: #ffffff;
}

.player-titlebar h1 {
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    line-height: 1.2;
    font-weight: 950;
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h2,
.aside-card h2 {
    font-size: 1.45rem;
    font-weight: 920;
    margin-bottom: 18px;
}

.detail-card p {
    color: #334155;
    line-height: 1.9;
    margin-bottom: 18px;
}

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

.meta-pill {
    color: #0f766e;
    background: #ccfbf1;
}

.aside-card {
    padding: 22px;
}

.detail-cover {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 2 / 2.7;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    margin-bottom: 18px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.related-thumb {
    aspect-ratio: 1 / 1.25;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.related-title {
    font-weight: 850;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title:hover {
    color: var(--color-teal);
}

.related-meta {
    color: #64748b;
    font-size: 0.85rem;
}

.breadcrumb {
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 18px;
}

.breadcrumb a:hover {
    color: var(--color-teal);
}

.search-shell {
    display: grid;
    gap: 26px;
}

.search-panel {
    align-items: stretch;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.72);
}

.search-panel input {
    flex: 1;
    min-width: 240px;
    border-radius: 18px;
}

.search-panel select {
    border-radius: 18px;
}

.footer {
    background: linear-gradient(135deg, #111827, #1e293b 48%, #134e4a);
    color: #cbd5e1;
    padding: 52px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer h2,
.footer h3 {
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 14px;
}

.footer p,
.footer a {
    color: #cbd5e1;
    line-height: 1.8;
}

.footer a:hover {
    color: #5eead4;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 22px;
    color: #94a3b8;
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

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

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

    .aside-card {
        order: -1;
    }

    .detail-cover {
        display: none;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 68px;
    }

    .search-mini {
        display: none;
    }

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

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

    .rank-item {
        grid-template-columns: 52px 96px 1fr;
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
        font-size: 1rem;
    }

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

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

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

    .hero h1 {
        font-size: 2.6rem;
    }

    .section-head,
    .category-row-head,
    .player-titlebar {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 44px 86px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .search-panel {
        flex-direction: column;
    }

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