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

html { height: 100%; }   /* 配合 body 满屏；滚动条预留改放到 .content 上 */

body {
    font-family: "Crimson Pro", "Noto Serif SC", Georgia, serif;
    background: linear-gradient(135deg, #FFFFF0 0%, #F0EDE5 50%, #E8E4DC 100%);
    color: #1A1A1A;
    display: flex;
    height: 100vh;        /* 固定满屏：侧边栏 + 整页都不随内容滚动 */
    overflow: hidden;     /* 滚动交给右侧 .content 自己处理 */
}

/* ———————————————————————— */
/* 动态几何背景 */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* 扇环动画 - 差异化：不同速度、方向、缩放 */
.bg-ring-sector {
    position: absolute;
    opacity: 0;
}

/* 各自独立动画 */
.arc1 { animation: ring-a1 14s ease-in-out infinite; }
.arc2 { animation: ring-a2 10s ease-in-out infinite; }
.arc3 { animation: ring-a3 16s ease-in-out infinite; }
.arc4 { animation: ring-a4 12s ease-in-out infinite reverse; }
.arc5 { animation: ring-a5 9s ease-in-out infinite; }
.arc6 { animation: ring-a6 18s ease-in-out infinite reverse; }
.arc7 { animation: ring-a7 11s ease-in-out infinite; }

@keyframes ring-a1 {
    0% { opacity: 0; transform: scale(0.8) rotate(0deg); }
    30% { opacity: 0.85; }
    100% { opacity: 0; transform: scale(1.15) rotate(40deg); }
}
@keyframes ring-a2 {
    0% { opacity: 0; transform: scale(0.85) rotate(20deg); }
    40% { opacity: 0.9; }
    100% { opacity: 0; transform: scale(1.1) rotate(-50deg); }
}
@keyframes ring-a3 {
    0% { opacity: 0; transform: scale(0.75) rotate(-10deg); }
    35% { opacity: 0.8; }
    100% { opacity: 0; transform: scale(1.2) rotate(30deg); }
}
@keyframes ring-a4 {
    0% { opacity: 0; transform: scale(0.9) rotate(15deg); }
    50% { opacity: 0.85; }
    100% { opacity: 0; transform: scale(1.05) rotate(-35deg); }
}
@keyframes ring-a5 {
    0% { opacity: 0; transform: scale(0.8) rotate(-20deg); }
    25% { opacity: 0.9; }
    100% { opacity: 0; transform: scale(1.18) rotate(55deg); }
}
@keyframes ring-a6 {
    0% { opacity: 0; transform: scale(0.88) rotate(30deg); }
    45% { opacity: 0.75; }
    100% { opacity: 0; transform: scale(1.08) rotate(-45deg); }
}
@keyframes ring-a7 {
    0% { opacity: 0; transform: scale(0.82) rotate(-15deg); }
    35% { opacity: 0.88; }
    100% { opacity: 0; transform: scale(1.12) rotate(35deg); }
}

/* 内容层置顶 */
.sidebar, .content {
    position: relative;
}

body, input, button, .result-value {
    font-family: "Crimson Pro", "Noto Serif SC", Georgia, serif;
}

.sidebar {
    width: 200px;
    flex-shrink: 0;            /* 固定 200px，不被内容挤小 */
    background-color: #003153;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 36px;
    font-weight: 700;
    color: #FFFFF0;
    margin-bottom: 32px;
    padding-left: 8px;
}

.nav {
    flex: 1;
}

.nav-item {
    display: block;
    padding: 12px 8px;
    color: #FFFFF0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-item:hover,
.nav-item.active {
    opacity: 1;
    background-color: rgba(255,255,255,0.1);
}

.nav-item-small {
    font-size: 13px;
    opacity: 0.5;
}

.nav-item-small:hover,
.nav-item-small.active {
    opacity: 1;
}

.sidebar-bottom {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.version-badge {
    font-size: 12px;
    background-color: rgba(255,255,255,0.15);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

.content {
    flex: 1;
    padding: 48px;
    position: relative;        /* 作为乐评 iframe 面板的定位容器 */
    height: 100vh;             /* 与侧边栏同高、铺满 */
    overflow-y: auto;          /* 只有右侧内容区自己上下滚（侧边栏不动）*/
    /* Firefox：细滚动条、淡蓝滑块、透明轨道（常驻、淡）*/
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 49, 83, 0.2) transparent;
}

/* 内容区滚动条（Chrome/Edge/Safari）：常驻，但细、淡、优雅 */
.content::-webkit-scrollbar {
    width: 10px;
}
.content::-webkit-scrollbar-track {
    background: transparent;            /* 轨道透明，只留一条淡淡的滑块 */
}
.content::-webkit-scrollbar-thumb {
    background: rgba(0, 49, 83, 0.18);  /* 常驻、淡品牌蓝 */
    border-radius: 10px;
    border: 3px solid transparent;     /* 四周留白，滑块看起来只有 ~4px，更细 */
    background-clip: padding-box;
}
.content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 49, 83, 0.38);  /* 鼠标压上去略深一点 */
    background-clip: padding-box;
}
.content::-webkit-scrollbar-button {
    display: none;          /* 去掉上下两端的小三角箭头 */
    height: 0;
    width: 0;
}

/* 乐评面板：用 iframe 嵌入独立的乐评页，铺满内容区（侧边栏不重新加载，不抖） */
#ratePage {
    position: absolute;
    inset: 0;
}
#ratePage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #FAF7F2;   /* 乐评页底色：盖住 iframe 文档预留的滚动条空槽，别透出大盘背景 */
}

