* {
    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;
    padding: 1rem;
}

.main {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.instructions {
    flex: 1;
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 280px;
    max-height: 500px;
}

.instructions h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.lead {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    margin: 1.2rem 0;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.instructions li:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.stopwatch-container {
    flex: 2;
    background: rgba(255,255,255,0.95);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.stopwatch-container h1 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.display {
    font-size: 4rem;
    font-weight: 700;
    margin: 2rem 0;
    color: #2c3e50;
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.1);
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.buttons button {
    font-size: 1.1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#start { background: #4CAF50; color: white; }
#stop { background: #f44336; color: white; }
#lap { background: #FF9800; color: white; }
#reset { background: #2196F3; color: white; }

button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
button:active { transform: translateY(-1px); }

.lap-list {
    margin-top: 2rem;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.lap-list h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

#laps {
    list-style: none;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 1rem;
}

.lap-item {
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main { 
        flex-direction: column;
        padding: 1rem;
    }
    
    .display { font-size: 2.5rem; }
    .buttons { flex-direction: column; align-items: center; }
    
    .instructions {
        max-height: none;
        order: 2;
    }
    
    .stopwatch-container {
        order: 1;
    }
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 2rem 0;
}
