
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --bg-color: #2c2c2c;
    --text-color: #f0f0f0;
    --primary-color: #d9534f; /* A Soviet-style red */
    --platform-color: #5cb85c;
    --bonus-color: #f0ad4e;
    --penalty-color: #777;
    --goal-color: #428bca;
    --player-color: #ffffff;
    --font-family: 'Press Start 2P', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 4px solid var(--text-color);
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    font-family: var(--font-family);
}

h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#ui {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 0.9rem;
}

#ui .ui-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#ui .toggles {
    display: flex;
    gap: 10px;
    align-items: center;
}

#ui .toggles label {
    display: flex;
    gap: 6px;
    align-items: center;
    font-family: var(--font-family);
    font-size: 0.75rem;
}

#ui .toggles input[type="checkbox"] {
    transform: scale(1.1);
}

#mute-btn {
    background: none;
    border: 2px solid var(--text-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    font-family: sans-serif;
}

#mute-btn:hover {
    background-color: var(--primary-color);
}

#game-canvas {
    background-color: #1a1a1a;
    border: 2px solid var(--text-color);
    max-width: 100%;
    height: auto;
    image-rendering: pixelated; /* Ensures crisp pixels */
}

#touch-controls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    user-select: none;
}

#touch-controls .row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    align-items: center;
}

#touch-controls button {
    font-family: var(--font-family);
    background: rgba(255,255,255,0.08);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 1;
}

#touch-controls .btn-up { grid-column: 2; grid-row: 1; }
#touch-controls .btn-left { grid-column: 1; grid-row: 2; }
#touch-controls .btn-down { grid-column: 2; grid-row: 2; }
#touch-controls .btn-right { grid-column: 3; grid-row: 2; }

#touch-controls button:active {
    transform: translateY(1px);
    background: rgba(255,255,255,0.15);
}

@media (max-width: 650px) {
    #touch-controls button { font-size: 18px; padding: 12px 16px; }
}

#game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    font-family: var(--font-family);
}

#game-overlay.active {
    display: flex;
}

#game-overlay h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

#game-overlay p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.cta-btn {
    margin-top: 10px;
    padding: 10px 16px;
    border: 2px solid var(--text-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-family);
    cursor: pointer;
}
.cta-btn:hover { background: rgba(255,255,255,0.08); }

.prompt {
    margin-top: 30px;
    font-size: 1rem;
    color: var(--bonus-color);
    animation: blink 1.5s linear infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 650px) {
    h1 {
        font-size: 1.2rem;
    }
     #ui {
        font-size: 0.7rem;
    }
    #game-overlay h2 {
        font-size: 1.5rem;
    }
    #game-overlay p {
        font-size: 0.8rem;
    }
    .prompt {
        font-size: 0.8rem;
    }
}

