/* ===== SVG 图标工具类 ===== */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* ===== CSS 变量 ===== */
:root {
    --bg-color: #f0f8ff;
    --text-color: #1e1e2f;
    --panel-color: #ffffff;
    --primary-color: #4a90e2;
    --primary-light: #e1f0ff;
    --primary-dark: #3a78c2;
    --secondary-color: #e8edf5;
    --progress-bar: #4a90e2;
    --border-color: #d3dde8;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #2ecc71;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Segoe UI', 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    --glow-color: rgba(74, 144, 226, 0.20);
    --glow-ring: rgba(74, 144, 226, 0.10);
    --timer-text: #1e1e2f;
    --timer-running: #1e1e2f;
    --history-bg: #f7faff;
    --today-badge-bg: rgba(74, 144, 226, 0.12);
    --today-badge-color: #4a90e2;
    --empty-icon-opacity: 0.35;
    --scrollbar-width: 10px;
    --scrollbar-thumb: var(--border-color);
    /* 渐变背景颜色（与 MyBlog 兼容） */
    --grad-base: #e8edf6;
    --grad-blue: #dbeafe;
    --grad-pink: #fce4ec;
    --grad-mid: #f0f4fa;
}

/* 深色模式变量覆盖 */
.dark-mode {
    --bg-color: #12121a;
    --text-color: #e8e8f0;
    --panel-color: #1c1c26;
    --primary-color: #5b9cf5;
    --primary-light: #2a2a3a;
    --primary-dark: #4a8ae0;
    --secondary-color: #262632;
    --border-color: #333345;
    --danger-color: #ff5e7a;
    --warning-color: #ffb74d;
    --success-color: #4caf84;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --glow-color: rgba(91, 156, 245, 0.25);
    --glow-ring: rgba(91, 156, 245, 0.15);
    --timer-text: #e8e8f0;
    --timer-running: #ffffff;
    --history-bg: #1a1a26;
    --today-badge-bg: rgba(91, 156, 245, 0.18);
    --today-badge-color: #5b9cf5;
    --empty-icon-opacity: 0.5;
    --scrollbar-thumb: #444466;
    --grad-base: #1a1a2a;
    --grad-blue: #1a2a3a;
    --grad-pink: #2a1a22;
    --grad-mid: #1e1e2e;
}

/* ===== 动画渐变背景（与 MyBlog 一致） ===== */
body.bg-flow {
    background: linear-gradient(
        135deg,
        var(--grad-base) 0%,
        var(--grad-pink) 15%,
        var(--grad-blue) 30%,
        var(--grad-mid) 50%,
        var(--grad-base) 65%,
        var(--grad-pink) 80%,
        var(--grad-blue) 100%
    );
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    transition: background 1s ease, color var(--transition);
}
@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 100% 0%; }
    50%  { background-position: 100% 100%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}
/* 自定义背景图片层 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -2;
    pointer-events: none;
    transition: opacity var(--transition);
}
/* 渐变装饰层 */
body::after {
    content: '';
    position: fixed;
    top: -30%; left: -20%;
    width: 80%; height: 80%;
    background: radial-gradient(ellipse, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    transition: opacity var(--transition);
}

/* ===== 重置与基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
    padding: 12px;
    overflow-x: hidden;
}

/* ===== 容器 ===== */
.app-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: calc(100vh - 24px);
}

/* ===== 页脚 ===== */
.app-footer {
    text-align: center;
    padding: 12px 18px;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.55;
    background: var(--panel-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: background var(--transition), border var(--transition), color var(--transition);
    flex-shrink: 0;
    line-height: 1.7;
    user-select: none;
}

/* ===== 头部栏 ===== */
.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 18px;
    background: var(--panel-color);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: background var(--transition), border var(--transition);
    flex-shrink: 0;
}
.app-brand { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; color: var(--primary-color); user-select: none; white-space: nowrap; }
.app-brand svg { width: 24px; height: 24px; flex-shrink: 0; }
.app-brand small { font-weight: 400; font-size: 0.7rem; color: var(--text-color); opacity: 0.5; margin-left: 2px; }
.header-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1 1 auto; min-width: 0; }
/* 日期标签栏 — 可横向滚动 */
.date-tabs {
    display: flex; overflow-x: auto; gap: 5px; padding: 3px 2px; flex-wrap: nowrap;
    flex: 0 1 auto; max-width: 420px;
    scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent;
}
.date-tabs::-webkit-scrollbar { height: var(--scrollbar-width); }
.date-tabs::-webkit-scrollbar-track { background: transparent; border-radius: 8px; }
.date-tabs::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; min-height: 30px; min-width: 30px; }
.date-tabs::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }
.date-tab {
    padding: 6px 16px; border-radius: 20px; background: var(--secondary-color); cursor: pointer;
    white-space: nowrap; font-size: 0.82rem; font-weight: 500; transition: all var(--transition);
    border: 1px solid transparent; color: var(--text-color); flex-shrink: 0; user-select: none;
}
.date-tab:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.date-tab.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); font-weight: 600; box-shadow: 0 2px 10px rgba(74, 144, 226, 0.25); }
.header-actions { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; flex-shrink: 0; }
.header-btn {
    padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-color);
    background: transparent; color: var(--text-color); cursor: pointer;
    font-size: 0.75rem; font-weight: 500; transition: all var(--transition);
    display: flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0;
}
.header-btn:hover { background: var(--secondary-color); border-color: var(--primary-color); color: var(--primary-color); }
.header-btn.primary-btn { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.header-btn.primary-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.header-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mode-toggle-btn { min-width: 64px; justify-content: center; }
.help-btn { font-size: 1.1rem; padding: 5px 10px; min-width: 36px; justify-content: center; }

/* ===== 主网格 ===== */
.main-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 14px; flex: 1; min-height: 0; }

