* {
    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: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.time {
    font-size: 4em;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.milliseconds {
    font-size: 2em;
    color: #999;
    font-family: 'Courier New', monospace;
    min-width: 60px;
    text-align: left;
}

.buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

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

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-reset {
    background: #999;
}

.btn-lap {
    background: #4b5563;
}

.btn-lap:hover:not(:disabled) {
    background: #374151;
    transform: translateY(-2px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.btn-reset:hover {
    background: #777;
    transform: translateY(-2px);
}

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

.laps {
    margin-top: 30px;
}

.laps h2 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}

.lap-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #555;
}

.lap-number {
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
}

.lap-time {
    font-size: 1.1em;
    color: #333;
}

@media (max-width: 480px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .display {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .time {
        font-size: 3em;
    }

    .milliseconds {
        font-size: 1.5em;
    }

    .btn {
        padding: 12px;
        font-size: 0.9em;
    }
}
