* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header h1 i {
    color: #667eea;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.timer-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.1);
}

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 4.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
}

.milliseconds {
    font-size: 2.5rem;
    color: #666;
}

.timer-status {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.btn-secondary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.laps-section {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.laps-section h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.laps-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.no-laps {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Courier New', monospace;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-number {
    font-weight: bold;
    color: #667eea;
}

.lap-time {
    font-weight: bold;
    color: #333;
}

.lap-difference {
    color: #666;
    font-size: 0.9rem;
}

.preset-times {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.preset-times h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preset-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .time-display {
        font-size: 3.5rem;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    
    .milliseconds {
        font-size: 2rem;
    }
    
    .btn {
        min-width: 120px;
        padding: 12px 20px;
    }
    
    .controls {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .time-display {
        font-size: 2.8rem;
    }
    
    .btn {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 1rem;
    }
    
    .preset-buttons {
        gap: 10px;
    }
    
    .preset-btn {
        padding: 10px 15px;
    }
}