/* ===== 面板基础 ===== */
.panel {
    background: var(--panel-color); border-radius: var(--radius); box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color); padding: 18px 20px 20px;
    transition: background var(--transition), border var(--transition), box-shadow var(--transition);
    display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.panel-title {
    font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 6px;
    margin-bottom: 12px; color: var(--text-color); user-select: none; flex-shrink: 0;
}
.panel-title svg { width: 18px; height: 18px; color: var(--primary-color); flex-shrink: 0; }

/* ===== 左侧：任务面板 ===== */
.task-panel { gap: 0; }
.task-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
    flex-shrink: 0; flex-wrap: wrap; gap: 4px 8px;
}
.task-header-row .panel-title { margin-bottom: 0; }
.add-task-btn {
    background: var(--primary-color); color: #fff; border: none; border-radius: 50%;
    width: 34px; height: 34px; font-size: 1.3rem; cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1;
}
.add-task-btn:hover { transform: scale(1.06); background: var(--primary-dark); box-shadow: 0 2px 12px rgba(74, 144, 226, 0.30); }
/* 进度条容器 */
.progress-wrap { width: 100%; background: var(--secondary-color); border-radius: 8px; height: 6px; margin-bottom: 12px; overflow: hidden; transition: background var(--transition); flex-shrink: 0; }
.progress-bar { height: 100%; border-radius: 8px; background: var(--progress-bar); width: 0%; transition: width 0.4s ease; }
/* 任务列表 — 可滚动 */
.task-list {
    flex: 1; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 5px;
    min-height: 120px; max-height: 400px;
    scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent;
}
.task-list::-webkit-scrollbar { width: var(--scrollbar-width); }
.task-list::-webkit-scrollbar-track { background: transparent; border-radius: 8px; }
.task-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; min-height: 30px; }
.task-list::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }
/* 拖拽手柄 */
.task-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--text-color);
    opacity: 0.25;
    transition: opacity var(--transition);
    flex-shrink: 0;
    padding: 2px;
    border-radius: 4px;
    touch-action: none;
}
.task-drag-handle:hover { opacity: 0.7; }
.task-drag-handle:active { cursor: grabbing; }
.task-item.task-dragging {
    opacity: 0.4;
    border-style: dashed;
}
.task-item.task-drag-over {
    border-color: var(--primary-color) !important;
    background: var(--primary-light) !important;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}
.task-item {
    display: flex; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--secondary-color); transition: all var(--transition); cursor: pointer;
    gap: 8px; border: 1px solid transparent; position: relative; flex-wrap: wrap;
}
.task-item:hover { transform: translateX(3px); border-color: var(--border-color); background: var(--primary-light); }
.task-item.task-completed { opacity: 0.65; }
.task-item.task-completed .task-name { text-decoration: line-through; }
.task-checkbox { width: 17px; height: 17px; accent-color: var(--primary-color); cursor: pointer; flex-shrink: 0; }
/* 任务类型标签 */
.task-type-badge {
    font-size: 0.62rem; font-weight: 600; padding: 2px 8px; border-radius: 12px;
    background: var(--primary-color); color: #fff; flex-shrink: 0; letter-spacing: 0.02em;
}
.task-type-badge.lt-badge { background: var(--warning-color); }
.task-type-badge.half-badge { background: var(--success-color); }
.task-name { flex: 1; font-size: 0.88rem; font-weight: 500; word-break: break-word; min-width: 40px; }
.task-time { font-size: 0.74rem; font-weight: 500; color: var(--text-color); opacity: 0.6; flex-shrink: 0; font-family: var(--font-mono); }
.task-actions { display: flex; gap: 2px; flex-shrink: 0; }
.task-actions button { background: none; border: none; cursor: pointer; font-size: 0.8rem; padding: 2px 5px; border-radius: 4px; transition: all var(--transition); line-height: 1.4; }
.task-actions .edit-btn { color: var(--warning-color); }
.task-actions .edit-btn:hover { background: rgba(243, 156, 18, 0.15); }
.task-actions .delete-btn { color: var(--danger-color); }
.task-actions .delete-btn:hover { background: rgba(231, 76, 60, 0.15); }
.task-empty { text-align: center; padding: 24px 12px; color: var(--text-color); opacity: 0.5; font-size: 0.85rem; user-select: none; line-height: 1.6; }

