/* ========================================
   计时器工具样式
   ======================================== */

/* 主内容 */
.main-content { 
    width: 100%; 
    max-width: 900px; /* 进一步增加宽度 */
    min-height: 620px; /* 增加最小高度，确保能容纳 5 个计次 + 操作区 */
    height: auto;
    display: flex; 
    align-items: center; 
    padding: 0 20px; 
    padding-bottom: 50px; 
    z-index: 10; 
}
.container { width: 100%; }
.tool-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-xl); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    width: 100%;
    min-height: 620px; /* 保持卡片高度与主内容一致 */
    box-shadow: 0 20px 40px var(--ink-30);
}

/* 顶部标签 */
.tabs { display: flex; border-bottom: 1px solid var(--border-color); background: var(--ink-20); flex-shrink: 0; }
.tab-btn { flex: 1; padding: 16px; background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: 0.2s; font-size: 15px; border-bottom: 2px solid transparent; }
.tab-btn:hover { background: var(--paper-03); color: var(--text-primary); }
.tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); background: rgba(20, 184, 166, 0.05); }

/* 面板 */
.panel { 
    display: none; 
    flex: 1; 
    flex-direction: column; 
    overflow: hidden; 
    height: 100%; 
}
.panel.active { display: flex; }

/* 计时显示区 */
.timer-display {
    font-family: var(--font-mono);
    font-size: 60px; /* 字体更大 */
    text-align: center;
    padding: 40px 0; /* 增加上下间距，撑起高度 */
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(20, 184, 166, 0.2);
    transition: color 0.3s;
    background: var(--ink-10);
    margin: 0 24px 24px; /* 增加左右边距 */
    border-radius: var(--radius-lg);
    border: 1px dashed var(--paper-05);
}
.timer-display.flash { animation: flash 0.5s ease-in-out; }
@keyframes flash {
    0%, 100% { color: var(--text-primary); background: var(--ink-10); }
    50% { color: white; background: rgba(255, 0, 0, 0.2); }
}

/* 控制栏 */
.controls { display: flex; justify-content: center; gap: 20px; padding: 0 24px 24px; flex-shrink: 0; }
.btn-action { padding: 14px 32px; border-radius: var(--radius-lg); border: none; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 10px; transition: 0.2s; color: white; min-width: 130px; justify-content: center; font-size: 16px; }
.btn-action:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); transform: none; }

.btn-green { background: var(--success-color, var(--primary-color)); }
.btn-yellow { background: var(--warning-color, #eab308); }
.btn-gray { background: var(--paper-15); color: var(--text-secondary); }

/* 计次列表 */
.laps-container { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0 24px 24px; 
}
.laps-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-color); }
.laps-list li { 
    display: flex; 
    justify-content: space-between; 
    padding: 14px 0; /* 增加行高，5个项刚好占满区域 */
    border-bottom: 1px dashed var(--border-color); 
    font-family: var(--font-mono); 
    font-size: 16px; 
    color: var(--text-secondary); 
}
.laps-list li:first-child { color: var(--primary-color); font-weight: 600; }
.laps-list li span { flex: 1; text-align: center; }
.laps-list li span:first-child { text-align: left; }
.laps-list li span:last-child { text-align: right; }

/* 倒计时输入 */
.cd-inputs { display: flex; justify-content: center; gap: 30px; padding: 30px 0 0; }
.input-group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.input-group label { font-size: 14px; color: var(--text-muted); }
.cd-input { 
    width: 100px; 
    padding: 16px; 
    background: var(--ink-30); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    color: var(--text-primary); 
    text-align: center; 
    font-size: 32px; 
    font-family: var(--font-mono); 
    outline: none; 
    transition: 0.2s;
}
.cd-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); }
.cd-input:disabled { opacity: 0.3; }

/* 使用说明 */
.about-content { padding: 30px; overflow-y: auto; height: 100%; }
.about-content h3 { font-size: 18px; color: var(--primary-color); margin: 24px 0 12px; display: flex; align-items: center; gap: 12px; }
.about-content p { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin: 0 0 20px; }
.shortcut-list { list-style: none; padding: 0; }
.shortcut-list li { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; font-size: 15px; color: var(--text-secondary); }
kbd { background: var(--paper-10); border: 1px solid var(--border-color); border-radius: 6px; padding: 4px 10px; font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }
.note { margin-top: 30px; font-size: 14px; color: var(--text-muted) !important; font-style: italic; }

/* 响应式 */
@media (max-width: 768px) {
    .main-content { 
        padding-bottom: 50px; 
        height: auto; 
        min-height: calc(100vh - 120px); 
        max-width: 100%;
    }
    .tool-card { height: auto; min-height: 80vh; }
    .timer-display { font-size: 40px; padding: 20px 0; }
    .controls { gap: 10px; }
    .btn-action { min-width: auto; padding: 12px 16px; font-size: 14px; }
    .cd-input { width: 70px; font-size: 24px; }
}
