/* ============ 秒表计时器 - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box等）已由 common.css 统一提供 */

#stopwatch-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 15px;
}

#stopwatch-container .preview-card + .preview-card {
    margin-top: 0;
}

#stopwatch-container .lap-card {
    flex: 1;
    min-height: 300px;
}

/* ---- 计时显示区 ---- */
.display-section {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 10px;
}

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.time-unit {
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0,255,136,0.5);
    min-width: 2ch;
    text-align: center;
}

.time-unit.ms {
    font-size: 32px;
    color: #a5b4fc;
    text-shadow: 0 0 10px rgba(165,180,252,0.5);
    min-width: 3ch;
}

.time-separator {
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0,255,136,0.5);
    animation: sw-blink 1s infinite;
}

.ms-separator {
    color: #a5b4fc;
    animation: none;
}

@keyframes sw-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.lap-count {
    margin-top: 14px;
    font-size: 14px;
    color: #94a3b8;
}

/* ---- 控制按钮 ---- */
.control-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
}

.btn-start {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    transition: all .2s;
}
.btn-start:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.4); }

.btn-start.stop {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.btn-start.stop:hover { box-shadow: 0 4px 12px rgba(245,158,11,.4); }

.btn-lap {
    padding: 10px 24px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #374151;
    transition: all .2s;
}
.btn-lap:hover:not(:disabled) { border-color: #9ca3af; background: #f9fafb; }
.btn-lap:disabled { opacity: .5; cursor: not-allowed; }

.btn-reset {
    padding: 10px 24px;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #ef4444;
    transition: all .2s;
}
.btn-reset:hover { background: #fef2f2; border-color: #f87171; }

/* ---- 计次记录列表 ---- */
.lap-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
}

.lap-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
}

.lap-item.highlight {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
}

.lap-number    { color: #6b7280;       min-width: 60px; }
.lap-time      { font-family: 'Courier New', monospace; color: #1f2937; font-weight: 500; min-width: 90px; text-align: center; }
.lap-total     { font-family: 'Courier New', monospace; color: #8b5cf6; font-weight: 500; min-width: 90px; text-align: center; }
.lap-timestamp { font-family: 'Courier New', monospace; color: #94a3b8; min-width: 70px; text-align: center; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .display-section { padding: 24px 12px; }
    .time-display { font-size: 34px; }
    .time-unit.ms { font-size: 24px; }
    .control-section { gap: 8px; }
    .btn-start, .btn-lap, .btn-reset { padding: 10px 18px; font-size: 13px; }
    .lap-time, .lap-total { min-width: 70px; }
    .lap-timestamp { display: none; }
}