/* ===== 右侧：计时器面板 ===== */
.timer-panel { gap: 0; position: relative; }
.timer-display-wrapper {
    position: relative; display: flex; justify-content: center; align-items: center;
    padding: 16px 0 12px; min-height: 140px; flex-shrink: 0;
}
/* 计时器发光环 */
.timer-glow-ring {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(clamp(150px, 24vw, 220px), 100%);
    height: min(clamp(150px, 24vw, 220px), 100%);
    max-width: 240px; max-height: 240px;
    aspect-ratio: 1 / 1; border-radius: 50%; pointer-events: none;
    border: 2px solid var(--glow-ring); transition: all var(--transition); z-index: 0;
    background: radial-gradient(circle, rgba(74,144,226,0.04) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.06), inset 0 0 30px rgba(74, 144, 226, 0.03);
}
.timer-glow-ring.active {
    border-color: var(--glow-ring);
    box-shadow: 0 0 50px var(--glow-color), 0 0 90px var(--glow-color),
        inset 0 0 50px var(--glow-color), inset 0 0 90px var(--glow-color);
    animation: glowPulse 2.6s ease-in-out infinite;
}
/* 发光环脉冲动画 */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 40px var(--glow-color), 0 0 70px var(--glow-color), inset 0 0 40px var(--glow-color), inset 0 0 70px var(--glow-color); }
    50% { box-shadow: 0 0 70px var(--glow-color), 0 0 120px var(--glow-color), inset 0 0 70px var(--glow-color), inset 0 0 120px var(--glow-color); }
}
.timer-display {
    font-family: var(--font-mono); font-size: clamp(2.6rem, 9vw, 4.2rem); font-weight: 700;
    letter-spacing: 0.04em; color: var(--timer-text); line-height: 1.2; user-select: none;
    transition: color var(--transition), text-shadow var(--transition);
    position: relative; z-index: 1; text-shadow: 0 0 0 transparent;
}
.timer-display.running { color: var(--timer-running); text-shadow: 0 0 40px var(--glow-color), 0 0 80px rgba(74, 144, 226, 0.12); }
.timer-display.paused { color: var(--text-color); opacity: 0.7; }
.timer-stats { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 10px; flex-wrap: wrap; flex-shrink: 0; }
.timer-stat-item {
    display: flex; align-items: center; gap: 5px; font-size: 0.78rem;
    background: var(--secondary-color); padding: 4px 14px 4px 10px; border-radius: 24px;
    border: 1px solid var(--border-color); transition: background var(--transition), border var(--transition);
}
.timer-stat-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-color); flex-shrink: 0; transition: background var(--transition); }
.timer-stat-item .dot.active { background: var(--primary-color); box-shadow: 0 0 12px rgba(74, 144, 226, 0.6); animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPulse { 0%,100%{ box-shadow:0 0 6px rgba(74,144,226,0.4); } 50%{ box-shadow:0 0 18px rgba(74,144,226,0.9); } }
.timer-stat-item .label { color: var(--text-color); opacity: 0.6; font-weight: 400; }
.timer-stat-item .value { font-weight: 700; font-family: var(--font-mono); font-size: 0.85rem; }
.timer-stat-item .value.highlight { color: var(--primary-color); }
.timer-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; flex-shrink: 0; }
.timer-btn {
    font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600;
    padding: 8px 20px; border-radius: 28px; border: none; cursor: pointer;
    transition: all var(--transition); display: flex; align-items: center; gap: 6px;
    user-select: none; outline: none; white-space: nowrap;
}
.timer-btn:active { transform: scale(0.95); }
.timer-btn-primary {
    background: var(--primary-color); color: #fff; box-shadow: 0 4px 16px rgba(74, 144, 226, 0.30);
    min-width: 110px; justify-content: center;
}
.timer-btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 24px rgba(74, 144, 226, 0.35); transform: translateY(-1px); }
.timer-btn-primary.pause { background: #e8a840; box-shadow: 0 4px 16px rgba(232, 168, 64, 0.30); }
.timer-btn-primary.pause:hover { background: #d49530; box-shadow: 0 6px 24px rgba(232, 168, 64, 0.35); }
.timer-btn-primary.end { background: var(--danger-color); box-shadow: 0 4px 16px rgba(231, 76, 60, 0.30); }
.timer-btn-primary.end:hover { background: #c0392b; box-shadow: 0 6px 24px rgba(231, 76, 60, 0.35); }
.timer-btn-secondary { background: transparent; color: var(--text-color); border: 1.5px solid var(--border-color); min-width: 70px; justify-content: center; }
.timer-btn-secondary:hover { background: var(--secondary-color); border-color: var(--primary-color); color: var(--primary-color); }
.timer-btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
/* 任务选择弹窗分区标题 */
.task-select-section-header {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 8px 10px 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    user-select: none;
}
.task-select-section-header:first-child {
    padding-top: 0;
}
/* 半完成状态任务条目 */
.task-item-half {
    border-left: 3px solid var(--success-color) !important;
}
.task-item-half .task-time {
    font-weight: 700;
}

/* 暂时结束按钮 */
.timer-btn-temp {
    background: transparent;
    color: var(--warning-color);
    border: 1.5px solid var(--warning-color);
    min-width: 70px;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 28px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    outline: none;
    white-space: nowrap;
}
.timer-btn-temp:hover {
    background: rgba(243, 156, 18, 0.1);
    box-shadow: 0 2px 12px rgba(243, 156, 18, 0.2);
    transform: translateY(-1px);
}
.timer-btn-temp:active { transform: scale(0.95); }
.timer-btn-temp svg { width: 15px; height: 15px; flex-shrink: 0; }

/* 全屏暂时结束按钮 */
.timer-fs-temp {
    background: transparent;
    color: var(--warning-color);
    border: 1.5px solid var(--warning-color);
}
.timer-fs-temp:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--warning-color);
}

/* 计时器模式选择器 */
.timer-mode-selector {
    display: flex; gap: 4px; justify-content: center; margin-bottom: 8px;
    background: var(--secondary-color); padding: 3px; border-radius: 24px;
    flex-shrink: 0; transition: background var(--transition);
    position: relative; /* 为滑动指示器提供定位基准 */
}
/* 滑动指示器 - 丝滑过渡动画 */
.timer-mode-slider {
    position: absolute; top: 3px; left: 3px;
    height: calc(100% - 6px); border-radius: 20px;
    background: var(--panel-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background var(--transition),
                box-shadow var(--transition);
    pointer-events: none; /* 不阻挡按钮点击 */
    z-index: 0;
}
.dark-mode .timer-mode-slider {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.timer-mode-btn {
    padding: 5px 18px; border-radius: 20px; border: none;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    background: transparent; color: var(--text-color); opacity: 0.55;
    transition: color 0.3s ease, opacity 0.3s ease, font-weight 0.3s ease;
    font-family: var(--font-sans);
    white-space: nowrap; user-select: none;
    position: relative; z-index: 1; /* 在滑块上方可点击 */
}
.timer-mode-btn:hover { opacity: 0.8; }
.timer-mode-btn.active {
    background: transparent; /* 背景由滑动滑块提供 */
    color: var(--primary-color);
    opacity: 1;
    box-shadow: none; /* 阴影由滑动滑块提供 */
    font-weight: 700;
}
.dark-mode .timer-mode-btn.active {
    box-shadow: none;
}

.timer-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ===== 历史记录 ===== */
.timer-history { border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 2px; flex-shrink: 0; }
.timer-history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 0.75rem; color: var(--text-color); opacity: 0.6; user-select: none; }
.timer-history-header span:first-child { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.timer-history-header span:first-child svg { width: 13px; height: 13px; }
.history-list-compact {
    display: flex; flex-wrap: wrap; gap: 4px 6px; max-height: 60px; overflow-y: auto;
    padding-right: 2px; scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent;
}
.history-list-compact::-webkit-scrollbar { width: 6px; }
.history-list-compact::-webkit-scrollbar-track { background: transparent; }
.history-list-compact::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; min-height: 20px; }
.history-chip {
    font-size: 0.68rem; padding: 2px 8px; border-radius: 14px; background: var(--secondary-color);
    border: 1px solid var(--border-color); display: inline-flex; align-items: center; gap: 3px;
    white-space: nowrap; transition: all var(--transition); color: var(--text-color);
}
.history-chip.today-chip { border-color: var(--primary-color); background: var(--primary-light); color: var(--primary-color); font-weight: 500; }
.history-chip .chip-date { opacity: 0.6; font-weight: 400; }
.history-chip .chip-dur { font-weight: 600; font-family: var(--font-mono); }
.history-empty-chip { font-size: 0.72rem; opacity: 0.4; padding: 4px 0; }
.show-all-chip:hover { background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important; }
.timer-total-row { display: flex; justify-content: space-between; font-size: 0.75rem; padding-top: 5px; border-top: 1px solid var(--border-color); margin-top: 5px; color: var(--text-color); opacity: 0.6; }
.timer-total-row .total-val { font-weight: 700; font-family: var(--font-mono); opacity: 1; color: var(--text-color); }

/* ===== 任务详情区域 ===== */
.task-detail-area { border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 8px; flex-shrink: 0; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.task-detail-area .quote-text { font-style: italic; font-size: 0.9rem; color: var(--text-color); opacity: 0.8; text-align: center; line-height: 1.5; padding: 2px 0; }
.task-detail-area .quote-author { text-align: center; font-size: 0.74rem; color: var(--text-color); opacity: 0.4; margin-top: 2px; }
.task-detail-area .detail-task-info { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--secondary-color); border-left: 3px solid var(--primary-color); }
.task-detail-area .detail-task-info .dt-name { font-weight: 600; font-size: 0.9rem; }
.task-detail-area .detail-task-info .dt-detail { font-size: 0.88rem; opacity: 0.8; margin: 6px 0 4px; line-height: 1.6; padding: 6px 10px; background: var(--bg-color); border-radius: 6px; border-left: 2px solid var(--primary-color); }
.task-detail-area .detail-task-info .dt-meta { font-size: 0.76rem; opacity: 0.6; display: flex; gap: 12px; flex-wrap: wrap; }
.task-detail-area .detail-empty { text-align: center; font-size: 0.8rem; opacity: 0.4; user-select: none; }
.task-detail-area .detail-empty svg { width: 24px; height: 24px; opacity: 0.3; display: block; margin: 0 auto 4px; }

/* ===== 手机版详情 ===== */
.task-detail-area-mobile { display: none; border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 8px; flex-shrink: 0; min-height: 60px; }
.task-detail-area-mobile .quote-text { font-style: italic; font-size: 0.85rem; color: var(--text-color); opacity: 0.8; text-align: center; line-height: 1.5; padding: 2px 0; }
.task-detail-area-mobile .quote-author { text-align: center; font-size: 0.7rem; color: var(--text-color); opacity: 0.4; margin-top: 2px; }
.task-detail-area-mobile .detail-task-info { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--secondary-color); border-left: 3px solid var(--primary-color); }
.task-detail-area-mobile .detail-task-info .dt-name { font-weight: 600; font-size: 0.88rem; }
.task-detail-area-mobile .detail-task-info .dt-detail { font-size: 0.84rem; opacity: 0.8; margin: 4px 0 3px; line-height: 1.5; padding: 4px 8px; background: var(--bg-color); border-radius: 6px; border-left: 2px solid var(--primary-color); }
.task-detail-area-mobile .detail-task-info .dt-meta { font-size: 0.74rem; opacity: 0.6; display: flex; gap: 10px; flex-wrap: wrap; }
.task-detail-area-mobile .detail-empty { text-align: center; font-size: 0.78rem; opacity: 0.4; user-select: none; }
.task-detail-area-mobile .detail-empty svg { width: 22px; height: 22px; opacity: 0.3; display: block; margin: 0 auto 4px; }

/* ===== 模态框 ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); backdrop-filter: blur(3px); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--panel-color); border-radius: var(--radius); padding: 24px 26px 28px; max-width: 420px; width: 100%; box-shadow: 0 12px 48px rgba(0,0,0,0.25); border: 1px solid var(--border-color); transition: background var(--transition), border var(--transition); max-height: 90vh; overflow-y: auto; }
.modal-box .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-box .modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-box .modal-header .close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color); opacity: 0.4; transition: opacity var(--transition); line-height: 1; }
.modal-box .modal-header .close-modal:hover { opacity: 0.8; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; color: var(--text-color); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-size: 0.88rem; transition: border var(--transition), background var(--transition); font-family: var(--font-sans); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15); }
.modal-btn { padding: 9px 18px; border-radius: var(--radius-sm); border: none; font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: all var(--transition); width: 100%; }
.modal-btn-primary { background: var(--primary-color); color: #fff; }
.modal-btn-primary:hover { background: var(--primary-dark); }
.modal-btn-danger { background: var(--danger-color); color: #fff; }
.modal-btn-danger:hover { opacity: 0.85; }
.modal-btn-secondary { background: var(--secondary-color); color: var(--text-color); }
.modal-btn-secondary:hover { background: var(--border-color); }
.modal-actions { display: flex; gap: 8px; margin-top: 4px; }
.modal-actions .modal-btn { flex: 1; }
.form-checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-checkbox-group input[type="checkbox"] { width: auto; accent-color: var(--primary-color); cursor: pointer; flex-shrink: 0; }
.form-checkbox-group label { margin-bottom: 0; cursor: pointer; }

/* ===== 滑动指示器 (手机) ===== */
.swipe-indicator { display: none; justify-content: center; gap: 8px; padding: 6px 0 2px; flex-shrink: 0; }
.swipe-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-color); transition: all var(--transition); cursor: pointer; }
.swipe-dot.active { background: var(--primary-color); width: 22px; border-radius: 4px; }

