/* Reset and base styles */
* {
    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: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    text-align: center;
}

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

h1 i {
    color: #667eea;
}

/* Timer display */
.timer-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.time {
    font-size: 5rem;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.milliseconds {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

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

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

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

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

.start-btn {
    background-color: #4CAF50;
    color: white;
}

.start-btn:hover:not(:disabled) {
    background-color: #45a049;
}

.pause-btn {
    background-color: #ff9800;
    color: white;
}

.pause-btn:hover:not(:disabled) {
    background-color: #e68900;
}

.reset-btn {
    background-color: #f44336;
    color: white;
}

.reset-btn:hover:not(:disabled) {
    background-color: #d32f2f;
}

.lap-btn {
    background-color: #2196F3;
    color: white;
    margin: 20px auto;
}

.lap-btn:hover:not(:disabled) {
    background-color: #0b7dda;
}

/* Lap section */
.lap-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.lap-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lap-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 20px;
    border-radius: 10px;
    background-color: #f9f9f9;
    padding: 15px;
}

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

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

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

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

/* Instructions */
.instructions {
    margin-top: 40px;
    padding: 20px;
    background-color: #f0f4ff;
    border-radius: 10px;
    text-align: left;
}

.instructions h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style-type: none;
    padding-left: 10px;
}

.instructions li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.instructions li:before {
    content: "•";
    color: #667eea;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .time {
        font-size: 3.5rem;
    }
    
    .milliseconds {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        min-width: 120px;
    }
    
    .controls {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 2.5rem;
    }
    
    .milliseconds {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 15px;
        min-width: 100px;
    }
}