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

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    background: #0a0a1a;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a2a 100%);
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    pointer-events: none;
    z-index: 10;
}

#score {
    font-size: 2rem;
    font-weight: 900;
    color: #00ff00;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    margin-bottom: 10px;
}

#high-score {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

#level-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    margin-bottom: 5px;
}

#pattern-name {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-style: italic;
}

#lives {
    font-size: 1.5rem;
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.difficulty-select {
    margin-bottom: 30px;
    text-align: center;
}

.difficulty-select h3 {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.diff-btn {
    padding: 10px 25px;
    margin: 0 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.diff-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.diff-btn.selected {
    background: linear-gradient(135deg, #00ff00, #00ffff);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

#level-complete-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.95);
    z-index: 200;
    color: white;
}

#level-complete-screen.hidden {
    display: none;
}

#level-complete-screen h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    color: #00ff00;
    text-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
    margin-bottom: 20px;
}

#next-level-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

#start-screen,
#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.95);
    z-index: 100;
    color: white;
}

#start-screen.hidden,
#game-over-screen.hidden {
    display: none;
}

#start-screen h1,
#game-over-screen h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, #00ff00, #00ffff, #ff00ff, #00ff00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    text-align: center;
}

.instructions {
    margin-bottom: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.key {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin: 0 5px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

#start-btn,
#restart-btn {
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #00ff00, #00ffff);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(0, 255, 0, 0.3);
}

#start-btn:hover,
#restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 255, 0, 0.5);
}

#start-btn:active,
#restart-btn:active {
    transform: scale(0.98);
}

.final-score {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 700;
}

#final-score-value {
    color: #00ff00;
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}