/* ============================================================
           响应式布局
   ============================================================ */
@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .timer-glow-ring { width: min(clamp(130px, 20vw, 180px), 100%); height: min(clamp(130px, 20vw, 180px), 100%); max-width: 200px; max-height: 200px; }
    .timer-display { font-size: clamp(2.2rem, 8vw, 3.6rem); }
}
@media (max-width: 820px) {
    body { padding: 8px; }
    .app-container { gap: 10px; min-height: calc(100vh - 16px); }
    .app-header { padding: 8px 14px; gap: 6px 10px; flex-wrap: wrap; }
    .app-brand { font-size: 1rem; }
    .app-brand svg { width: 20px; height: 20px; }
    .app-brand small { font-size: 0.65rem; }
    .header-btn { font-size: 0.7rem; padding: 4px 10px; }
    .date-tab { font-size: 0.72rem; padding: 4px 12px; }
    .header-actions .header-btn svg { width: 12px; height: 12px; }
    /* 主网格改为横向滑动 — 左右面板滑动切换 */
    .main-grid {
        display: flex; overflow-x: auto; overflow-y: hidden;
        scroll-snap-type: x mandatory; scroll-behavior: smooth;
        gap: 0; border-radius: var(--radius); flex: 1; min-height: 70vh;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .main-grid::-webkit-scrollbar { display: none; }
    .main-grid>.panel {
        flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; margin: 0;
        min-height: 70vh; border: none; box-shadow: none; padding: 14px 16px 16px;
        overflow-y: auto;
    }
    .main-grid>.panel:first-child { border-radius: var(--radius) 0 0 var(--radius); }
    .main-grid>.panel:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
    .swipe-indicator { display: flex; }
    .task-detail-area-mobile { display: flex; flex-direction: column; justify-content: center; }
    .task-detail-area { display: none; }
    .timer-display { font-size: clamp(3.2rem, 14vw, 5rem); }
    .timer-glow-ring { width: min(clamp(170px, 32vw, 250px), 100%); height: min(clamp(170px, 32vw, 250px), 100%); max-width: 290px; max-height: 290px; }
    .timer-display-wrapper { padding: 12px 0 8px; min-height: 120px; }
    .timer-btn { font-size: 0.78rem; padding: 8px 16px; min-width: 80px; }
    .timer-btn-primary { min-width: 100px; }
    .timer-stats { gap: 8px; }
    .timer-stat-item { font-size: 0.72rem; padding: 3px 10px 3px 8px; }
    .panel { padding: 12px 14px 14px; }
    .task-list { max-height: 320px; min-height: 100px; }
    .task-item { padding: 6px 10px; gap: 6px; }
    .task-name { font-size: 0.82rem; }
    .task-type-badge { font-size: 0.58rem; padding: 1px 6px; }
    .task-time { font-size: 0.7rem; }
    .date-tabs { max-width: 100%; flex: 1 1 auto; scrollbar-width: thin; }
    .date-tabs::-webkit-scrollbar { height: 8px; }
    .date-tabs::-webkit-scrollbar-thumb { min-height: 20px; min-width: 20px; }
    .header-controls { flex: 1 1 100%; justify-content: flex-start; }
    .header-actions { flex: 1 1 auto; justify-content: flex-end; }
}
@media (max-width: 820px) and (orientation: landscape) {
    .main-grid { min-height: 60vh; }
    .main-grid>.panel { min-height: 60vh; padding: 10px 14px 12px; }
    .timer-display { font-size: clamp(2.6rem, 10vw, 4rem); }
    .timer-glow-ring { width: min(clamp(140px, 22vw, 200px), 100%); height: min(clamp(140px, 22vw, 200px), 100%); max-width: 220px; max-height: 220px; }
    .timer-display-wrapper { padding: 8px 0 4px; min-height: 90px; }
    .task-list { max-height: 200px; min-height: 80px; }
    .timer-controls { margin-bottom: 6px; }
    .timer-history { padding-top: 6px; }
    .history-list-compact { max-height: 40px; }
    .task-detail-area-mobile { min-height: 44px; padding-top: 6px; margin-top: 4px; }
    .task-detail-area-mobile .detail-task-info { padding: 4px 10px; }
    .task-detail-area-mobile .detail-task-info .dt-name { font-size: 0.8rem; }
    .task-detail-area-mobile .detail-task-info .dt-meta { font-size: 0.7rem; gap: 8px; }
    .task-detail-area-mobile .quote-text { font-size: 0.78rem; }
    .app-header { padding: 6px 12px; }
    .app-brand { font-size: 0.9rem; }
    .date-tab { font-size: 0.68rem; padding: 3px 10px; }
    .header-btn { font-size: 0.65rem; padding: 3px 8px; }
    .swipe-indicator { padding: 3px 0 0; }
    .swipe-dot { width: 6px; height: 6px; }
    .swipe-dot.active { width: 16px; }
}
@media (max-width: 480px) {
    .app-brand { font-size: 0.9rem; }
    .app-brand svg { width: 18px; height: 18px; }
    .app-brand small { font-size: 0.6rem; }
    .header-btn { font-size: 0.65rem; padding: 3px 8px; }
    .date-tab { font-size: 0.65rem; padding: 3px 10px; }
    .timer-display { font-size: clamp(2.8rem, 13vw, 4.2rem); }
    .timer-glow-ring { width: min(clamp(150px, 30vw, 210px), 100%); height: min(clamp(150px, 30vw, 210px), 100%); max-width: 230px; max-height: 230px; }
    .timer-btn { font-size: 0.72rem; padding: 6px 14px; min-width: 70px; }
    .timer-btn-primary { min-width: 90px; }
    .timer-stat-item { font-size: 0.68rem; padding: 2px 8px 2px 6px; }
    .panel { padding: 10px 12px 12px; }
    .task-item { padding: 5px 8px; gap: 4px; }
    .task-name { font-size: 0.78rem; flex-basis: 100%; order: 3; }
    .task-type-badge { font-size: 0.55rem; padding: 1px 6px; }
    .task-time { font-size: 0.66rem; }
    .task-actions { margin-left: auto; }
    .task-list { max-height: 240px; min-height: 80px; }
    .modal-box { padding: 18px 16px 20px; }
    .swipe-indicator { gap: 6px; }
    .swipe-dot { width: 6px; height: 6px; }
    .swipe-dot.active { width: 18px; }
    .date-tabs::-webkit-scrollbar { height: 6px; }
    .date-tabs::-webkit-scrollbar-thumb { min-height: 16px; min-width: 16px; }
    .history-list-compact { max-height: 44px; }
    .history-chip { font-size: 0.62rem; padding: 1px 6px; }
    .timer-history-header { font-size: 0.68rem; }
    .timer-total-row { font-size: 0.68rem; }
    .task-detail-area-mobile .detail-task-info .dt-name { font-size: 0.8rem; }
    .task-detail-area-mobile .detail-task-info .dt-meta { font-size: 0.68rem; gap: 6px; }
    .task-detail-area-mobile .quote-text { font-size: 0.78rem; }
    .task-detail-area-mobile { min-height: 48px; padding-top: 6px; margin-top: 4px; }
    .task-detail-area-mobile .detail-empty svg { width: 18px; height: 18px; }
    .task-detail-area-mobile .detail-empty { font-size: 0.7rem; }
}
@media (max-width: 400px) and (orientation: landscape) {
    .timer-display { font-size: clamp(2rem, 8vw, 3rem); }
    .timer-glow-ring { width: min(clamp(110px, 18vw, 160px), 100%); height: min(clamp(110px, 18vw, 160px), 100%); max-width: 170px; max-height: 170px; }
    .timer-display-wrapper { padding: 4px 0 2px; min-height: 70px; }
    .task-list { max-height: 120px; min-height: 60px; }
    .task-item { padding: 4px 6px; }
    .task-name { font-size: 0.72rem; }
    .timer-controls { gap: 4px; }
    .timer-btn { font-size: 0.65rem; padding: 4px 10px; min-width: 56px; }
    .timer-btn-primary { min-width: 72px; }
    .timer-stats { gap: 4px; margin: 2px 0 4px; }
    .timer-stat-item { font-size: 0.6rem; padding: 2px 6px 2px 4px; }
    .history-list-compact { max-height: 30px; }
    .history-chip { font-size: 0.55rem; padding: 1px 4px; }
    .task-detail-area-mobile { min-height: 36px; padding-top: 4px; margin-top: 2px; }
    .task-detail-area-mobile .detail-task-info { padding: 3px 8px; }
    .task-detail-area-mobile .detail-task-info .dt-name { font-size: 0.72rem; }
    .task-detail-area-mobile .detail-task-info .dt-meta { font-size: 0.6rem; gap: 4px; }
    .task-detail-area-mobile .quote-text { font-size: 0.68rem; }
    .swipe-indicator { padding: 2px 0 0; }
    .swipe-dot { width: 5px; height: 5px; }
    .swipe-dot.active { width: 12px; }
}

/* ============================================================
           新人引导（Tour）样式
   ============================================================ */
.tour-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999; display: none; align-items: center; justify-content: center;
    padding: 20px; transition: opacity 0.3s ease;
}
.tour-overlay.active { display: flex; }
.tour-card {
    background: var(--panel-color); color: var(--text-color);
    max-width: 480px; width: 100%; border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4); padding: 28px 30px 24px;
    position: relative; z-index: 10000;
    border: 1px solid var(--border-color);
    transition: background var(--transition), border var(--transition);
}
.tour-card .tour-step-indicator {
    font-size: 0.8rem; font-weight: 600; color: var(--primary-color);
    margin-bottom: 8px; opacity: 0.7;
}
.tour-card .tour-title {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 8px;
}
.tour-card .tour-desc {
    font-size: 0.95rem; line-height: 1.6; opacity: 0.85; margin-bottom: 20px;
}
.tour-card .tour-actions {
    display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
.tour-card .tour-actions .tour-btn {
    padding: 8px 20px; border-radius: 24px; border: none;
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all var(--transition);
}
.tour-card .tour-actions .tour-btn-primary {
    background: var(--primary-color); color: #fff;
}
.tour-card .tour-actions .tour-btn-primary:hover {
    background: var(--primary-dark); transform: scale(1.02);
}
.tour-card .tour-actions .tour-btn-secondary {
    background: transparent; color: var(--text-color); border: 1px solid var(--border-color);
}
.tour-card .tour-actions .tour-btn-secondary:hover {
    background: var(--secondary-color);
}
.tour-card .tour-actions .tour-btn-skip {
    background: transparent; color: var(--text-color); opacity: 0.5;
}
.tour-card .tour-actions .tour-btn-skip:hover { opacity: 0.8; }

/* 引导高亮圈 */
.tour-highlight {
    position: relative;
    z-index: 9998 !important;
    outline: 4px solid var(--primary-color);
    outline-offset: 4px;
    box-shadow: 0 0 0 1000px rgba(0,0,0,0.4);
    border-radius: var(--radius-sm);
    transition: outline 0.2s;
}
.tour-highlight.panel {
    outline-offset: 2px;
}
@media (max-width: 480px) {
    .tour-card { padding: 20px 18px; }
    .tour-card .tour-title { font-size: 1rem; }
    .tour-card .tour-desc { font-size: 0.85rem; }
    .tour-card .tour-actions .tour-btn { font-size: 0.8rem; padding: 6px 14px; }
}

/* ============================================================
           登录覆盖层
   ============================================================ */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    z-index: 10000; display: none;
    align-items: center; justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}
