:root {
    --sakura-50: #fff5f7;
    --sakura-100: #ffe4eb;
    --sakura-300: #ff9db3;
    --sakura-400: #ff6b8f;
    --sakura-500: #ff446f;
    --sakura-600: #ed1c5a;
    --azuki-500: #dc2626;
    --azuki-600: #b91c1c;
    --matcha-500: #4f7f4f;
    --matcha-700: #386338;
    --yuzu-500: #d6a400;
    --shiratama-50: #fafafa;
    --shiratama-100: #f5f5f5;
    --shiratama-200: #e5e5e5;
    --shiratama-700: #404040;
    --ink: #1f2937;
    --muted: #6b7280;
    --shadow: 0 18px 45px rgba(31, 41, 55, 0.12);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(135deg, var(--shiratama-50), var(--sakura-50));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
}

.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.94);
    border-bottom: 1px solid rgba(229, 229, 229, 0.86);
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

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

.logo-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-400), var(--azuki-500));
    box-shadow: 0 10px 24px rgba(237, 28, 90, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    color: #4b5563;
}

.site-nav a {
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--sakura-600);
}

.header-search {
    position: relative;
    min-width: 260px;
}

.header-search input,
.search-large input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 10px 44px 10px 18px;
}

.header-search input:focus,
.search-large input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 107, 143, 0.35);
}

.header-search button,
.search-large button {
    border: 0;
    cursor: pointer;
}

.header-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sakura-500);
    transform: translateY(-50%);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-600));
}

.main-shell {
    padding: 34px 0 60px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: 28px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-track {
    display: flex;
    height: 100%;
    min-height: 520px;
    transition: transform 0.7s ease;
}

.hero-slide {
    position: relative;
    display: flex;
    min-width: 100%;
    align-items: flex-end;
    min-height: 520px;
    background-position: center;
    background-size: cover;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 18%, rgba(255, 68, 111, 0.26), transparent 28%), linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.42) 58%, rgba(17, 24, 39, 0.22));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 56px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(237, 28, 90, 0.88);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-actions,
.pagination,
.filter-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-600));
    box-shadow: 0 14px 28px rgba(237, 28, 90, 0.28);
}

.btn-light {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
}

.btn-ghost {
    color: var(--sakura-600);
    background: var(--sakura-50);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .hero-arrow {
    opacity: 1;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--sakura-500);
}

.section {
    margin-top: 54px;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--sakura-500), var(--azuki-600));
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(31, 41, 55, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #111827, #374151);
}

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

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(237, 28, 90, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.badge {
    right: 10px;
    top: 10px;
    padding: 6px 10px;
    background: var(--azuki-500);
}

.year-badge {
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 38px;
    padding: 6px 9px;
    background: linear-gradient(135deg, var(--yuzu-500), var(--sakura-500));
    text-align: center;
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--sakura-600);
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.58;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.meta-row {
    justify-content: space-between;
    color: #6b7280;
    font-size: 13px;
}

.rating {
    color: #b77900;
    font-weight: 800;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span,
.info-chip,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #4b5563;
    background: var(--shiratama-100);
    font-size: 12px;
    font-weight: 650;
}

.card-tags span {
    padding: 5px 8px;
}

.info-chip,
.category-chip {
    padding: 8px 12px;
}

.category-chip:hover,
.info-chip:hover {
    color: var(--sakura-600);
    background: var(--sakura-50);
}

.topic-panel,
.search-panel,
.detail-panel,
.player-panel,
.category-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.topic-panel,
.search-panel,
.category-panel {
    padding: 26px;
}

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

.topic-card {
    min-height: 132px;
    border-radius: 20px;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-600));
    box-shadow: 0 16px 32px rgba(237, 28, 90, 0.20);
}

.topic-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--matcha-500), var(--matcha-700));
}

.topic-card:nth-child(3n) {
    background: linear-gradient(135deg, var(--yuzu-500), var(--sakura-500));
}

.topic-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.page-hero {
    border-radius: 26px;
    padding: 44px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(255, 157, 179, 0.36), transparent 30%), linear-gradient(135deg, #111827, #3f1f2a 60%, #7f1d1d);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 48px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
}

.pagination {
    justify-content: center;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
    font-weight: 800;
}

.pagination a:hover,
.pagination .current {
    color: #ffffff;
    background: var(--sakura-500);
}

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

.player-panel {
    overflow: hidden;
    margin-bottom: 28px;
    background: #000000;
}

.player-shell {
    position: relative;
    background: #000000;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 156px;
    border: 0;
    border-radius: 999px;
    padding: 15px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-600));
    box-shadow: 0 16px 36px rgba(237, 28, 90, 0.34);
    cursor: pointer;
    font-size: 17px;
    font-weight: 850;
    transform: translate(-50%, -50%);
}

.player-shell.playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    max-width: calc(100% - 36px);
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 13px;
}

.player-shell.playing .player-status {
    display: none;
}

.detail-panel {
    padding: 28px;
}

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
}

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

.detail-panel p {
    color: #4b5563;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 20px;
}

.detail-side {
    position: sticky;
    top: 94px;
}

.poster-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.poster-body {
    padding: 18px;
}

.side-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.side-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 16px;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
}

.side-item img {
    width: 68px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.side-item strong {
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-item span {
    color: var(--muted);
    font-size: 13px;
}

.search-large {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 22px;
}

.search-large input {
    min-height: 50px;
    padding: 0 20px;
    font-size: 16px;
}

.search-large button {
    border-radius: 999px;
    padding: 0 28px;
    color: #ffffff;
    background: var(--sakura-500);
    font-weight: 800;
}

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

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border-radius: 18px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
}

.rank-num {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--yuzu-500), var(--sakura-500));
    font-size: 20px;
    font-weight: 900;
}

.rank-row img {
    width: 92px;
    height: 122px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.site-footer {
    color: #d4d4d4;
    background: #171717;
}

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

.site-footer h3,
.site-footer h4 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer li {
    color: #d4d4d4;
    line-height: 1.8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    border-top: 1px solid #404040;
    padding: 18px 0;
    color: #a3a3a3;
    text-align: center;
}

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

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

    .detail-side {
        position: static;
    }

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav,
    .header-search {
        display: none;
    }

    .nav-wrap.open {
        flex-wrap: wrap;
    }

    .nav-wrap.open .site-nav,
    .nav-wrap.open .header-search {
        display: flex;
        width: 100%;
    }

    .nav-wrap.open .site-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 470px;
    }

    .hero-content {
        padding: 34px 24px 58px;
    }

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

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

    .rank-row .btn {
        grid-column: 3;
        justify-self: start;
    }
}

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

    .main-shell {
        padding-top: 20px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 430px;
        border-radius: 20px;
    }

    .hero-content p {
        font-size: 15px;
    }

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

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

    .page-hero,
    .detail-panel,
    .topic-panel,
    .search-panel,
    .category-panel {
        padding: 24px;
    }

    .search-large {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 44px 70px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .rank-row img {
        width: 70px;
        height: 96px;
    }
}
