/*
 * z0010 - Japanese Zen / 日式禅風
 * Background: #FAFAF5 (Warm White - 和紙)
 * Text: #2F4F4F (Dark Slate - 墨色)
 * Accent: #B22222 (Firebrick / 朱色) — used VERY sparingly
 * Philosophy: Extreme whitespace, ma (間), quietude, less is more
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: "Hiragino Mincho ProN", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
    color: #2F4F4F;
    background: #FAFAF5;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: #2F4F4F; text-decoration: none; transition: color .3s ease; }
a:hover { color: #B22222; }

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

/* =========================================
   Header — paper-thin, floating, serene
   ========================================= */
header {
    background: rgba(250, 250, 245, .95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(47, 79, 79, .08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hd-wrap {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
    gap: 32px;
}

.logo {
    font-size: 22px;
    font-weight: 400;
    color: #2F4F4F;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 6px;
    font-family: "Hiragino Mincho ProN", "Noto Serif SC", Georgia, serif;
}
.logo:hover { color: #B22222; }

header nav[aria-label="主导航"] {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
    flex-wrap: nowrap;
    justify-content: flex-end;
}
header nav[aria-label="主导航"] a {
    padding: 6px 14px;
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    letter-spacing: 2px;
    transition: color .3s ease;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
header nav[aria-label="主导航"] a:hover { color: #2F4F4F; }
header nav[aria-label="主导航"] a.active { color: #B22222; }
header nav[aria-label="主导航"] a.sub { font-size: 12px; color: #c0c0b8; }
header nav[aria-label="主导航"] a.sub:hover { color: #2F4F4F; }
header nav[aria-label="主导航"] a.sub.active { color: #B22222; }

.hd-search { display: flex; align-items: center; flex-shrink: 0; }
.hd-search input {
    width: 140px;
    height: 32px;
    border: none;
    border-bottom: 1px solid rgba(47, 79, 79, .15);
    padding: 0 8px;
    font-size: 13px;
    outline: none;
    background: transparent;
    color: #2F4F4F;
    letter-spacing: 1px;
    transition: border-color .3s ease;
    font-family: inherit;
}
.hd-search input:focus { border-bottom-color: #B22222; }
.hd-search input::placeholder { color: #c0c0b8; }
.hd-search button {
    height: 32px;
    padding: 0 12px;
    background: none;
    border: none;
    color: #B22222;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 2px;
    font-family: inherit;
}

.m-btns { display: none; gap: 10px; flex-shrink: 0; margin-left: auto; }
.m-btns button {
    background: none;
    border: none;
    cursor: pointer;
    color: #2F4F4F;
    padding: 4px;
    opacity: .6;
    transition: opacity .3s;
}
.m-btns button:hover { opacity: 1; }

/* Mobile search panel */
.search-panel {
    display: none;
    padding: 16px 24px;
    background: #FAFAF5;
    border-bottom: 1px solid rgba(47, 79, 79, .08);
}
.search-panel.show { display: flex; gap: 8px; }
.search-panel input {
    flex: 1;
    height: 40px;
    border: none;
    border-bottom: 1px solid rgba(47, 79, 79, .15);
    padding: 0 8px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #2F4F4F;
    font-family: inherit;
}
.search-panel input:focus { border-bottom-color: #B22222; }
.search-panel button {
    height: 40px;
    padding: 0 20px;
    background: none;
    border: none;
    border-bottom: 1px solid #B22222;
    color: #B22222;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 2px;
    font-family: inherit;
}

/* Mobile nav */
.m-nav {
    display: none;
    background: #FAFAF5;
    border-bottom: 1px solid rgba(47, 79, 79, .08);
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 0;
}
.m-nav.show { display: flex; }
.m-nav a {
    padding: 10px 18px;
    font-size: 15px;
    color: #999;
    letter-spacing: 2px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.m-nav a:hover { color: #B22222; }
.m-nav a.sub { font-size: 13px; color: #c0c0b8; }

/* =========================================
   Main — generous breathing room
   ========================================= */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

main > h1 {
    font-size: 20px;
    font-weight: 400;
    color: #2F4F4F;
    padding: 0 0 16px;
    margin-bottom: 32px;
    letter-spacing: 3px;
    border-bottom: 1px solid rgba(47, 79, 79, .1);
    font-family: "Hiragino Mincho ProN", "Noto Serif SC", Georgia, serif;
}

/* =========================================
   Section headers — Japanese book spine
   thin left border + text, nothing else
   ========================================= */
.sec-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 48px 0 24px;
    padding-left: 16px;
    border-left: 3px solid #B22222;
}
.sec-hd h2,
.sec-hd span {
    font-size: 16px;
    font-weight: 400;
    color: #2F4F4F;
    letter-spacing: 3px;
    margin: 0;
    font-family: "Hiragino Mincho ProN", "Noto Serif SC", Georgia, serif;
}
.sec-hd a,
.sec-hd .more {
    font-size: 12px;
    color: #b0b0a8;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.sec-hd a:hover,
.sec-hd .more:hover { color: #B22222; }

/* =========================================
   Video Grid — 4 columns, large cards
   no borders, faint shadow, hover lift
   ========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

a.item {
    display: block;
    background: #fff;
    box-shadow: 0 1px 4px rgba(47, 79, 79, .06);
    transition: transform .4s ease, box-shadow .4s ease;
    overflow: hidden;
}
a.item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(47, 79, 79, .1);
}

a.item .cover {
    display: block;
    position: relative;
    padding-bottom: 140%;
    overflow: hidden;
    background: #F0EFE8;
}
a.item .cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .4s ease;
}
a.item:hover .cover img { opacity: .92; }

a.item .cover .mark {
    position: absolute;
    right: 0;
    top: 0;
    background: rgba(178, 34, 34, .85);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", sans-serif;
}
a.item .cover .score {
    position: absolute;
    left: 0;
    bottom: 0;
    background: rgba(47, 79, 79, .7);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    letter-spacing: 1px;
}

a.item .title {
    display: block;
    padding: 12px 12px 14px;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2F4F4F;
    text-align: center;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
a.item:hover .title { color: #B22222; }

/* =========================================
   Category tabs — delicate underline style
   ========================================= */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 28px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(47, 79, 79, .08);
}
.cat-tabs a {
    padding: 8px 16px;
    font-size: 13px;
    color: #999;
    letter-spacing: 2px;
    border-bottom: 2px solid transparent;
    transition: all .3s ease;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.cat-tabs a:hover { color: #2F4F4F; }
.cat-tabs a.active { color: #B22222; border-bottom-color: #B22222; }

/* =========================================
   Breadcrumb — whisper-quiet
   ========================================= */
nav.breadcrumb {
    font-size: 12px;
    color: #c0c0b8;
    padding: 0 0 24px;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
nav.breadcrumb a { color: #999; }
nav.breadcrumb a:hover { color: #B22222; }

/* =========================================
   Detail page — lots of whitespace
   cover with thin border like a print
   ========================================= */
.detail {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
    padding: 32px 0;
}

.detail-cover {
    width: 220px;
    flex-shrink: 0;
}
.detail-cover img {
    width: 100%;
    border: 1px solid rgba(47, 79, 79, .1);
}

.detail-info {
    flex: 1;
    min-width: 0;
    padding-top: 8px;
}
.detail-info h1 {
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 12px;
    color: #2F4F4F;
    line-height: 1.5;
    letter-spacing: 3px;
    border: none;
    padding: 0;
    font-family: "Hiragino Mincho ProN", "Noto Serif SC", Georgia, serif;
}
.score {
    display: inline-block;
    font-size: 32px;
    font-weight: 300;
    color: #B22222;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-family: Georgia, serif;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.info-table tr { border-bottom: 1px solid rgba(47, 79, 79, .05); }
.info-table th {
    width: 48px;
    text-align: left;
    font-weight: 400;
    font-size: 12px;
    color: #b0b0a8;
    padding: 8px 0;
    vertical-align: top;
    letter-spacing: 2px;
}
.info-table td {
    font-size: 14px;
    color: #555;
    padding: 8px 0;
    line-height: 1.8;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.play-action { margin-top: 24px; }
.btn-play {
    display: inline-block;
    padding: 10px 40px;
    border: 1px solid #B22222;
    color: #B22222;
    font-size: 14px;
    letter-spacing: 3px;
    transition: all .3s ease;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.btn-play:hover {
    background: #B22222;
    color: #fff;
}
.btn-play.disabled {
    border-color: #ddd;
    color: #ccc;
    cursor: not-allowed;
}
.btn-play.disabled:hover {
    background: transparent;
    color: #ccc;
}

/* =========================================
   Episodes — outlined, minimal
   ========================================= */
.vod-group { margin-bottom: 20px; }
.vod-name {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    color: #2F4F4F;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.ep-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    background: transparent;
    border: 1px solid rgba(47, 79, 79, .15);
    color: #888;
    transition: all .3s ease;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.ep-btn:hover {
    border-color: #B22222;
    color: #B22222;
}
.ep-btn.active {
    background: #B22222;
    color: #fff;
    border-color: #B22222;
}

/* =========================================
   Description
   ========================================= */
.desc {
    font-size: 15px;
    line-height: 2;
    color: #666;
    padding: 16px 0;
    letter-spacing: .5px;
}

/* =========================================
   Player
   ========================================= */
.player-box { margin-bottom: 32px; }
.player-wrap {
    position: relative;
    background: #1a1a1a;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #666;
    font-size: 13px;
    z-index: 5;
    gap: 12px;
    letter-spacing: 2px;
}
.player-loading.hide { display: none; }
.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #333;
    border-top-color: #B22222;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.video-player { width: 100%; height: 100%; }
.video-player iframe { width: 100%; height: 100%; border: none; }

/* =========================================
   Pagination — clean line style
   ========================================= */
.paging { padding: 32px 0; text-align: center; }
.paging ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}
.paging a, .paging span {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid rgba(47, 79, 79, .12);
    color: #999;
    transition: all .3s ease;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.paging a:hover { border-color: #B22222; color: #B22222; }
.paging .active a,
.paging span.current,
.paging a.current {
    background: #B22222;
    color: #fff;
    border-color: #B22222;
}
.paging .disabled a { color: #ddd; cursor: default; }

/* =========================================
   Empty state
   ========================================= */
.empty {
    text-align: center;
    padding: 64px 0;
    font-size: 15px;
    color: #c0c0b8;
    letter-spacing: 3px;
}

/* =========================================
   Footer — one breath, nothing more
   ========================================= */
footer {
    border-top: 1px solid rgba(47, 79, 79, .06);
    margin-top: 48px;
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
    text-align: center;
    font-size: 12px;
    color: #c0c0b8;
    letter-spacing: 1px;
    font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.footer-inner a {
    color: #b0b0a8;
    margin: 0 6px;
}
.footer-inner a:hover { color: #B22222; }
.footer-inner p { margin-top: 8px; }

/* =========================================
   Responsive — quiet adaptation
   ========================================= */

/* 1024px: 3 columns */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    header nav[aria-label="主导航"] a.sub { display: none; }
    .hd-wrap { gap: 20px; }
}

/* 768px: 2 columns, mobile nav */
@media (max-width: 768px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    header nav[aria-label="主导航"] { display: none; }
    .hd-search { display: none; }
    .m-btns { display: flex; }
    .hd-wrap { height: 56px; padding: 0 16px; }
    main { padding: 24px 16px 40px; }
    .detail { flex-direction: column; gap: 24px; }
    .detail-cover { width: 180px; margin: 0 auto; }
    .sec-hd { margin: 32px 0 16px; }
}

/* 480px: 2 columns, tighter */
@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    main { padding: 16px 12px 32px; }
    main > h1 { font-size: 17px; letter-spacing: 2px; margin-bottom: 20px; }
    .detail-cover { width: 140px; }
    .detail-info h1 { font-size: 20px; letter-spacing: 2px; }
    .sec-hd { margin: 24px 0 12px; padding-left: 12px; }
    .sec-hd h2, .sec-hd span { font-size: 15px; letter-spacing: 2px; }
    .ep-btn { padding: 5px 12px; font-size: 12px; }
    .logo { font-size: 19px; letter-spacing: 4px; }
    a.item .title { padding: 8px 8px 10px; font-size: 13px; }
    .empty { padding: 40px 0; }
}