.login-overlay.active { display: flex; }
.login-overlay .login-box {
    background: var(--panel-color);
    max-width: 380px; width: 100%;
    border-radius: var(--radius);
    padding: 36px 32px 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: background var(--transition), border var(--transition);
}
.login-overlay .login-icon svg {
    width: 48px; height: 48px;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.login-overlay h2 {
    font-size: 1.5rem; font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.login-overlay .login-subtitle {
    font-size: 0.82rem; color: var(--text-color); opacity: 0.5;
    margin-bottom: 24px;
}
.login-overlay .login-form { display: flex; flex-direction: column; gap: 12px; }
.login-overlay .login-form input {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: border var(--transition), background var(--transition);
    outline: none;
    width: 100%;
}
.login-overlay .login-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}
.login-overlay .login-submit {
    padding: 11px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    margin-top: 4px;
}
.login-overlay .login-submit:hover { background: var(--primary-dark); }
.login-overlay .login-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.login-overlay .login-msg {
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: none;
}
.login-overlay .login-msg.error { display: block; background: var(--danger-color); color: #fff; }
.login-overlay .login-msg.success { display: block; background: var(--success-color); color: #fff; }
.login-overlay .login-msg.info { display: block; background: var(--primary-light); color: var(--primary-color); }
.login-overlay .login-register-link {
    font-size: 0.8rem; color: var(--text-color); opacity: 0.6;
    margin-top: 8px;
}
.login-overlay .login-register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.login-overlay .login-register-link a:hover { text-decoration: underline; }

/* ============================================================
           排行榜
   ============================================================ */
.leaderboard-controls {
    display: flex; gap: 8px; margin-bottom: 14px;
}
.lb-btn {
    padding: 6px 16px; border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
}
.lb-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.lb-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.leaderboard-item {
    display: flex; align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--secondary-color);
    gap: 12px;
    transition: background var(--transition);
}
.leaderboard-item.is-me { background: var(--primary-light); border: 1px solid var(--primary-color); }
.leaderboard-rank {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
    background: var(--border-color);
    color: var(--text-color);
    flex-shrink: 0;
}
.leaderboard-rank.top1 { background: #ffd700; color: #1a1a2e; }
.leaderboard-rank.top2 { background: #c0c0c0; color: #1a1a2e; }
.leaderboard-rank.top3 { background: #cd7f32; color: #fff; }
.leaderboard-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    color: var(--text-color);
    overflow: hidden; flex-shrink: 0;
}
.leaderboard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-name { flex: 1; font-size: 0.85rem; font-weight: 500; }
.leaderboard-time {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
}
.leaderboard-empty {
    text-align: center; padding: 30px 12px;
    color: var(--text-color); opacity: 0.5;
    font-size: 0.85rem;
}

/* ============================================================
           保存按钮与通知
   ============================================================ */
.header-btn.save-btn { color: var(--success-color); }
.header-btn.save-btn:hover { border-color: var(--success-color); background: var(--success-light, #e8faf0); }
.header-btn.save-btn.saving { opacity: 0.6; pointer-events: none; }
.header-btn.leaderboard-btn { color: var(--warning-color); }
.header-btn.leaderboard-btn:hover { border-color: var(--warning-color); background: var(--warning-light, #fef7e8); }

/* HeList 专属 Toast 提示 */
.helist-toast {
    position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--panel-color);
    color: var(--text-color);
    padding: 10px 22px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex; align-items: center; gap: 8px;
}
.helist-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.helist-toast.success { border-color: var(--success-color); }
.helist-toast.error { border-color: var(--danger-color); }
.helist-toast.info { border-color: var(--primary-color); }

/* ============================================================
           头部用户徽章（迷你显示）
   ============================================================ */
.header-user-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 12px 3px 6px;
    border-radius: 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.75rem;
    color: var(--text-color);
}
.header-user-badge:hover { border-color: var(--primary-color); }
.header-user-badge .user-mini-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700;
    color: #fff;
    overflow: hidden; flex-shrink: 0;
}
.header-user-badge .user-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 切换登录按钮 ===== */
.switch-login-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.72rem;
    transition: var(--transition);
    white-space: nowrap;
    opacity: 0.7;
}
.switch-login-btn:hover {
    opacity: 1;
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.06);
}
.switch-login-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================================
           设置面板
   ============================================================ */
.settings-modal-box {
    max-width: 480px !important;
}
.settings-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.settings-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.settings-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.settings-btn-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    width: 100%;
    text-align: left;
}
.settings-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}
.settings-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.settings-btn-sm {
    padding: 7px 12px;
    font-size: 0.8rem;
    width: auto;
}
.settings-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
}
.settings-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}
.settings-hint {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 4px;
    line-height: 1.4;
}
.settings-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 30px;
}
.settings-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px 4px 4px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--primary-color);
    transition: all var(--transition);
}
.settings-type-chip .type-chip-name {
    padding: 0 4px;
    cursor: default;
    user-select: none;
}
.settings-type-chip .type-chip-move,
.settings-type-chip .type-chip-edit,
.settings-type-chip .type-chip-move,
.settings-type-chip .type-chip-edit,
.settings-type-chip .type-chip-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition);
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.5;
}
.settings-type-chip .type-chip-move:hover { opacity: 1; background: rgba(74, 144, 226, 0.15); }
.settings-type-chip .type-chip-edit { color: var(--warning-color); opacity: 0.5; }
.settings-type-chip .type-chip-edit:hover { opacity: 1; background: rgba(243, 156, 18, 0.15); }
.settings-type-chip .type-chip-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    color: var(--danger-color);
    opacity: 0.6;
    transition: all var(--transition);
    background: transparent;
    border: none;
    padding: 0;
}
.settings-type-chip .type-chip-del:hover {
    opacity: 1;
    background: rgba(231, 76, 60, 0.15);
}
.settings-add-type {
    display: flex;
    gap: 6px;
}
.settings-add-type input {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border var(--transition);
}
.settings-add-type input:focus {
    border-color: var(--primary-color);
}

