:root {
    --sakura-50: #fff1f4;
    --sakura-100: #ffe3e9;
    --sakura-300: #ff9db3;
    --sakura-400: #ff6b8f;
    --sakura-500: #ff446f;
    --sakura-600: #ed1c5a;
    --azuki-500: #dc2626;
    --matcha-500: #5a9c5a;
    --matcha-600: #438543;
    --yuzu-400: #ffd633;
    --yuzu-500: #ffc300;
    --shiratama-50: #fafafa;
    --shiratama-100: #f5f5f5;
    --shiratama-800: #262626;
    --shiratama-900: #171717;
    --slate-900: #0f172a;
    --text-main: #1f2937;
    --text-soft: #6b7280;
    --card-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--shiratama-50), var(--sakura-50));
}

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.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 157, 179, 0.22);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

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

.brand-text {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(90deg, var(--sakura-500), var(--azuki-500));
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-link {
    font-weight: 700;
    color: #4b5563;
    transition: color 0.25s ease, transform 0.25s ease;
}

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

.header-search {
    position: relative;
    display: flex;
    width: 260px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input,
.quick-search input,
.inline-filter input,
.search-page-form input,
.inline-filter select {
    border: 0;
    outline: 0;
    color: var(--text-main);
}

.header-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 14px;
}

.header-search button {
    border: 0;
    padding: 0 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-500));
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text-main);
    background: var(--sakura-100);
}

.mobile-nav {
    border-top: 1px solid rgba(255, 157, 179, 0.22);
    background: rgba(255, 255, 255, 0.96);
}

.mobile-nav-inner {
    display: grid;
    gap: 14px;
    padding: 18px 0;
}

.mobile-search {
    display: flex;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
}

.mobile-search button {
    border: 0;
    padding: 0 16px;
    color: #ffffff;
    background: var(--sakura-500);
}

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

.home-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    aspect-ratio: 21 / 9;
    min-height: 360px;
    margin: 32px auto 0;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-900);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.hero-track,
.hero-slide {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-content {
    width: min(760px, 100%);
    padding: 52px;
    color: #ffffff;
}

.hero-tags,
.detail-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-tags span,
.detail-kicker span,
.card-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    background: var(--azuki-500);
}

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

.hero-content p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(15px, 2.1vw, 20px);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions,
.quick-links,
.filter-links,
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.quick-links a,
.search-page-form button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.search-page-form button,
.quick-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-500));
    box-shadow: 0 14px 30px rgba(237, 28, 90, 0.25);
}

.primary-button:hover,
.search-page-form button:hover,
.quick-search button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 35px rgba(237, 28, 90, 0.32);
}

.primary-button.full {
    width: 100%;
}

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

.ghost-button:hover,
.quick-links a:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.48);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.home-hero:hover .hero-control {
    opacity: 1;
}

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

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

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

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

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin-top: 28px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

.quick-search label {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
    color: var(--text-main);
}

.quick-search div {
    display: flex;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

.quick-search input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

.quick-links a {
    color: var(--sakura-600);
    background: var(--sakura-100);
    border: 0;
}

.section-block {
    margin-top: 56px;
    margin-bottom: 56px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-title span {
    width: 6px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--sakura-500), var(--azuki-500));
}

.section-title.matcha span {
    background: linear-gradient(180deg, var(--matcha-500), var(--matcha-600));
}

.section-title.yuzu span {
    background: linear-gradient(180deg, var(--yuzu-400), var(--yuzu-500));
}

.section-title.azuki span {
    background: linear-gradient(180deg, var(--azuki-500), var(--sakura-600));
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 900;
    color: var(--text-main);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: #111827;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.horizontal-card .card-cover {
    height: 100%;
    min-height: 190px;
}

.card-cover img,
.compact-cover img,
.side-card img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 42px;
    background: rgba(0, 0, 0, 0.0);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.28);
}

.card-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    font-size: 12px;
}

.card-body {
    padding: 18px;
}

.card-body h3,
.compact-card h3,
.side-card h2 {
    margin: 0;
    font-weight: 900;
    color: var(--text-main);
}

