/* ========================================
   精简版 Liquid Glass 设计系统
   ======================================== */

:root {
    --bg-body: #eef3fb;
    --text-main: #0b1220;
    --text-dim: #687588;
    --accent-brand: #4f8cff;
    --accent-light: rgba(79, 140, 255, 0.13);
    
    --glass-bg: rgba(255, 255, 255, 0.68);
    --glass-border: rgba(255, 255, 255, 0.76);
    --glass-highlight: rgba(255, 255, 255, 0.84);
    
    --border-bento: rgba(160, 174, 196, 0.2);
    --pill-bg: rgba(255, 255, 255, 0.74);
    --code-bg: rgba(0, 0, 0, 0.04);
    
    --surface-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.22);
    --card-nested-bg: rgba(255, 255, 255, 0.5);
    --card-nested-border: rgba(160, 174, 196, 0.18);
    --card-inset-bg: rgba(0, 0, 0, 0.02);
    --card-inset-border: rgba(160, 174, 196, 0.12);

    --success: #10b981;
    --danger: #f87171;

    --radius-huge: 32px;
    --radius-large: 24px;
    --radius-medium: 18px;
    --radius-small: 12px;

    --stage-bg: linear-gradient(180deg, rgba(255,255,255,0.34) 0%, rgba(244,248,255,0.78) 100%);
    --stage-border: rgba(255,255,255,0.58);
    --stage-shadow: 0 36px 96px -54px rgba(15,23,42,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
}

/* 自动跟随系统深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #060a12;
        --text-main: #f5f5f7;
        --text-dim: #9fabc0;
        --accent-brand: #8ab8ff;
        --glass-bg: rgba(14, 21, 38, 0.62);
        --glass-border: rgba(255, 255, 255, 0.14);
        --glass-highlight: rgba(255, 255, 255, 0.16);
        --border-bento: rgba(255, 255, 255, 0.1);
        --pill-bg: rgba(255, 255, 255, 0.08);
        --code-bg: rgba(255, 255, 255, 0.06);
        --surface-shadow: 0 38px 90px -40px rgba(0,0,0,0.64), inset 0 1px 0 rgba(255,255,255,0.08);
        --card-nested-bg: rgba(255, 255, 255, 0.03);
        --card-nested-border: rgba(255, 255, 255, 0.08);
        --card-inset-bg: rgba(0, 0, 0, 0.15);
        --card-inset-border: rgba(255, 255, 255, 0.05);
        --stage-bg: linear-gradient(180deg, rgba(13,20,33,0.48) 0%, rgba(10,16,28,0.78) 100%);
        --stage-border: rgba(255,255,255,0.1);
        --stage-shadow: 0 36px 96px -54px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
    }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: var(--bg-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h3 { font-family: 'Outfit', 'Inter', system-ui, sans-serif; }

/* 基础布局 */
.container-custom { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.header-section { text-align: center; padding: 2.5rem 0 1.5rem; }
.app-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.app-subtitle { font-size: 0.95rem; color: var(--text-dim); }

/* 主舞台 */
.home-stage {
    border-radius: 42px;
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    background: var(--stage-bg);
    border: 1px solid var(--stage-border);
    box-shadow: var(--stage-shadow);
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 1100px;
    animation: slideUpFade 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 版本卡片 */
.version-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(185%);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
    border-radius: var(--radius-huge);
    border: 1px solid var(--glass-border);
    box-shadow: var(--surface-shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.version-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, var(--glass-highlight) 0%, rgba(255,255,255,0.08) 18%, transparent 40%);
}
.version-card > * { position: relative; z-index: 1; }
.version-header { border-bottom: 1px solid var(--border-bento); padding-bottom: 1rem; }
.version-title { font-size: 1.2rem; font-weight: 700; }

/* 折叠动画核心 */
.card-content {
    overflow: hidden;
    max-height: 2500px; /* 需大于实际内容高度 */
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    opacity: 1;
}
.card-content.collapsed {
    max-height: 0 !important;
    margin-top: 0 !important;
    opacity: 0;
}
.toggle-icon { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.toggle-icon.rotated { transform: rotate(180deg); }

/* 标签与按钮 */
.badge { padding: 4px 10px; border-radius: var(--radius-small); font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; }
.badge-primary { background: var(--accent-light); color: var(--accent-brand); }
.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.btn-download {
    padding: 0.5rem 1.1rem; border-radius: var(--radius-medium); font-size: 0.85rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #10b981, #059669); color: #fff;
    transition: transform 0.3s;
}
.btn-download:hover { transform: translateY(-2px); color: #fff; }

/* 文件列表 */
.file-list { display: flex; flex-direction: column; gap: 0.75rem; }
.file-item {
    background: var(--card-nested-bg);
    border: 1px solid var(--card-nested-border);
    border-radius: var(--radius-large);
    padding: 1rem 1.25rem;
}
.file-info-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.file-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.file-meta-info { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-dim); }
.files-title { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* Markdown 渲染说明 */
.release-notes-title { font-size: 0.92rem; font-weight: 700; }
.release-notes-md {
    font-size: 0.85rem; line-height: 1.7; padding: 0.8rem 1rem;
    background: var(--card-inset-bg); border: 1px solid var(--card-inset-border);
    border-radius: var(--radius-small);
}
.release-notes-md p { margin: 0.4rem 0; }
.release-notes-md ul { padding-left: 1.4rem; margin: 0.4rem 0; }
.release-notes-md a { color: var(--accent-brand); text-decoration: none; }
.release-notes-md a:hover { text-decoration: underline; }

/* 页面底部 */
.site-footer { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.85rem; line-height: 1.8; }
.brand-text { color: #bb4b4c; font-weight: 600; }

/* 工具类与动画 */
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.ms-1 { margin-left: 0.25rem; }
.text-muted { color: var(--text-dim) !important; }
.text-danger { color: var(--danger) !important; }
.min-w-0 { min-width: 0; }
.break-word { word-break: break-all; }
.loading-state { text-align: center; padding: 3rem; color: var(--text-dim); }
.empty-state { text-align: center; padding: 2rem; color: var(--text-dim); }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   移动端响应式 (≤768px)
   ========================================= */
@media (max-width: 768px) {
    .container-custom { padding: 0 12px; }
    .home-stage { padding: 10px; border-radius: 28px; }
    .header-section { padding: 1.5rem 0 1rem; }
    .app-title { font-size: 1.5rem; }
    
    .version-card { padding: 16px; border-radius: 16px; }
    .file-item { padding: 12px; border-radius: 12px; }
    
    .file-info-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .file-name { font-size: 0.95rem; line-height: 1.4; margin-bottom: 8px; }
    .file-meta-info { flex-wrap: wrap; gap: 8px; font-size: 0.85rem; }
    
    .file-actions { width: 100%; display: flex; }
    .btn-download { width: 100%; justify-content: center; padding: 12px 0; font-size: 1rem; border-radius: 10px; }
}