/* 名言库列表 */
.settings-quote-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    min-height: 30px;
}
.settings-quote-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--text-color);
    font-size: 0.82rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.settings-quote-item .quote-item-move-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}
.settings-quote-item .quote-item-move-group .quote-item-move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 14px;
    border-radius: 3px;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition);
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.4;
    color: var(--text-color);
}
.settings-quote-item .quote-item-move-group .quote-item-move:hover {
    opacity: 1;
    background: rgba(74, 144, 226, 0.15);
}
.settings-quote-item .quote-item-text {
    flex: 1;
    padding: 0 4px;
    cursor: default;
    user-select: none;
    line-height: 1.4;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.settings-quote-item .quote-item-edit,
.settings-quote-item .quote-item-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition);
    background: transparent;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.settings-quote-item .quote-item-edit {
    color: var(--warning-color);
    opacity: 0.5;
}
.settings-quote-item .quote-item-edit:hover {
    opacity: 1;
    background: rgba(243, 156, 18, 0.15);
}
.settings-quote-item .quote-item-del {
    color: var(--danger-color);
    opacity: 0.5;
}
.settings-quote-item .quote-item-del:hover {
    opacity: 1;
    background: rgba(231, 76, 60, 0.15);
}
.settings-add-quote {
    display: flex;
    gap: 6px;
}
.settings-add-quote input {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border var(--transition);
}
.settings-add-quote input:focus {
    border-color: var(--primary-color);
}

