﻿/* ===================== 基础重置 ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================== 颜色变量（亮色） ===================== */
:root {
    --bg: #ffffff;
    --card: #ffffff;
    --text: #111111;
    --muted: #6b7280;
    --border: #e8e8e8;
    --accent: #16a34a;
    --accent-strong: #166534;
    --accent-soft: #e9f6ee;
    --shadow: 0 14px 30px rgba(22, 163, 74, 0.13);
    --dot-color: #16a34a;
    --dot-opacity: 0.11;
    --toggle-bg: rgba(255, 255, 255, 0.82);
    --avatar-bg: linear-gradient(135deg, #16a34a, #166534);
    --avatar-fg: #ffffff;
    --ticket-line: #b8b8b8;
    --ticket-hole: #cfcfcf;
}

/* ===================== 颜色变量（暗色） ===================== */
html[data-theme="dark"] {
    --bg: #0c0e0d;
    --card: #141815;
    --text: #eef2ef;
    --muted: #8d968f;
    --border: #232926;
    --accent: #22c55e;
    --accent-strong: #4ade80;
    --accent-soft: #12301d;
    --shadow: 0 14px 30px rgba(34, 197, 94, 0.16);
    --dot-color: #22c55e;
    --dot-opacity: 0.10;
    --toggle-bg: rgba(20, 24, 21, 0.82);
    --avatar-bg: linear-gradient(135deg, #22c55e, #15803d);
    --avatar-fg: #06210f;
    --ticket-line: #4a5550;
    --ticket-hole: #46514c;
}

/* ===================== 页面骨架 ===================== */
html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background 0.35s ease, color 0.35s ease;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: radial-gradient(var(--dot-color) 1.2px, transparent 1.2px);
        background-size: 22px 22px;
        opacity: var(--dot-opacity);
        pointer-events: none;
        z-index: 0;
        transition: opacity 0.35s ease;
    }

/* ===================== 几何装饰 ===================== */
.deco {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    transition: background 0.35s ease, border-color 0.35s ease;
}

.deco-circle {
    width: 340px;
    height: 340px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: -120px;
    right: -120px;
    opacity: 0.3;
}

.deco-square {
    width: 230px;
    height: 230px;
    background: var(--accent-soft);
    border-radius: 42px;
    transform: rotate(18deg);
    bottom: -80px;
    left: -80px;
}

.deco-triangle {
    width: 0;
    height: 0;
    border-left: 74px solid transparent;
    border-right: 74px solid transparent;
    border-bottom: 128px solid var(--accent);
    opacity: 0.13;
    top: 42%;
    left: -42px;
    transform: rotate(-12deg);
}

.deco-ring {
    width: 170px;
    height: 170px;
    border: 2px dashed var(--accent);
    border-radius: 50%;
    bottom: 12%;
    right: 6%;
    opacity: 0.22;
}

/* ===================== 主题切换 ===================== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--toggle-bg);
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

    .theme-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
        transform: rotate(15deg);
    }

.icon-sun {
    display: none;
}

.icon-moon {
    display: block;
}

html[data-theme="dark"] .icon-sun {
    display: block;
}

html[data-theme="dark"] .icon-moon {
    display: none;
}

/* ===================== 页码点 ===================== */
.page-dots {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .page-dots a {
        display: block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 1.5px solid var(--accent);
        background: transparent;
        transition: all 0.25s ease;
    }

        .page-dots a:hover {
            transform: scale(1.25);
        }

        .page-dots a.active {
            background: var(--accent);
            transform: scale(1.3);
        }

/* ===================== 滚动容器 ===================== */
.scroll-container {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.page {
    scroll-snap-align: start;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 48px;
    position: relative;
}

.page-inner {
    width: 100%;
    max-width: 880px;
}

    .page-inner > * {
        animation: fadeUp 0.6s ease both;
    }

        .page-inner > *:nth-child(2) {
            animation-delay: 0.08s;
        }

        .page-inner > *:nth-child(3) {
            animation-delay: 0.16s;
        }

        .page-inner > *:nth-child(4) {
            animation-delay: 0.24s;
        }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ===================== 第 1 页 ===================== */
.hero {
    text-align: center;
    margin-bottom: 48px;
}

.avatar-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 22px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: var(--avatar-fg);
    background: var(--avatar-bg);
    box-shadow: 0 0 0 8px var(--accent-soft);
    user-select: none;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .avatar:hover {
        transform: rotate(-8deg) scale(1.05);
    }

img.avatar {
    display: block;
    object-fit: cover;
}

.anger-symbol {
    position: absolute;
    top: -10px;
    right: -14px;
    font-size: 36px;
    line-height: 1;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
    transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(225, 29, 72, 0.35));
}

    .anger-symbol.show {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        animation: angerShake 0.6s ease-in-out;
    }

@keyframes angerShake {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }

    25% {
        transform: scale(1.2) rotate(-10deg);
    }

    50% {
        transform: scale(0.95) rotate(8deg);
    }

    75% {
        transform: scale(1.15) rotate(-5deg);
    }
}

.name {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

    .name::after {
        content: "";
        display: block;
        width: 36px;
        height: 6px;
        background: var(--accent);
        border-radius: 3px;
        margin: 14px auto 0;
    }

.tagline {
    margin-top: 16px;
    font-size: clamp(1rem, 2.6vw, 1.15rem);
    color: var(--muted);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 20px;
}

    .section-title::before {
        content: "";
        width: 26px;
        height: 3px;
        background: var(--accent);
        border-radius: 2px;
    }

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.35s ease;
}

    .card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
        box-shadow: var(--shadow);
    }

    .card h3 {
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 0.98rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.card p {
    color: var(--muted);
    font-size: 0.94rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    font-family: inherit;
}

.scroll-hint {
    text-align: center;
    margin-top: 40px;
    font-size: 0.82rem;
    color: var(--muted);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(6px);
        opacity: 1;
    }
}

