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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(230, 0, 0, 0.1) 0%, transparent 100%);
    border-bottom: 2px solid rgba(230, 0, 0, 0.3);
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #e60000;
    text-shadow: 0 0 20px rgba(230, 0, 0, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 0.9rem;
    color: #aaa;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Start Lights */
.lights-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 60px 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

.lights-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    border-radius: 20px;
    pointer-events: none;
}

.light {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2a0000, #0a0000);
    border: 3px solid #1a1a1a;
    box-shadow:
        inset 0 -5px 15px rgba(0, 0, 0, 0.8),
        inset 0 5px 10px rgba(255, 255, 255, 0.05),
        0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease-out;
    position: relative;
}

.light::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.1s;
}

.light.active {
    background: radial-gradient(circle at 30% 30%, #ff0000, #cc0000, #990000);
    box-shadow:
        inset 0 -5px 15px rgba(0, 0, 0, 0.4),
        inset 0 5px 10px rgba(255, 100, 100, 0.5),
        0 0 40px rgba(255, 0, 0, 0.8),
        0 0 80px rgba(255, 0, 0, 0.4);
    border-color: #660000;
}

.light.active::before {
    opacity: 1;
}

/* Status Display */
.status-display {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#status-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#status-text.waiting {
    color: #ffaa00;
    animation: pulse 1.5s infinite;
}

#status-text.ready {
    color: #00ff00;
    font-size: 2rem;
    animation: readyPulse 0.5s ease-out;
}

#status-text.false-start {
    color: #ff0000;
    font-size: 2rem;
    animation: shake 0.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes readyPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Result Display */
.result-container {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.5s;
}

.result-container.show {
    opacity: 1;
}

.result-time {
    font-size: 4rem;
    font-weight: 900;
    color: #00ff00;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    letter-spacing: 3px;
}

.result-feedback {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
}

.result-feedback.elite {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.result-feedback.professional {
    color: #00ff00;
}

.result-feedback.average {
    color: #ffaa00;
}

.result-feedback.slow {
    color: #ff6600;
}

/* Controls */
.controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.btn {
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff0000 0%, #e60000 100%);
    box-shadow: 0 8px 30px rgba(230, 0, 0, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #444 0%, #333 100%);
    box-shadow: 0 8px 30px rgba(100, 100, 100, 0.4);
    transform: translateY(-2px);
}

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

/* Instructions */
.instructions {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
}

.instructions h3 {
    color: #e60000;
    margin-bottom: 15px;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #ccc;
    line-height: 1.6;
}

.instructions li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #e60000;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Best Time */
.best-time-container {
    padding: 15px 30px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

#best-time {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00ff00;
    letter-spacing: 2px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .lights-container {
        gap: 15px;
        padding: 40px 20px;
    }

    .light {
        width: 50px;
        height: 50px;
    }

    .result-time {
        font-size: 2.5rem;
    }

    .btn {
        padding: 15px 35px;
        font-size: 1rem;
    }

    .instructions {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .lights-container {
        gap: 10px;
        padding: 30px 15px;
    }

    .light {
        width: 40px;
        height: 40px;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
