/* public/assets/css/system/online-timer.css */

.timer-wrapper { padding: 32px; border-radius: var(--radius-lg); position: relative; }
.timer-header { text-align: center; margin-bottom: 32px; }
.timer-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px; }
.timer-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 750px; margin: 0 auto; line-height: 1.6; }

/* 🌟 核心工作台容器 */
.timer-pro-workstation { max-width: 760px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 24px; padding: 36px; box-shadow: 0 20px 50px rgba(0,0,0,0.08); display: flex; flex-direction: column; align-items: center; position: relative; transition: all 0.3s ease; }

/* 🌟 全屏禅意模式 (Zen Mode) */
.timer-pro-workstation.is-zen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; max-width: none; border-radius: 0; border: none; z-index: 99999; margin: 0; padding: 40px; justify-content: center; background: var(--bg-body); }
.timer-pro-workstation.is-zen .timer-mode-nav,
.timer-pro-workstation.is-zen .timer-footer-deck,
.timer-pro-workstation.is-zen .interval-config-bar,
.timer-pro-workstation.is-zen .stopwatch-laps-panel { display: none !important; }
.timer-pro-workstation.is-zen .timer-hero-container { transform: scale(1.15); margin-bottom: 24px; }

/* 顶部导航模式选项卡 */
.timer-mode-nav { display: flex; background: var(--bg-body); padding: 6px; border-radius: 14px; border: 1px solid var(--border-color); margin-bottom: 24px; gap: 4px; flex-wrap: wrap; justify-content: center; }
.nav-tab { background: transparent; border: none; padding: 10px 20px; font-size: 0.95rem; font-weight: 700; color: var(--text-muted); border-radius: 10px; cursor: pointer; transition: 0.2s; }
.nav-tab:hover { color: var(--text-main); }
.nav-tab.active { background: var(--bg-surface); color: #3b82f6; box-shadow: 0 4px 12px rgba(0,0,0,0.06); font-weight: 800; }

/* 任务便签输入条 */
.timer-task-bar { width: 100%; max-width: 440px; margin-bottom: 24px; }
.task-input { width: 100%; padding: 10px 16px; font-size: 0.95rem; font-weight: 600; text-align: center; border: 1px dashed var(--border-color); border-radius: 20px; background: transparent; color: var(--text-main); outline: none; transition: 0.2s; box-sizing: border-box; }
.task-input:focus { border-color: #3b82f6; background: rgba(59, 130, 246, 0.03); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* 番茄钟子导航 */
.pomo-subnav { display: flex; gap: 8px; margin-bottom: 24px; }
.pomo-pill { padding: 6px 16px; font-size: 0.85rem; font-weight: 700; border: 1px solid var(--border-color); background: var(--bg-body); color: var(--text-muted); border-radius: 20px; cursor: pointer; transition: 0.2s; }
.pomo-pill.active { background: #ef4444; color: #fff; border-color: #ef4444; box-shadow: 0 4px 10px rgba(239,68,68,0.3); }

/* 间歇训练配置栏 */
.interval-config-bar { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; }
.int-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.int-group label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.int-input { width: 80px; padding: 8px; text-align: center; font-size: 1.1rem; font-weight: 800; font-family: monospace; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); outline: none; }

/* 🌟 核心 SVG 光环 */
.timer-hero-container { position: relative; width: 320px; height: 320px; margin-bottom: 32px; }
.timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-bg { fill: none; stroke: var(--border-color); stroke-width: 8; }
.timer-ring-progress { fill: none; stroke: #3b82f6; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 911.06; stroke-dashoffset: 0; transition: stroke-dashoffset 0.1s linear, stroke 0.3s; filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4)); }

/* 状态色彩映射 */
.timer-hero-container.mode-pomodoro .timer-ring-progress { stroke: #ef4444; filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.4)); }
.timer-hero-container.mode-break .timer-ring-progress { stroke: #10b981; filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.4)); }
.timer-hero-container.mode-stopwatch .timer-ring-progress { stroke: #8b5cf6; filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4)); }
.timer-hero-container.mode-hiit-work .timer-ring-progress { stroke: #f97316; filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.5)); }
.timer-hero-container.mode-hiit-rest .timer-ring-progress { stroke: #06b6d4; filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.5)); }

/* 倒计时内部内容 */
.timer-display-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-sub-status { font-size: 0.85rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }

.time-inputs { display: flex; align-items: center; justify-content: center; gap: 4px; }
.input-col { display: flex; flex-direction: column; align-items: center; }
.time-inp { width: 64px; height: 64px; font-size: 2.6rem; font-weight: 800; font-family: 'Courier New', Courier, monospace; text-align: center; color: var(--text-main); background: transparent; border: none; border-radius: 8px; outline: none; }
.time-inp:hover, .time-inp:focus { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .time-inp:hover, [data-theme="dark"] .time-inp:focus { background: rgba(255,255,255,0.05); }
.inp-lbl { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-top: -4px; }
.colon { font-size: 2rem; font-weight: 800; color: var(--text-muted); margin-top: -20px; }

.time-running { font-size: 4.4rem; font-weight: 900; font-family: 'Courier New', Courier, monospace; color: var(--text-main); line-height: 1; text-shadow: 0 4px 12px rgba(0,0,0,0.06); display: flex; align-items: baseline; }
.time-running small { font-size: 1.8rem; color: var(--text-muted); margin-left: 2px; }

/* 番茄钟指示灯 */
.pomo-indicators { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.pomo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-color); transition: 0.3s; }
.pomo-dot.filled { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.pomo-cycle-text { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-left: 6px; }

/* 控制按钮栏 */
.timer-controls { display: flex; gap: 12px; width: 100%; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.timer-btn { padding: 14px 28px; font-size: 1rem; font-weight: 800; border: none; border-radius: 30px; cursor: pointer; transition: 0.2s; text-transform: uppercase; letter-spacing: 1px; }
.timer-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-start { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3); }
.btn-start:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(59, 130, 246, 0.4); }
.btn-pause { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3); }
.btn-lap { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; }
.btn-reset { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); }
.btn-reset:hover:not(:disabled) { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; color: #ef4444; }
.btn-zen { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-muted); }
.btn-zen:hover { color: var(--text-main); border-color: #3b82f6; }

/* 秒表计圈列表 */
.stopwatch-laps-panel { width: 100%; max-width: 480px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; margin-bottom: 24px; }
.laps-header { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 800; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 8px; margin-bottom: 8px; }
.laps-list { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.lap-row { display: flex; justify-content: space-between; font-family: monospace; font-size: 0.9rem; font-weight: 600; color: var(--text-main); padding: 4px 0; border-bottom: 1px dashed rgba(0,0,0,0.05); }
.lap-row.fastest { color: #10b981; font-weight: 800; }
.lap-row.slowest { color: #ef4444; font-weight: 800; }

/* ==========================================
   🌟 升级版底部控制台甲板与数据卡片 
   ========================================== */
.timer-footer-deck { 
    width: 100%; 
    border-top: 1px solid var(--border-color); 
    padding-top: 24px; 
    display: grid; 
    /* 将比例调整为：下拉框1 : 下拉框1 : 数据卡片1.2 */
    grid-template-columns: 1fr 1fr 1.2fr; 
    gap: 16px; 
}

/* 核心修复：打破原生组件宽度霸权，防止溢出 */
.deck-item { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    min-width: 0; 
}

.deck-item label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.deck-row { display: flex; align-items: center; gap: 8px; }

/* 下拉菜单长文本截断截断 */
.timer-select { 
    background: var(--bg-body); 
    color: var(--text-main); 
    border: 1px solid var(--border-color); 
    padding: 8px 12px; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    outline: none; 
    cursor: pointer; 
    flex: 1; 
    min-width: 0; 
    text-overflow: ellipsis; 
    overflow: hidden; 
    white-space: nowrap; 
}

.vol-slider { -webkit-appearance: none; width: 60px; height: 6px; background: var(--border-color); border-radius: 3px; outline: none; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #3b82f6; cursor: pointer; }
.btn-sound-preview { background: var(--bg-body); border: 1px solid var(--border-color); padding: 6px 10px; border-radius: 8px; cursor: pointer; }

/* 🌟 升级版：统计数据仪表盘卡片 */
.stats-dashboard-card { 
    display: flex; 
    align-items: center; 
    background: rgba(59, 130, 246, 0.05); 
    border: 1px solid rgba(59, 130, 246, 0.2); 
    border-radius: 12px; 
    height: 100%; 
    min-height: 52px;
    overflow: hidden; 
    min-width: 0; /* 防止溢出 */
}

.stat-box { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 8px 4px; 
    min-width: 0; 
}

.stat-divider {
    width: 1px;
    height: 60%;
    background: rgba(59, 130, 246, 0.2);
}

.stat-name { 
    font-size: 0.65rem; 
    font-weight: 700; 
    color: var(--text-muted); 
    margin-bottom: 4px; 
    text-transform: uppercase;
    white-space: normal; /* 允许文本自然换行，不再撑破盒子 */
    text-align: center;
    line-height: 1.2;
}

.stat-value { 
    font-size: 1.15rem; 
    font-weight: 900; 
    color: #3b82f6; 
    font-family: 'Courier New', Courier, monospace; 
    line-height: 1; 
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .stats-dashboard-card {
    background: rgba(96, 165, 250, 0.05);
}
[data-theme="dark"] .stat-value {
    color: #60a5fa;
}

.timer-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); max-width: 760px; margin: 0 auto; box-sizing: border-box; }

@media (max-width: 768px) {
    .timer-pro-workstation { padding: 20px; }
    .timer-hero-container { width: 260px; height: 260px; }
    .time-inp { width: 50px; height: 50px; font-size: 2rem; }
    .time-running { font-size: 3.2rem; }
    .timer-footer-deck { grid-template-columns: 1fr; gap: 16px; }
    /* 在移动端让数据卡片稍微高一点，避免过于拥挤 */
    .stats-dashboard-card { min-height: 64px; }
}