* {
    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: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #667eea;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header p {
    color: #666;
    font-size: 0.95em;
}

.display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.time {
    font-size: 4em;
    font-weight: 300;
    color: white;
    font-variant-numeric: tabular-nums;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.milliseconds {
    font-size: 0.5em;
    opacity: 0.9;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 18px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-start {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-start:hover {
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.4);
    transform: translateY(-2px);
}

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

.btn-pause:hover {
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
    transform: translateY(-2px);
}

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

.btn-reset:hover {
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
    transform: translateY(-2px);
}

.btn-lap {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.btn-lap:hover {
    box-shadow: 0 8px 20px rgba(250, 112, 154, 0.4);
    transform: translateY(-2px);
}

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

.laps-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.laps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.laps-header h3 {
    color: #667eea;
    font-size: 1.2em;
}

.clear-laps {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.clear-laps:hover {
    background: #c82333;
    transform: scale(1.05);
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.lap-time {
    font-weight: 500;
    color: #495057;
    font-variant-numeric: tabular-nums;
}

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

.laps-section::-webkit-scrollbar {
    width: 8px;
}

.laps-section::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.laps-section::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    .time {
        font-size: 3em;
    }

    .controls {
        flex-wrap: wrap;
    }

    .btn {
        font-size: 1em;
    }
}
