@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

body {
    background-color: #021a10;
    color: #00ff00;
    font-family: 'Space Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    padding: 10px 0;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle, transparent 20%, #000 120%);
    pointer-events: none;
    z-index: 999;
}

#main-menu, #game-container {
    width: 100%;
    max-width: 840px;
    background: rgba(2, 30, 20, 0.85);
    padding: 20px;
    border: 1px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.15);
    position: relative;
    box-sizing: border-box;
    border-radius: 4px;
}

.logo {
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    font-weight: 900;
    margin-bottom: 5px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8), 2px 2px 0px rgba(0, 255, 0, 0.8);
    padding-bottom: 5px;
}

.meta-stats {
    font-size: 1.1em;
    color: #00ff00;
    margin-top: 5px;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.menu-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#class-selection {
    margin-bottom: 10px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.05);
    padding: 10px;
}

.panel-title {
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}
.panel-title.lg { font-size: 1.5em; margin-bottom: 8px; }

.class-list {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.start-action {
    text-align: center;
    margin-top: 15px;
}

button {
    background: rgba(0, 255, 0, 0.1);
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 6px 12px;
    margin: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

button:hover {
    background: #00ffff;
    color: #001a00;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    transform: scale(1.05);
}

button.pulse-btn {
    font-size: 1.1em;
    padding: 10px 25px;
    border-color: #00ff00;
    color: #00ff00;
    animation: neon-pulse 1.5s infinite alternate;
}

@keyframes neon-pulse {
    from { box-shadow: 0 0 10px rgba(0, 255, 0, 0.5), inset 0 0 5px rgba(0, 255, 0, 0.5); }
    to { box-shadow: 0 0 30px rgba(0, 255, 0, 1), inset 0 0 15px rgba(0, 255, 0, 1); }
}

#stats {
    display: flex;
    justify-content: space-between;
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    color: #00b300;
}

#stats span { color: #00ffff; text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }

#text-display {
    font-size: 1.3em;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 80px;
    background: rgba(0, 30, 20, 0.9);
    padding: 15px;
    border: 1px solid rgba(0, 255, 204, 0.5);
    box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.2);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.8);
}

.correct { color: #008000; font-weight: normal; }
.incorrect { color: #000; background: #00ffff; }
.current { 
    border-bottom: 3px solid #00ff00; 
    color: #fff; 
    font-weight: bold; 
    background: rgba(0, 255, 0, 0.2);
    text-shadow: 0 0 10px #00ff00;
}

#type-input {
    width: 100%;
    background: rgba(0, 30, 20, 0.9);
    border: 1px solid #00ffcc;
    color: #00ffff;
    padding: 12px 18px;
    font-family: 'Space Mono', monospace;
    font-size: 1.2em;
    box-sizing: border-box;
    box-shadow: inset 0 0 10px rgba(0, 255, 204, 0.2);
}

#type-input:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    border-color: #00ffff;
}

#visuals {
    margin-top: 15px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 255, 204, 0.5);
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 255, 204, 0.15);
}

#gameCanvas {
    background: transparent;
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    box-sizing: border-box;
}

#shop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 13, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border: 2px solid #00ffff;
    box-shadow: inset 0 0 50px rgba(0, 255, 255, 0.2);
}

.shop-score {
    color: #00ff00; 
    text-align: center; 
    font-size: 1.5em; 
    font-weight: 700; 
    margin-bottom: 10px; 
    text-shadow: 0 0 10px #00ff00;
    font-family: 'Orbitron', sans-serif;
}

.shop-slots {
    color: #00ffff; 
    text-align: center; 
    margin-bottom: 15px;
    font-size: 0.9em;
}

.shop-stats-view {
    color: #fff; 
    text-align: center; 
    font-size: 0.85em; 
    margin-bottom: 20px;
    line-height: 1.5;
    background: rgba(0, 255, 255, 0.1);
    padding: 10px 20px;
    border: 1px solid #00ffff;
}

.shop-items {
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    margin-bottom: 20px;
}

.shop-actions {
    text-align: center; 
    margin-bottom: 10px;
}

.hidden { display: none !important; }

button.alt-btn {
    border-color: #00ff00;
    color: #00ff00;
    background: transparent;
}
button.alt-btn:hover {
    background: #00ff00;
    color: #000c00;
}

button.glow-btn {
    border-color: #00ffff;
}

button:disabled {
    background: #001a00;
    color: #009900;
    border-color: #004d00;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#keyboard {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.key-row {
    display: flex;
    gap: 6px;
}
.key {
    width: 36px;
    height: 36px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    color: #00cc00;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.1);
}
.key.space { width: 250px; }
.key.active { 
    background: rgba(0, 255, 255, 0.2); 
    color: #00ffff; 
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

/* Dynamic internal scaling deleted. Relies on structural outer container sizing. */
