/* ======================================================
   xiaofanhouCHN UTAU 音源下载页 — style.css
   结构分区：
     1. Reset & 基础变量
     2. 页面布局（两栏）
     3. 左侧 · 插画卡片（层叠定位）
     4. 右侧 · 内容面板（主 / 历史）
     5. 按钮样式
     6. 响应式断点
   ====================================================== */


/* ===== 1. Reset & 基础变量 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* —— 浅色主题（默认）—— */
:root {
    --bg-page: #ffffff;           /* 纯白背景 */
    --text-primary: #1a1a1a;      /* 主文字 */
    --text-secondary: #555;       /* 次要文字 */
    --text-muted: #999;           /* 弱化文字 */
    --border-card: #ffffff;       /* 插画边框 — 白色（已在角色层PNG里） */
    --line: #1a1a1a;              /* 按钮描边 */
    --accent: #e8b923;            /* 地面黄 */
    --history-divider: #e0e0e0;   /* 历史记录分隔线 */
    --history-scrollbar: #ccc;    /* 滚动条 */
    --frame-size: 460px;          /* 插画卡片尺寸（桌面） */
    --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* —— 深色主题（系统自动识别）—— */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #121212;
        --text-primary: #f0f0f0;
        --text-secondary: #c0c0c0;
        --text-muted: #888;
        --line: #f0f0f0;
        --history-divider: #333;
        --history-scrollbar: #444;
    }
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;   /* 主题切换平滑 */
}


/* ===== 2. 页面布局（两栏） ===== */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 96px;
    padding: 64px 48px;
    max-width: 1280px;
    margin: 0 auto;
}


/* ===== 3. 左侧 · 插画卡片 ===== */
.illustration {
    flex: 0 0 auto;
}

/* 三层叠加容器 */
.frame {
    position: relative;
    width: var(--frame-size);
    height: var(--frame-size);
    overflow: hidden;
    /* 整体卡片的圆角（可选，截图里是直角） */
}

.img-layer,
.img-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* 背景层 — 最底 */
.img-bg {
    z-index: 0;
    object-fit: cover;
}

/* 粒子层 — 中间 */
.img-particles {
    z-index: 1;
    pointer-events: none;  /* 不拦截点击 */
}

/* 角色层 — 最上（黄色地面 + 白色边框已内置在 fanhou-1.png 中） */
.img-char {
    z-index: 2;
    object-fit: contain;
}


/* ===== 4. 右侧 · 内容面板 ===== */
.content {
    flex: 1;
    min-width: 0;            /* 防止 flex 子元素溢出 */
    max-width: 640px;
}

.panel {
    animation: fade-in 0.25s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* —— 主内容面板 —— */
.title {
    font-size: 56px;
    font-weight: 300;          /* 极细体，贴合极简风 */
    letter-spacing: 1px;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.info-list {
    list-style: none;
    margin-bottom: 48px;
}

.info-list li {
    display: flex;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.info-label {
    /* label 和 value 用细微颜色差区分，不做粗体 */
    color: var(--text-muted);
    min-width: 150px;          /* 让右侧 value 对齐 */
}

.info-value {
    color: var(--text-primary);
}

/* —— 更新历史面板 —— */
.history-header {
    margin-bottom: 24px;
}

.subtitle {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.history-list {
    list-style: none;
    max-height: 340px;           /* 太长就滚动，不撑爆页面 */
    overflow-y: auto;
    padding-right: 8px;          /* 给滚动条留空间 */
}

/* 自定义滚动条（webkit） */
.history-list::-webkit-scrollbar {
    width: 4px;
}
.history-list::-webkit-scrollbar-thumb {
    background: var(--history-scrollbar);
    border-radius: 2px;
}
.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--history-divider);
    font-size: 14px;
}

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

.history-date {
    flex: 0 0 100px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.history-desc {
    flex: 1;
    color: var(--text-primary);
}


/* ===== 5. 按钮样式 ===== */
.btn-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    appearance: none;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    padding: 12px 36px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
    background: var(--text-primary);
    color: #fff;
}

.btn-back {
    padding: 6px 16px;
    font-size: 13px;
}


/* ===== 6. 响应式断点 ===== */
@media (max-width: 768px) {
    :root {
        --frame-size: 300px;
    }

    .page {
        flex-direction: column;
        gap: 48px;
        padding: 40px 24px;
    }

    .title {
        font-size: 36px;
        margin-bottom: 32px;
    }

    .info-list li {
        font-size: 15px;
    }

    .info-label {
        min-width: 110px;
    }

    .btn-row {
        gap: 12px;
    }

    .btn {
        padding: 10px 28px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    :root {
        --frame-size: 260px;
    }

    .title {
        font-size: 30px;
    }

    .info-list li {
        flex-direction: column;
        gap: 2px;
    }

    .info-label {
        min-width: unset;
    }
}
