/* ── 在线计时器 ── */

/* 模式切换标签 */
.timer-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.timer-mode-tab {
    flex: 1;
    padding: 0.6rem 1.2rem;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.timer-mode-tab.active {
    background: #2563eb;
    color: white;
}

.timer-mode-tab:hover:not(.active) {
    background: #e8e8e8;
}

/* 计时面板 */
.timer-panel {
    text-align: center;
    padding: 1rem 0;
}

/* 时间显示 */
.timer-display {
    font-family: 'Fira Code', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.timer-ms {
    font-size: 2.2rem;
    color: #666;
}

/* 按钮组 */
.timer-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.timer-btn {
    min-width: 100px;
}

.timer-btn.running {
    background: #dc2626;
    color: white;
}

.timer-btn.running:hover {
    background: #b91c1c;
}

/* 倒计时输入 */
.cd-input-group {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.cd-input-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.cd-input {
    width: 80px;
    padding: 0.7rem;
    font-size: 1.8rem;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.cd-input:focus {
    border-color: #2563eb;
}

.cd-input-label {
    font-size: 0.85rem;
    color: #666;
}

/* 快捷按钮 */
.cd-quick-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.cd-quick-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    background: white;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cd-quick-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .timer-display {
        font-size: 2.8rem;
    }
    .timer-ms {
        font-size: 1.6rem;
    }
    .timer-btn {
        min-width: 80px;
        padding: 0.65rem 1rem;
    }
    .cd-input {
        width: 65px;
        font-size: 1.4rem;
        padding: 0.5rem;
    }
}