* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow-x: hidden;
}

.game-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-info {
    margin-bottom: 30px;
}

#game-status {
    font-size: 1.5rem;
    margin-bottom: 15px;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    font-weight: 700;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
}

.btn-row {
    display: flex;
    gap: 15px;
}

.btn {
    height: 120px;
    width: 120px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: scale(0.95);
}

.btn-number {
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.red {
    background: linear-gradient(145deg, #ff6b6b, #d63031);
}

.yellow {
    background: linear-gradient(145deg, #fdcb6e, #e17055);
}

.green {
    background: linear-gradient(145deg, #55a3ff, #0984e3);
}

.purple {
    background: linear-gradient(145deg, #a29bfe, #6c5ce7);
}

.flash {
    background: radial-gradient(circle, #ffffff, #f0f0f0) !important;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.user-flash {
    background: radial-gradient(circle, #00ff00, #32cd32) !important;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

.error-flash {
    background: radial-gradient(circle, #ff0000, #dc143c) !important;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) scale(1.1); }
    25% { transform: translateX(-5px) scale(1.1); }
    75% { transform: translateX(5px) scale(1.1); }
}

.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: linear-gradient(145deg, #667eea, #764ba2);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

.game-over-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.instructions {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.instructions h3 {
    margin-bottom: 15px;
    color: #fdcb6e;
}

.instructions ul {
    list-style: none;
    text-align: left;
}

.instructions li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.instructions li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #fdcb6e;
    font-weight: bold;
}

.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .btn {
        height: 100px;
        width: 100px;
    }
    
    .btn-number {
        font-size: 1.5rem;
    }
    
    .level-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .instructions {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .btn {
        height: 80px;
        width: 80px;
    }
    
    .btn-number {
        font-size: 1.2rem;
    }
    
    .btn-row {
        gap: 10px;
    }
    
    #game-status {
        font-size: 1.2rem;
    }
    
    .game-over-content {
        padding: 30px 20px;
    }
    
    .game-over-content h2 {
        font-size: 2rem;
    }
}