/* YAMA TV Arcade Game Framework CSS */
/* Shared styles for all arcade games */

/* Page structure styles */
.arcade-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    min-height: 400px;
}

.game-section {
    margin-top: 0;
    margin-bottom: 10px;
    padding: 0;
}

.game-section h2 {
    text-align: left;
    color: #ff0000;
    font-family: 'Special Elite', monospace;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
    padding: 0;
}

.game-section p {
    color: #ffffff;
    font-family: 'Special Elite', monospace;
    text-align: left;
    margin-bottom: 20px;
    padding: 0;
}

/* Game container styles */
#game-container {
    width: 100%;
    margin: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: visible; /* Allow mobile control area to extend outside */
}

#game-header {
    margin: 10px 0 5px 0;
}

#game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 5px 0;
    background: rgba(0, 0, 0, 0.6);
    gap: 0;
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.stat-item:first-child {
    align-items: flex-start;
    justify-content: flex-start;
}

.stat-item:nth-child(2) {
    align-items: center;
    justify-content: center;
}

.stat-item:last-child {
    align-items: flex-end;
    justify-content: flex-end;
}

.stat-label {
    color: #8fd938;
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    margin-bottom: 0;
}

.stat-item span:last-child {
    color: #ffffff;
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    font-weight: bold;
}

#current-score, #high-score, #top-playa-name {
    color: #ffffff;
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    font-weight: bold;
}

/* Button styles */
#start-btn, #restart-btn, #play-again, #submit-score {
    background: #8fd938 !important;
    color: #000 !important;
    border: 2px solid #8fd938 !important;
    padding: 10px 25px !important;
    font-family: 'Special Elite', monospace !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background 0.3s !important;
    min-width: 140px !important;
    box-sizing: border-box !important;
}

#start-btn:hover, #restart-btn:hover, #play-again:hover, #submit-score:hover {
    background: #7bc030 !important;
}

/* Canvas styles - Standardized aspect ratio for all games */
#game-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 100 / 71.5;
    background: #000;
    border: 2px solid #8fd938;
    touch-action: none;
    position: relative;
}

/* Mobile control area - positioned to the left of canvas */
#mobile-control-area {
    position: absolute;
    left: -150px; /* Extend further left to reach phone edge */
    top: -200px; /* Extend above canvas by 200px */
    width: 145px; /* Wider control area reaching to phone edge */
    height: calc(100% + 400px); /* Canvas height + 400px (200px top + 200px bottom) */
    background: transparent;
    z-index: 10;
    touch-action: none;
    pointer-events: auto;
}

/* Hide mobile control area on desktop */
@media (min-width: 700px) {
    #mobile-control-area {
        display: none;
    }
}

/* Game over screen - Centered within canvas container */
#game-over {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #8fd938;
    padding: 12px 15px;
    text-align: center;
    z-index: 1000;
    max-width: 350px;
    max-height: 70vh;
    overflow-y: auto;
}

.game-over-content h2 {
    color: #DC143C;
    font-family: 'Special Elite', monospace;
    margin: 0 0 8px 0;
    padding: 0;
    text-align: center;
    font-size: 1.3em;
}

.game-over-content p {
    color: #ffffff;
    font-family: 'Special Elite', monospace;
    margin: 0 0 10px 0;
    padding: 0;
    text-align: center;
    font-size: 0.9em;
}

#name-input-section {
    text-align: center;
    margin-bottom: 10px;
}

#player-name {
    padding: 6px 10px;
    border: 2px solid #8fd938;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-family: 'Special Elite', monospace;
    text-align: center;
    display: block;
    margin: 0 auto 8px auto;
    width: 80%;
    max-width: 220px;
    font-size: 0.9em;
}

/* Mobile responsive game over layout */
@media (max-width: 700px) {
    #game-over {
        top: 50%;
        max-width: 95%;
        min-width: 280px;
        max-height: 40vh;
        padding: 6px 10px;
        transform: translate(-50%, -50%);
        margin-top: 25px;
    }
    
    .game-over-content h2 {
        font-size: 0.95em;
        margin: 0 0 4px 0;
    }
    
    .game-over-content p {
        font-size: 0.75em;
        margin: 0 0 5px 0;
    }
    
    #name-input-section {
        margin-bottom: 5px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        justify-content: center;
    }
    
    #player-name {
        flex: 1;
        min-width: 0;
        margin: 0;
        font-size: 0.75em;
        padding: 5px 6px !important;
    }
    
    #submit-score {
        flex-shrink: 0;
        padding: 5px 8px !important;
        font-size: 0.75em !important;
        margin: 0;
        min-width: auto !important;
    }
    
    #play-again {
        margin-top: 4px;
        padding: 6px 10px !important;
        font-size: 0.75em !important;
    }
}

/* Leaderboard styles */
#leaderboard {
    margin: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 0 5px 0;
}

#leaderboard h3 {
    color: #8fd938;
    font-family: 'Special Elite', monospace;
    text-align: left;
    margin-bottom: 15px;
    padding: 0;
}

#scores-list {
    padding: 0;
    margin: 0;
}

#scores-list p {
    margin: 0;
    padding: 0;
}

/* Mobile responsive */
@media (max-width: 700px) {
    #game-container {
        padding: 0;
    }
    
    #game-stats {
        gap: 10px;
    }
}