/* 右下角访问计数：毛玻璃小卡片（形状同 .result/.chart-section/.compare-box），蓝字、红数字 */
.visit-counter {
    position: fixed;
    right: 16px;
    bottom: 14px;
    z-index: 50;
    pointer-events: none;          /* 不挡下面内容的点击 */
    user-select: none;
    /* —— 毛玻璃：与大盘卡片同款 —— */
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E"),
        rgba(255, 255, 255, 0.3);
    background-blend-mode: screen;
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 49, 83, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    /* —— 内容排版 —— */
    padding: 7px 14px;
    font-size: 12px;
    line-height: 1.2;
    color: #003153;                /* 文字：品牌蓝 */
    white-space: nowrap;
}
.visit-counter .vc-num {
    color: #9B1B30;                /* 数字：品牌红 */
    font-size: 15px;               /* 数字稍大 */
    font-weight: 700;
    margin: 0 1px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #1A1A1A;
    opacity: 0.6;
    margin-bottom: 24px;
}

.result, .chart-section, .compare-box {
    background:
        /* 修改最后的opacity值可以调整毛玻璃效果的强弱，0.3-0.5之间比较合适 */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E"),
        rgba(255, 255, 255, 0.3);
    /* 毛玻璃混合模式，可选multiply、soft-light、screen等 */
    background-blend-mode: screen;
    border-radius: 12px;
    padding: 24px;
    box-shadow:
        0 8px 32px rgba(0, 49, 83, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.result {
    flex: 0 0 auto;
}

.compare-box {
    flex: 0 0 auto;
}

.compare-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.compare-line {
    display: flex;
    align-items: center;
    gap: 16px;
}

.compare-line input[type="date"] {
    display: block;
}

.compare-value {
    font-size: 28px;
    font-weight: 700;
    color: #9B1B30;
}

.compare-arrow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* 卡片样式 */
.chart-section {
    flex: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: #9B1B30;
}

.cards-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.left-cards {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-value {
    font-size: 48px;
    font-weight: 700;
    color: #9B1B30;
}

.chart-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.chart-range span {
    color: #1A1A1A;
    opacity: 0.6;
}

.chart-container {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 8px;
    height: 300px;
    backdrop-filter: blur(12px);
}

#chart {
    width: 100%;
    height: 100%;
}

.query-box {
    display: flex;
    gap: 12px;
}

input[type="date"] {
    padding: 10px 14px;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    color: #1A1A1A;
    font-size: 16px;
    cursor: pointer;
}

input[type="date"]:focus {
    outline: none;
    border-color: #9B1B30;
}

button {
    padding: 10px 20px;
    background-color: #9B1B30;
    color: #FFFFF0;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #B22234;
}

/* —————————————————— */
/* 大盘对比版块 */
.arrow-graph {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #666;
}

.arrow-graph.increase {
    border-top-color: #9B1B30;
}

.arrow-graph.decrease {
    border-top-color: #003153;
}

#compareRatio {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

#compareRatio.increase .arrow-graph {
    border-top-color: #9B1B30;
}

#compareRatio.decrease .arrow-graph {
    border-top-color: #003153;
}

#compareRatio.increase .ratio-text {
    color: #9B1B30;
}

#compareRatio.decrease .ratio-text {
    color: #003153;
}

/* 倍数字体 */
.ratio-text {
    font-size: 23px;
    font-weight: 700;
}

.hidden {
    display: none;
}

/* ———————————————————— */
/* 更新日志 */
.changelog-content {
    margin-top: 24px;
    padding: 24px;
}

.changelog-item {
    padding: 16px 0;
    border-bottom: 1px solid #E0E0E0;
}

.changelog-item:last-child {
    border-bottom: none;
}

.changelog-date {
    font-size: 16px;
    color: #9B1B30;
    font-weight: 600;
    margin-bottom: 8px;
}

.changelog-version {
    font-weight: 400;
    color: #FFFFF0;
    background-color: #003153;
    margin-left: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 14px;
}

/* 「即将上线」标签：和版本号徽标同款，换成红色 */
.changelog-soon {
    font-weight: 400;
    color: #FFFFF0;
    background-color: #9B1B30;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 14px;
}

.changelog-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1A1A1A;
    font-family: "Noto Serif SC", "Crimson Pro", Georgia, serif;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .cards-row {
        flex-direction: column;
    }
    .left-cards {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;          /* 手机端：顶栏+内容竖排，恢复整页自然滚动 */
        min-height: 100vh;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 16px;
    }

    .logo {
        margin-bottom: 0;
        margin-right: 24px;
    }

    .nav {
        display: flex;
        gap: 8px;
        flex: 1;
    }

    .sidebar-bottom {
        border-top: none;
        padding-top: 0;
    }

    .content {
        padding: 24px 16px;
        height: auto;          /* 手机端不固定高度，跟随内容 */
        overflow-y: visible;
    }

    h1 {
        font-size: 22px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
