/* 秒表计时器 - 专用样式 */

/* 秒表卡片 */
.stopwatch-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* 时间显示 */
.time-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.time-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Courier New', monospace;
    color: #111827;
    font-weight: 600;
}

.time-hours,
.time-minutes,
.time-seconds {
    font-size: 3.5rem;
    line-height: 1;
    color: #667eea;
}

.time-milliseconds {
    font-size: 2rem;
    line-height: 1;
    color: #6b7280;
}

.time-separator {
    font-size: 3.5rem;
    line-height: 1;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .time-hours,
    .time-minutes,
    .time-seconds {
        font-size: 2.5rem;
    }
    
    .time-milliseconds {
        font-size: 1.5rem;
    }
    
    .time-separator {
        font-size: 2.5rem;
    }
    
    .time-display {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .time-hours,
    .time-minutes,
    .time-seconds {
        font-size: 2rem;
    }
    
    .time-milliseconds {
        font-size: 1.25rem;
    }
    
    .time-separator {
        font-size: 2rem;
    }
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.control-buttons .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.control-buttons .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.control-buttons .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.control-buttons .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.control-buttons .btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.control-buttons .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.control-buttons .btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-buttons .btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .control-buttons .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 圈速记录区域 */
.lap-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}

.lap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.lap-header h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-clear {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.btn-clear svg {
    width: 16px;
    height: 16px;
}

/* 圈速列表 */
.lap-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.lap-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.lap-empty svg {
    margin-bottom: 1rem;
}

.lap-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.lap-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.lap-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.lap-item.lap-fastest {
    background: #ecfdf5;
    border-color: #10b981;
}

.lap-item.lap-slowest {
    background: #fef2f2;
    border-color: #ef4444;
}

.lap-number {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
    min-width: 60px;
}

.lap-times {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.lap-time,
.lap-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.lap-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lap-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

.lap-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lap-badge-fastest {
    background: #10b981;
    color: white;
}

.lap-badge-slowest {
    background: #ef4444;
    color: white;
}

@media (max-width: 640px) {
    .lap-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .lap-times {
        width: 100%;
        justify-content: space-between;
    }
    
    .lap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-clear {
        align-self: flex-end;
    }
}

/* 滚动条样式 */
.lap-list::-webkit-scrollbar {
    width: 6px;
}

.lap-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.lap-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.lap-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 信息卡片样式 */
.info-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-top: 2rem;
}

.info-title {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.info-title::before {
    content: '💡';
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.info-content {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .info-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.info-section h3 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1rem;
}

.info-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.5px;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-section li {
    padding: 0.5rem 0;
    color: #6b7280;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.info-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.info-section li strong {
    color: #374151;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .info-card {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .stopwatch-card,
    .info-card {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .time-display {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .time-hours,
    .time-minutes,
    .time-seconds {
        color: #60a5fa;
    }
    
    .time-milliseconds {
        color: #9ca3af;
    }
    
    .time-separator {
        color: #6b7280;
    }
    
    .lap-header h3 {
        color: #f9fafb;
    }
    
    .lap-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .lap-item:hover {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .lap-item.lap-fastest {
        background: #064e3b;
        border-color: #10b981;
    }
    
    .lap-item.lap-slowest {
        background: #7f1d1d;
        border-color: #ef4444;
    }
    
    .lap-number,
    .lap-value {
        color: #f9fafb;
    }
    
    .lap-label {
        color: #9ca3af;
    }
    
    .btn-clear {
        border-color: #4b5563;
        color: #9ca3af;
    }
    
    .btn-clear:hover {
        background: #374151;
        border-color: #6b7280;
        color: #d1d5db;
    }
    
    .info-title {
        color: #f9fafb;
    }
    
    .info-section h3 {
        color: #e5e7eb;
    }
    
    .info-section li {
        color: #9ca3af;
    }
    
    .info-section li strong {
        color: #d1d5db;
    }
    
    .lap-section {
        border-top-color: #374151;
    }
}

/* 打印样式 */
@media print {
    .nav,
    .control-buttons,
    .aw-footer-wrap {
        display: none;
    }
    
    .stopwatch-card,
    .info-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .time-display {
        background: #f3f4f6 !important;
    }
}

