:root {
    --neon-blue: #0ff;
    --neon-pink: #f0f;
    --neon-green: #0f0;
    --bg-color: #050505;
    --ui-bg: rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: white;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

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

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s;
}

.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* Typography & Glow */
.glow-text {
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* UI Elements */
#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none; /* Pass clicks through */
}

#pause-btn {
    pointer-events: auto;
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 5px var(--neon-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Reset padding for centering */
    line-height: 1;
}

#score-board {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #333;
}

#active-powerups {
    display: flex;
    gap: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 80px; /* Below scoreboard */
}

.powerup-badge {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 0 10px white;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-box.player { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.score-box.computer { color: var(--neon-pink); text-shadow: 0 0 5px var(--neon-pink); }

.score-box span.label {
    font-size: 0.7rem;
    opacity: 0.7;
}

.score-box span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Controls & Inputs */
.settings-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

label {
    color: #aaa;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.button-group {
    display: flex;
    gap: 15px;
}

.button-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 200px;
}

button {
    background: transparent;
    border: 1px solid #555;
    color: white;
    padding: 12px 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    border-radius: 5px;
}

button:hover, button.active {
    background: var(--neon-blue);
    color: black;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

.start-btn {
    border-color: var(--neon-green);
    color: var(--neon-green);
    font-size: 1.2rem;
    padding: 15px 40px;
    width: 100%;
}

.start-btn:hover {
    background: var(--neon-green);
    color: black;
    box-shadow: 0 0 20px var(--neon-green);
}

.main-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

.tutorial-btn {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    font-size: 1rem;
    padding: 10px 20px;
    width: 100%;
}

.tutorial-btn:hover {
    background: var(--neon-blue);
    color: black;
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Tutorial Content */
.tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
    text-align: left;
    max-width: 500px;
}

.tut-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

.tut-item .icon {
    font-size: 2rem;
}

.tut-item p {
    margin: 0;
    font-size: 1rem;
    color: #ccc;
    line-height: 1.4;
}

.tut-item strong {
    color: white;
    font-size: 1.1rem;
}

/* Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #333;
    border-radius: 3px;
    border: 1px solid #555;
}

input[type=range]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--neon-blue);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Color Picker */
.color-group {
    display: flex;
    gap: 15px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #555;
    background: var(--btn-color);
    box-shadow: 0 0 5px var(--btn-color);
    padding: 0;
}

.color-btn:hover, .color-btn.active {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--btn-color);
}


/* Number Input Control */
.number-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-control input {
    background: transparent;
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    width: 60px;
    text-align: center;
}

.number-control button {
    padding: 5px 15px;
    font-size: 1.2rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .glow-text { font-size: 2rem; }
    button { padding: 10px 20px; font-size: 0.9rem; }
    .start-btn { font-size: 1rem; }
    #game-ui { padding: 10px; }
}
