/* === GAME PAGE (TETRIS) === */
.game-page {
    display: none;
    /* Managed by page system */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    padding: 10px;
    background: #1a1a1a;
    overflow: hidden;
    /* Prevent scrolling while playing */
}

/* === HEADER === */
.game-header {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}

.game-header h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(to right, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* === SCORE DISPLAY (CENTRAL) === */
/* === SCORE DISPLAY (TOP COMPACT) === */
.score-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex: 0 0 auto;
    /* Don't expand */
}

.score-display {
    font-family: 'Courier New', monospace;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    align-items: baseline;
    gap: 15px;
}

.score-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    margin: 0;
}

/* === SWIPE AREA (FILLS REMAINING SPACE) === */
.swipe-area {
    flex: 1;
    /* Take all remaining vertical space */
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    touch-action: none;
    /* Critical for swipe */
    position: relative;
}

.swipe-area::after {
    content: "SWIPE AREA";
    color: rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
}


/* === TOP CONTROLS (Back / Start) === */
.top-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

.top-controls .control-btn {
    flex: 1;
    min-height: 50px;
    font-size: 0.9rem;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
}


/* === CONTROLS WRAPPER === */
.game-controls {
    display: none;
    /* Hidden to favor Swipe gestures */
    width: 100%;
    max-width: 320px;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 100px;
}

/* === SIMON CONTROLS (Visible) === */
.simon-controls {
    display: flex;
    /* Override the hidden game-controls */
    width: 100%;
    max-width: 320px;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

/* === D-PAD LAYOUT === */
.dpad-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

/* === GAME BUTTONS === */
.game-btn {
    width: 95px;
    /* Increased from 80px */
    height: 95px;
    /* Increased from 80px */
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #2a2a3a, #1a1a1a);
    box-shadow: 6px 6px 12px #0f0f15, -6px -6px 12px #35354f;
    color: #fff;
    font-size: 2.2rem;
    /* Increased font size */
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    touch-action: manipulation;
    /* Disable double-tap zoom */
    transition: all 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.game-btn:active {
    box-shadow: inset 5px 5px 10px #0f0f15, inset -5px -5px 10px #35354f;
    transform: scale(0.95);
    color: #00ffff;
}

/* Specific styling for bigger rotate button if needed, 
   or keep uniform. Let's make the rotate button distinct. */
#btnRotate,
#btnSnakeUp {
    background: linear-gradient(145deg, #3a3a4a, #2a2a3a);
    color: #FFD700;
    font-size: 2rem;
    margin-bottom: 5px;
}



/* === RESPONSIVE TWEAKS === */
@media (max-height: 700px) {

    /* For smaller screens, reduce gaps */
    .game-header {
        margin-bottom: 5px;
    }

    .top-controls {
        margin-bottom: 10px;
    }

    .game-btn {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }

    .score-value {
        font-size: 2.5rem;
    }
}