/* ===================== 通用页标题 ===================== */
.page-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-num {
    font-size: 0.75em;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.page-sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ===================== 第 2 页：小说书脊 ===================== */
.shelf {
    display: flex;
    gap: 10px;
    align-items: stretch;
    height: 420px;
}

.book {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    background: var(--card);
    outline: none;
}

    .book:hover {
        flex: 1.6 1 0;
        transition: flex 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .book.open {
        flex: 2.2 1 0;
        transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .book:focus-visible {
        flex: 1.6 1 0;
    }

.book-spine {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    transition: opacity 0.3s ease;
}

.book:hover .book-spine,
.book:focus-visible .book-spine,
.book.open .book-spine {
    opacity: 0;
}

.book-spine-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-strong);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.book-detail {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 16px 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
    pointer-events: none;
    background: var(--card);
    text-align: center;
}

.book:hover .book-detail,
.book:focus-visible .book-detail,
.book.open .book-detail {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.book-cover {
    img.book-cover {
        object-fit: cover;
        display: block;
    }

    flex-shrink: 0;
    width: 128px;
    height: 180px;
    border-radius: 12px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.book-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

    .book-info h3 {
        font-size: 0.86rem;
        font-weight: 700;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

.book-author {
    font-size: 0.74rem;
    color: var(--accent-strong);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.book-extra {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    width: 100%;
    margin-top: 0;
    text-align: left;
}

.book.open .book-extra {
    max-height: 160px;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 1;
    margin-top: 10px;
    padding-right: 6px;
}

    .book.open .book-extra::-webkit-scrollbar {
        width: 4px;
    }

    .book.open .book-extra::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 2px;
    }

    .book.open .book-extra::-webkit-scrollbar-track {
        background: transparent;
    }


.book-quote {
    font-size: 0.78rem;
    color: var(--text);
    font-style: italic;
    border-left: 2px solid var(--accent);
    padding-left: 8px;
    margin-bottom: 8px;
}

.book-review {
    font-size: 0.76rem;
    color: var(--muted);
}

/* ===================== 第 3 页：阅读数据 ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.stats-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.35s ease;
}

    .stats-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
        box-shadow: var(--shadow);
    }

    .stats-card h3 {
        font-size: 0.9rem;
        font-weight: 700;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .stats-card h3::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent);
            flex-shrink: 0;
        }

.stats-pie {
    grid-column: span 1;
}

.pie-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pie {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient( #16a34a 0% 16.4%, #22c55e 16.4% 62.7%, #4ade80 62.7% 100%);
    position: relative;
}

    .pie::after {
        content: "";
        position: absolute;
        inset: 24%;
        border-radius: 50%;
        background: var(--card);
    }

.pie-legend {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 110px;
    flex: 1;
}

    .pie-legend li {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8rem;
        color: var(--muted);
    }

    .pie-legend b {
        margin-left: auto;
        color: var(--text);
        font-variant-numeric: tabular-nums;
    }

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stats-combo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.combo-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combo-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.author-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.author-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--accent-soft);
    transition: transform 0.2s ease;
}

    .author-item:hover {
        transform: translateX(4px);
    }

.author-rank {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-strong);
    font-variant-numeric: tabular-nums;
}

.author-name {
    font-size: 0.84rem;
    font-weight: 600;
    flex: 1;
}

.author-count {
    font-size: 0.74rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-item {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

    .platform-item:hover {
        transform: translateY(-2px);
    }

/* 书籍标签 + 互动 */
.stats-tags {
    grid-column: span 2;
}

.tags-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.tags-main {
    flex: 1;
    min-width: 0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pick {
    font-size: 0.82rem;
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

    .tag-pick:hover {
        transform: translateY(-3px);
        border-color: var(--accent);
    }

    .tag-pick.picked {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent-strong);
    }

.tags-side {
    flex-shrink: 0;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
}

.interact-count {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

    .interact-count b {
        color: var(--accent-strong);
        font-size: 1.1em;
    }

.interact-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: transform 0.25s ease, background 0.25s ease;
}

    .interact-btn:hover {
        transform: translateY(-2px);
        background: var(--accent-strong);
    }

    .interact-btn:active {
        transform: translateY(0);
    }

/* ===================== 第 4 页：海报墙 ===================== */
.poster-wall {
    position: relative;
    height: 480px;
    margin-top: 8px;
}

.wall-texture {
    position: absolute;
    top: -40px;
    left: -30px;
    right: -30px;
    bottom: -40px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'><g fill='none' stroke='%23000000' stroke-opacity='0.22' stroke-width='1.4'><path d='M0 0 H84 M0 42 H84 M0 84 H84'/><path d='M0 0 V42 M42 0 V42'/><path d='M21 42 V84 M63 42 V84'/></g></svg>");
    background-size: 84px 84px;
    background-repeat: repeat;
    mask-image: radial-gradient(ellipse 78% 72% at center, #000 55%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 78% 72% at center, #000 55%, transparent 100%);
}

html[data-theme="dark"] .wall-texture {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'><g fill='none' stroke='%23ffffff' stroke-opacity='0.20' stroke-width='1.4'><path d='M0 0 H84 M0 42 H84 M0 84 H84'/><path d='M0 0 V42 M42 0 V42'/><path d='M21 42 V84 M63 42 V84'/></g></svg>");
}

.poster {
    position: absolute;
    width: 150px;
    height: 210px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--card);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
    outline: none;
    z-index: 1;
}

.poster-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--accent-soft);
    font-size: 62px;
}

img.poster-art {
    object-fit: cover;
}

.poster:hover {
    transform: translateY(-10px) scale(1.06) rotate(0deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
    z-index: 30;
}

.poster-a {
    top: 0;
    left: 6%;
    transform: rotate(-6deg);
    z-index: 5;
}

.poster-b {
    top: 60px;
    left: 22%;
    transform: rotate(4deg);
    z-index: 4;
}

.poster-c {
    top: 12px;
    left: 40%;
    transform: rotate(-3deg);
    z-index: 6;
}

.poster-d {
    top: 90px;
    left: 56%;
    transform: rotate(6deg);
    z-index: 3;
}

.poster-e {
    top: 30px;
    left: 72%;
    transform: rotate(-5deg);
    z-index: 5;
}

.poster-f {
    top: 150px;
    left: 32%;
    transform: rotate(2deg);
    z-index: 2;
}

.poster-modal-box {
    text-align: center;
}

.poster-modal-art {
    width: 140px;
    height: 196px;
    margin: 0 auto 18px;
    border-radius: 12px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

img.poster-modal-art {
    object-fit: cover;
}

.poster-modal-meta {
    font-size: 0.82rem;
    color: var(--accent-strong);
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===================== 第 5 页：音乐播放列表 ===================== */
.playlist {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}

.pl-now {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.pl-now-label {
    letter-spacing: 0.02em;
}

.pl-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.pl-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .pl-btn:hover {
        color: var(--accent-strong);
        background: var(--accent-soft);
        border-color: var(--accent);
    }

.pl-btn-danger:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: #dc2626;
}

.playlist-row {
    display: grid;
    grid-template-columns: 44px 1.6fr 1fr 1.8fr 60px;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    cursor: default;
}

    .playlist-row:last-child {
        border-bottom: none;
    }

    .playlist-row:hover {
        background: var(--accent-soft);
    }

.pl-index {
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.playlist-row:hover .pl-index {
    color: var(--accent-strong);
}

.pl-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-artist {
    font-size: 0.86rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-note {
    font-size: 0.84rem;
    color: var(--muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-row:hover .pl-note {
    color: var(--accent-strong);
}

.pl-time {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===================== 第 6 页：游戏 ===================== */
.game-folder {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px 24px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px 16px;
}

.game-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 14px;
    transition: transform 0.2s ease, background 0.2s ease;
    font-family: inherit;
    color: inherit;
}

    .game-app:hover {
        transform: translateY(-4px);
        background: var(--accent-soft);
    }

    .game-app:active {
        transform: translateY(-1px) scale(0.98);
    }

.game-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.12);
}

.game-app:hover .game-icon {
    transform: scale(1.06) rotate(-4deg);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
}

.game-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 通用弹窗 */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease both;
}

    .game-modal[hidden] {
        display: none;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.game-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.game-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

    .game-modal-close:hover {
        transform: rotate(90deg);
        background: var(--accent);
        color: #fff;
    }

.game-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
    padding-right: 32px;
}

.game-modal-desc {
    font-size: 0.94rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ===================== 第 7 页：CP 票夹 ===================== */
.cp-stage {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 48px;
    align-items: start;
    min-height: 480px;
    margin-top: 40px;
}

/* 左边：票夹 + 错开的票根 */
.ticket-stack {
    position: relative;
    padding-bottom: 60px;
    margin-left: -10px;
}

/* 每张票根：依次往下错开，露出 CP 名 */
.ticket-pocket {
    position: relative;
    height: 64px;
    cursor: pointer;
    outline: none;
    margin-bottom: -14px;
    transition: transform 0.3s ease;
}

    .ticket-pocket.active {
        z-index: 20;
    }

/* 票根露出的一条：CP 名 */
.pocket-lip {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: var(--card);
    border: 1.5px solid var(--ticket-line);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-strong);
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .pocket-lip span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.ticket-pocket:hover .pocket-lip {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.ticket-pocket.active .pocket-lip {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* 完整票根：默认藏在票夹下方
   只有上下边框，没有左右边框
   overflow: hidden 用来裁齿孔的外侧 */
.ticket-card {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    background: var(--card);
    border-top: 1.5px solid var(--ticket-line);
    border-bottom: 1.5px solid var(--ticket-line);
    border-left: none;
    border-right: none;
    border-radius: 0;
    overflow: hidden;
    transform: translateY(0) scale(0.98);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    font-family: "Courier New", ui-monospace, monospace;
}

/* 抽出：票根向上平移并放大，然后透明消失 */
.ticket-pocket.active .ticket-card {
    animation: ticketPull 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ticketPull {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.98);
    }

    30% {
        opacity: 1;
        transform: translateY(-40%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translateY(-120%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-160%) scale(1);
    }
}

/* 齿孔：
   伪元素宽 12px，一半在票根内（6px），一半在票根外（6px）
   圆点用 radial-gradient 画在伪元素中央
   票根 overflow: hidden 会把伪元素超出票根的部分裁掉
   结果：票根内留下靠内侧的半圆，外侧被裁掉 */
.ticket-card::before,
.ticket-card::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    pointer-events: none;
    z-index: 6;
    background-repeat: repeat-y;
    background-size: 12px 14px;
    background-position: 0 0;
}

/* 左边齿孔：伪元素一半在票根内，一半在票根外 */
.ticket-card::before {
    left: -6px;
    background-image: radial-gradient(circle at 50% 50%, var(--bg) 0, var(--bg) 4.5px, var(--ticket-hole) 4.5px, var(--ticket-hole) 5.5px, transparent 5.5px );
}

/* 右边齿孔：伪元素一半在票根内，一半在票根外 */
.ticket-card::after {
    right: -6px;
    background-image: radial-gradient(circle at 50% 50%, var(--bg) 0, var(--bg) 4.5px, var(--ticket-hole) 4.5px, var(--ticket-hole) 5.5px, transparent 5.5px );
}

/* 票夹：再往下拉长 */
.ticket-clip {
    position: absolute;
    left: -8px;
    right: -8px;
    top: 200px;
    bottom: -120px;
    background: var(--card);
    border: 1.5px solid var(--ticket-line);
    border-top: 3px solid var(--ticket-line);
    border-radius: 0 0 10px 10px;
    z-index: 10;
    box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.05);
}

/* 票根内部 */
.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    border-bottom: 1px solid var(--ticket-line);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.ticket-label {
    color: var(--accent-strong);
}

.ticket-no {
    font-variant-numeric: tabular-nums;
}

.ticket-body {
    padding: 20px 22px 16px;
}

.ticket-pair {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}

.ticket-x {
    color: var(--accent);
    font-weight: 800;
}

.ticket-from {
    font-size: 0.74rem;
    color: var(--accent-strong);
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.ticket-desc {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
}

.ticket-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    border-top: 1px dashed var(--ticket-line);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.ticket-admit {
    color: var(--accent-strong);
}

.ticket-seat {
    font-variant-numeric: tabular-nums;
}

/* 右边：展示区 */
.ticket-stage {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
    padding-top: 20px;
}

.ticket-empty {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 60px 20px;
    border: 1.5px dashed var(--ticket-line);
    border-radius: 8px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    align-self: center;
    transition: opacity 0.3s ease;
}

/* 右边展示的票根：同样只有上下边框 */
.ticket-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 100%;
    max-width: 360px;
    background: var(--card);
    border-top: 1.5px solid var(--ticket-line);
    border-bottom: 1.5px solid var(--ticket-line);
    border-left: none;
    border-right: none;
    border-radius: 0;
    overflow: hidden;
    font-family: "Courier New", ui-monospace, monospace;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 5;
}

    .ticket-display.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .ticket-display::before,
    .ticket-display::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 12px;
        pointer-events: none;
        z-index: 6;
        background-repeat: repeat-y;
        background-size: 12px 14px;
        background-position: 0 0;
    }

    .ticket-display::before {
        left: -6px;
        background-image: radial-gradient(circle at 50% 50%, var(--bg) 0, var(--bg) 4.5px, var(--ticket-hole) 4.5px, var(--ticket-hole) 5.5px, transparent 5.5px );
    }

    .ticket-display::after {
        right: -6px;
        background-image: radial-gradient(circle at 50% 50%, var(--bg) 0, var(--bg) 4.5px, var(--ticket-hole) 4.5px, var(--ticket-hole) 5.5px, transparent 5.5px );
    }

/* ===================== 第 8 页：联系方式 ===================== */
.contact-page {
    text-align: center;
}

.closing-line {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

.wechat-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

    .wechat-btn:hover {
        transform: translateY(-3px);
        background: var(--accent-strong);
        box-shadow: 0 16px 32px rgba(22, 163, 74, 0.32);
    }

    .wechat-btn:active {
        transform: translateY(-1px);
    }

.qr-wrap {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.45s ease both;
}

    .qr-wrap[hidden] {
        display: none;
    }

.qr-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px;
    box-shadow: var(--shadow);
}

.qr-tip {
    font-size: 0.88rem;
    color: var(--muted);
}

/* ===================== 页脚 ===================== */
.site-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ===================== 手机适配 ===================== */
@media (max-width: 860px) {
    .shelf {
        flex-direction: column;
        height: auto;
    }

    .book {
        flex: none;
        min-height: 64px;
    }

        .book:hover,
        .book:focus-visible,
        .book.open {
            flex: none;
        }

    .book-spine {
        position: relative;
        inset: auto;
        min-height: 64px;
    }

    .book-spine-title {
        writing-mode: horizontal-tb;
    }

    .book-detail {
        position: relative;
        inset: auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
        flex-direction: column;
    }

    .book:hover .book-detail,
    .book:focus-visible .book-detail,
    .book.open .book-detail {
        display: flex;
    }

    .book-cover {
        width: 110px;
        height: 154px;
        font-size: 50px;
    }

    .stats-pie {
        grid-column: span 1;
    }

    .stats-tags {
        grid-column: span 2;
    }

    .tags-row {
        flex-direction: column;
    }

    .tags-side {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cp-stage {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 0;
    }

    .ticket-stack {
        margin-left: 0;
    }

    .ticket-stage {
        min-height: 420px;
        padding-top: 0;
        margin-top: 60px;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 64px 24px;
    }
    /* 手机端取消整页吸附，改成自由滚动 */
    .scroll-container {
        scroll-snap-type: none;
    }

    .page {
        scroll-snap-align: none;
    }
    .page-dots {
        display: none;
    }

    .grid,
    .stats-grid,
    .cp-grid {
        grid-template-columns: 1fr;
    }

    .stats-pie,
    .stats-tags {
        grid-column: span 1;
    }

    .pie-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .pie {
        width: 130px;
        height: 130px;
    }

    .poster-wall {
        height: 720px;
    }

    .poster {
        width: 120px;
        height: 168px;
    }

    .poster-art {
        font-size: 48px;
    }

    .poster-a {
        top: 0;
        left: 6%;
        transform: rotate(-5deg);
    }

    .poster-b {
        top: 90px;
        left: 36%;
        transform: rotate(4deg);
    }

    .poster-c {
        top: 210px;
        left: 2%;
        transform: rotate(-3deg);
    }

    .poster-d {
        top: 300px;
        left: 42%;
        transform: rotate(6deg);
    }

    .poster-e {
        top: 430px;
        left: 10%;
        transform: rotate(-4deg);
    }

    .poster-f {
        top: 520px;
        left: 38%;
        transform: rotate(3deg);
    }

    .game-grid {
        gap: 18px 12px;
    }

    .game-icon {
        width: 56px;
        height: 56px;
        font-size: 26px;
    }

    .playlist-row {
        grid-template-columns: 36px 1.6fr 1fr 52px;
        gap: 8px;
        padding: 12px 16px;
    }

    .pl-note {
        display: none;
    }

    .hero {
        margin-bottom: 36px;
    }

    .avatar-wrap {
        width: 88px;
        height: 88px;
        margin-bottom: 18px;
    }

    .avatar {
        font-size: 36px;
        box-shadow: 0 0 0 6px var(--accent-soft);
    }

    .anger-symbol {
        font-size: 30px;
        top: -8px;
        right: -12px;
    }

    .deco-circle {
        width: 220px;
        height: 220px;
        top: -80px;
        right: -80px;
    }

    .deco-square {
        width: 150px;
        height: 150px;
        bottom: -55px;
        left: -55px;
    }

    .deco-ring {
        display: none;
    }

    .theme-toggle {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .qr-img {
        width: 180px;
        height: 180px;
    }
}

/* ===================== 减少动效 ===================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
