/* Game specific styles for Cavern Crawler */

/* Using a class for the game wrapper to avoid polluting global body styles too much,
   though for this specific page we want the background to match */
.game-page-body {
    background-color: #0d0a08;
    overflow: hidden; /* Prevent scrolling on the game page */
    touch-action: none;
    user-select: none;
}

#game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#gameContainer {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    color: #ffcc88;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#uiLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hud-info {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
}

#startOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: auto;
    z-index: 100;
    cursor: pointer;
}

#startOverlay h1 { font-size: 50px; margin: 0 0 10px 0; color: #ffcc88; letter-spacing: 5px; text-transform: uppercase; }
#startOverlay p { color: #aaa; font-size: 18px; margin-top: 20px; animation: pulse 2s infinite; }

@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

.controls-overlay {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 20px;
}

.touch-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    user-select: none;
    margin: 10px;
}
.touch-btn:active { background: rgba(255, 200, 100, 0.5); }

.crawl-btn { width: 80px; height: 80px; border-radius: 10px; background: rgba(255, 100, 100, 0.2); border-color: #ff5555; font-weight: bold; }

#blockedMsg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff5555;
    font-weight: bold;
    display: none;
    text-shadow: 1px 1px 0 #000;
    font-size: 24px;
    width: 100%;
    text-align: center;
}

#climbMsg {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #88ff88;
    font-weight: bold;
    display: none;
    text-shadow: 1px 1px 0 #000;
    font-size: 20px;
    width: 100%;
    text-align: center;
}