/* ============================================================
           计时器全屏模式
   ============================================================ */
.timer-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: linear-gradient(-45deg, #f0f4ff, #faf0ff, #fff0f5, #f0faff);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.dark-mode .timer-fullscreen {
    background: linear-gradient(-45deg, #2a1a3e, #1a1a3e, #2a1a3e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
}
.timer-fullscreen.active {
    display: flex;
    opacity: 1;
}
.timer-fullscreen-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    animation: fsFadeIn 0.4s ease;
    max-width: 700px;
    width: 92%;
}
/* 全屏淡入动画 */
@keyframes fsFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.timer-fullscreen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.timer-fullscreen-task-name {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.timer-fullscreen-task-time {
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 500;
    color: var(--primary-color);
    opacity: 0.8;
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--primary-light);
    white-space: nowrap;
}
.timer-fullscreen-task-detail {
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    color: var(--text-color);
    opacity: 0.6;
    max-width: 70vw;
    line-height: 1.5;
    text-align: center;
    padding: 8px 16px;
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}
.timer-fullscreen-quote {
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-style: italic;
    color: var(--text-color);
    opacity: 0.5;
    text-align: center;
    max-width: 70vw;
    line-height: 1.5;
    padding: 0 16px;
}
.timer-fullscreen-display {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 18vw, 10rem);
    font-weight: 700;
    color: var(--timer-text);
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 0 0 60px var(--glow-color), 0 0 120px var(--glow-ring);
    user-select: none;
}
.timer-fullscreen-controls {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.timer-fullscreen-btn {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 32px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    outline: none;
    white-space: nowrap;
}
.timer-fullscreen-btn:active { transform: scale(0.95); }
.timer-fs-pause {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1.5px solid var(--border-color);
}
.timer-fs-pause:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}
.timer-fs-end {
    background: var(--danger-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.35);
}
.timer-fs-end:hover {
    background: #c0392b;
    box-shadow: 0 6px 24px rgba(231, 76, 60, 0.45);
    transform: translateY(-2px);
}
.timer-fullscreen-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .timer-fullscreen-controls {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 260px;
    }
    .timer-fullscreen-btn {
        width: 100%;
        justify-content: center;
    }
    .timer-fullscreen-content {
        gap: 24px;
    }
}