.card-body h3 {
    font-size: 18px;
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.card-body p {
    min-height: 46px;
    margin: 10px 0 14px;
    color: var(--text-soft);
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.ranking-panel {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

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

.compact-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: var(--shiratama-50);
    transition: background 0.25s ease, transform 0.25s ease;
}

.compact-card:hover {
    background: var(--sakura-100);
    transform: translateX(4px);
}

.compact-cover {
    position: relative;
    height: 68px;
    overflow: hidden;
    border-radius: 12px;
}

.rank-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: var(--azuki-500);
}

.compact-card h3 {
    font-size: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card p {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 13px;
}

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

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

.category-pill,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-pill {
    padding: 22px;
}

.category-pill:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.15);
}

.category-pill strong,
.category-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--sakura-600);
    font-size: 20px;
    font-weight: 900;
}

.category-pill span,
.category-card p {
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 14px;
}

.category-card {
    min-height: 210px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.category-card span,
.category-card p {
    color: #ffffff;
}

.sub-hero,
.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 68, 111, 0.45), transparent 30%), linear-gradient(135deg, var(--slate-900), #1f2937 58%, #3f1724);
}

.sub-hero .container,
.detail-hero-inner {
    padding: 62px 0;
}

.sub-hero h1,
.detail-hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
}

.sub-hero p,
.detail-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.85;
}

.breadcrumb {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-panel,
.search-panel {
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

.filter-row {
    display: grid;
    gap: 18px;
}

.filter-pill,
.search-filters button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--text-main);
    background: var(--shiratama-100);
    font-weight: 800;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.filter-pill:hover,
.filter-pill.active,
.search-filters button:hover,
.search-filters button.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-500));
    transform: translateY(-2px);
}

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

.inline-filter input,
.inline-filter select,
.search-page-form input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-filters {
    margin-top: 18px;
}

.detail-hero {
    background-size: cover;
    background-position: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    margin-top: 36px;
}

.detail-main,
.detail-side {
    min-width: 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-box video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    overflow: hidden;
    background: #000000;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
}

.player-cover span {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--sakura-500), var(--azuki-500));
    box-shadow: 0 16px 38px rgba(237, 28, 90, 0.38);
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.article-panel,
.side-card {
    margin-top: 24px;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

.article-panel h2,
.side-card h2,
.site-footer h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.article-panel p {
    margin: 0;
    color: #4b5563;
    line-height: 1.95;
}

.meta-panel dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.meta-panel dl div {
    padding: 14px;
    border-radius: 14px;
    background: var(--shiratama-50);
}

.meta-panel dt {
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 13px;
}

.meta-panel dd {
    margin: 0;
    font-weight: 800;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag-list span {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--sakura-600);
    background: var(--sakura-100);
    font-size: 13px;
    font-weight: 800;
}

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

.side-card {
    margin-top: 0;
}

.side-card img {
    height: 390px;
    border-radius: 18px;
    object-fit: cover;
}

.side-card h2 {
    margin-top: 18px;
}

.side-card p {
    margin: 0 0 18px;
    color: var(--text-soft);
}

.site-footer {
    margin-top: 80px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--shiratama-800), var(--shiratama-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-grid p {
    max-width: 420px;
    color: #d1d5db;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

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

.footer-links a:hover {
    color: var(--sakura-300);
}

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

@media (max-width: 1024px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .home-hero {
        aspect-ratio: auto;
        min-height: 520px;
    }

    .hero-content {
        padding: 36px;
    }

    .quick-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .horizontal-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

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

    .home-hero {
        min-height: 560px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero-actions,
    .quick-links {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-control {
        opacity: 1;
        width: 42px;
        height: 42px;
    }

    .quick-panel,
    .ranking-panel,
    .filter-panel,
    .search-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .quick-search div,
    .search-page-form,
    .inline-filter {
        grid-template-columns: 1fr;
        display: grid;
    }

    .quick-search div {
        overflow: visible;
        border: 0;
        border-radius: 0;
        gap: 12px;
    }

    .quick-search input {
        border: 1px solid #e5e7eb;
        border-radius: 999px;
    }

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .meta-panel dl {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .horizontal-card .card-cover,
    .card-cover {
        height: 240px;
    }

    .sub-hero .container,
    .detail-hero-inner {
        padding: 46px 0;
    }
}
