:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --player1-accent: #00f0f0;
    --player2-accent: #ff00ff;
    --modern-font: 'Outfit', sans-serif;
    --retro-font: 'Courier New', Courier, monospace;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, #001a33 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--modern-font);
    color: #fff;
    overflow: hidden;
    gap: 2rem;
}

.game-container {
    display: flex;
    flex-direction: column;
    /* Stack game and footers vertically */
    align-items: center;
    position: relative;
    gap: 0.5rem;
    /* Gap between game and footers */
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-layout {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.player-area {
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0rem;
    padding: 0.1rem 10px;
    /* 10px horizontal padding as requested */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    min-height: 720px;
    /* Increased height to allow the message to move lower */
    position: relative;
    justify-content: flex-start;
}

.player-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0rem;
    width: 100%;
}

.player-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.7;
}

#player1-area .player-title {
    color: var(--player1-accent);
}

#player2-area .player-title {
    color: var(--player2-accent);
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

canvas {
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: block;
}

#canvas1 {
    border: 2px solid var(--player1-accent);
    box-shadow: 0 0 20px rgba(0, 240, 240, 0.1);
}

#canvas2 {
    border: 2px solid var(--player2-accent);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.1);
}

/* CENTRAL PANEL - KEEPS RETRO FEEL */
.central-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    /* Reduced gap */
    min-width: 280px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0.4rem;
    /* Tighter padding */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 680px;
    /* Matches player-area height */
    box-sizing: border-box;
}

.game-logo {
    max-width: 226px;
    padding-top: 20px;
    height: auto;
    border-radius: 15px;
    filter: drop-shadow(0 0 15px rgba(0, 240, 240, 0.5));
    margin-bottom: 0.2rem;
}

.level-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0px;
    margin-top: 0.8rem;
}

.level-indicator-box {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #001121;
    display: flex;
    justify-content: center;
    align-items: center;
}

.level-indicator {
    font-family: var(--retro-font);
    font-size: 1.35rem;
    color: #ef4444;
    font-weight: 800;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    margin: 0;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    width: 100%;
    box-sizing: border-box;
}

.central-panel_quotas {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #001121;
    margin-bottom: 0px;
    margin-top: 0.8rem;
}

.quota-title {
    font-family: var(--retro-font);
    color: #e1e1e1;
    font-size: 1.35rem;
    margin: 0;
    letter-spacing: 8px;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.quota-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.2rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-bottom: 4px;
    /* Visual separation between quota frames */
}

.quota-group:first-of-type {
    margin-top: 0;
}

.quota-label {
    font-family: var(--retro-font);
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
}

.quota-values {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-family: var(--retro-font);
    padding: 0 10px;
    box-sizing: border-box;
}

.quota-value {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 2ch;
    text-align: center;
}

/* Retro Quota Colors & Frames */
.q1 {
    border-color: rgba(255, 255, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.1);
}

.q1 .quota-label,
.q1 .quota-value {
    color: #ffff00;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.3);
}

.q2 {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.q2 .quota-label,
.q2 .quota-value {
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.q3 {
    border-color: rgba(0, 255, 0, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

.q3 .quota-label,
.q3 .quota-value {
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.q4 {
    border-color: rgba(255, 0, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.1);
}

.q4 .quota-label,
.q4 .quota-value {
    color: #ff00ff;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
}

.instructions {
    margin-top: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background-color: #001121;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
}

.controls-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0px;
    width: 100%;
}

.instruction-p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 85%;
    padding: 0.4rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);

}

.game-footer_1 {
    margin-top: 0.2rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid var(--glass-border);
    padding: 6px 0px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(160, 160, 160, 0.825);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
    border-radius: 10px;
}

.game-footer_2 {
    margin-top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid var(--glass-border);
    padding: 6px 0px;
    /* Reduced padding */
    text-align: center;
    font-size: 0.8rem;
    color: rgba(160, 160, 160, 0.825);
    letter-spacing: 0px;
    text-transform: uppercase;
    font-weight: 300;
    border-radius: 10px;
}

.name-highlight {
    font-weight: 900;
    font-size: 100%;
    color: #ffffff;
}

.start-message {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 1.5s infinite;
    margin-top: 0.2rem;
    opacity: 0.8;
}

@keyframes cinematicFade {
    0% {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(4px);
    }

    20%,
    80% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px);
        filter: blur(4px);
    }
}

.game-over {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 0;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    animation: cinematicFade 2s infinite ease-in-out;
    text-align: center;
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity, filter;
}

.message-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.game-over:empty {
    display: none;
    /* Hide if no message so it doesn't take space */
}