/* ========== 全局主题变量（HSL 色相控制） ========== */
:root {
    /* 👇 改这一个数字，整个网站的主题色就会变 */
    --hue-primary: 25;        /* 青绿=160, 紫罗兰=295, 蓝=210, 橙=25, 红=0 */
    
    /* 饱和度（可单独调整） */
    --sat-primary: 70%;        /* 主色调饱和度 */
    --sat-bg: 8%;              /* 背景饱和度 */
    
    /* 亮度 */
    --light-primary: 55%;      /* 主色调亮度 */
    --light-primary-dark: 40%; /* 深色版亮度 */
    --light-bg: 8%;            /* 背景亮度 */
    
    /* 通过 HSL 计算实际颜色 */
    --theme-primary: hsl(var(--hue-primary), var(--sat-primary), var(--light-primary));
    --theme-primary-dark: hsl(var(--hue-primary), var(--sat-primary), var(--light-primary-dark));
    --theme-primary-glow: hsla(var(--hue-primary), var(--sat-primary), var(--light-primary), 0.3);
    
    /* 辅助色（固定，不受主色相影响） */
    --theme-orange: #f97316;
    --theme-blue: #3b82f6;
    
    /* 背景色系（使用主色相的极暗版本） */
    --bg-page: hsl(var(--hue-primary), var(--sat-bg), 8%);
    --bg-panel: hsla(var(--hue-primary), var(--sat-bg), 15%, 0.9);
    --bg-card: hsla(var(--hue-primary), var(--sat-bg), 20%, 0.7);
    --bg-dark: hsl(var(--hue-primary), var(--sat-bg), 10%);
    
    /* 边框色系 */
    --border-light: hsla(var(--hue-primary), 20%, 30%, 0.5);
    --border-theme: var(--theme-primary);
    
    /* 文字色系（固定，保持可读性） */
    --text-primary: #eef4ff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* 状态色（固定） */
    --success: #22c55e;
    --warning: #facc15;
    --error: #ef4444;
}

/* ========== 全局基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 统一页头样式 ========== */
.site-header {
    background: linear-gradient(135deg, var(--bg-dark), hsl(var(--hue-primary), 8%, 15%));
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--theme-primary);
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #a5f3fc, var(--theme-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-buttons {
    display: flex;
    gap: 16px;
}

.nav-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--theme-primary);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: var(--theme-primary);
    color: var(--bg-dark);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--theme-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--theme-primary-glow);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-icon-btn {
    background: var(--theme-primary-glow);
    border: none;
    border-radius: 20px;  /* 改为圆角矩形 */
    padding: 6px 14px;     /* 增加左右内边距 */
    font-size: 13px;       /* 明确字体大小 */
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
    width: auto;           /* 取消固定宽度 */
    height: auto;         /* 取消固定高度 */
}

.header-icon-btn:hover {
    background: var(--theme-primary);
    transform: translateY(-1px);
    color: var(--bg-dark);
}

.header-icon-btn:hover {
    background: var(--theme-primary);
    transform: scale(1.05);
    color: var(--bg-dark);
}

/* ========== 通用按钮样式 ========== */
.btn {
    padding: 9px;
    background: linear-gradient(95deg, var(--theme-primary), var(--theme-primary-dark));
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: 0.2s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-secondary {
    background: linear-gradient(95deg, var(--theme-orange), #ea580c);
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
    display: inline-block;
    width: auto;
    margin: 4px;
    border-radius: 24px;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: 0.2s;
}

.btn-small:hover {
    filter: brightness(1.2);
    border-color: var(--theme-primary);
}

.btn-small.active {
    background: var(--theme-primary);
    color: var(--bg-dark);
    border-color: var(--theme-primary);
}

/* ========== 通用面板样式 ========== */
.panel-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 14px;
    border: 1px solid var(--border-light);
    transition: 0.2s;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-primary);
    margin-bottom: 12px;
    border-left: 3px solid var(--theme-primary);
    padding-left: 8px;
}

/* ========== 通用滑块样式 ========== */
.slider-container {
    margin-bottom: 12px;
}

.slider-label {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.slider {
    width: 100%;
    cursor: pointer;
    background: var(--bg-dark);
    height: 4px;
    border-radius: 4px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--theme-primary);
    cursor: pointer;
}

/* ========== 提示框 ========== */
.hint-box {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 12px;
    margin-top: 12px;
    font-size: 11px;
    border-left: 3px solid var(--warning);
    color: var(--text-secondary);
}

/* ========== 状态点 ========== */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

/* ========== 禁用区域 ========== */
.section-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed var(--theme-primary);
    border-radius: 24px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 8px;
    background: var(--bg-card);
    transition: 0.2s;
}

.upload-area:hover {
    background: var(--theme-primary-glow);
}

/* ========== 模型时间轴按钮修复（覆盖全局 .btn 样式） ========== */
.model-timeline-buttons .btn {
    width: auto !important;
    margin-bottom: 0 !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

.model-timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.model-timeline-name {
    font-size: 10px;
    font-weight: bold;
    width: 65px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-timeline-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.model-timeline-track {
    flex: 1;
    height: 16px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}