/* Page-wide rules: reset, colors, the body, the mountain backdrop
   behind the board, the game container, the version stamp. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --home-map-sky-top: #d7b07d;
    --home-map-sky-mid: #7c8799;
    --home-map-sky-low: #263549;
    --home-map-night: #111722;
    --home-map-panel: rgba(20, 26, 39, 0.82);
    --home-map-panel-edge: rgba(255, 233, 201, 0.16);
    --home-map-copy: rgba(243, 238, 226, 0.86);
    --home-map-gold: #f2c46d;
    --home-map-sage: #9dc4ab;
    --home-map-ink: #eff5f8;
}

body {
    background: linear-gradient(180deg, #141628, #1a1a2e 55%, #221a29);
    color: #eee;
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow-x: hidden;
}

body.home-map-mode {
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    background: linear-gradient(180deg, #05070f, #101322 60%, #1b1526);
}

/* Alpenglow layer that strengthens as the player climbs a route. */
#sky-shift {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1100ms ease;
    background: linear-gradient(
        180deg,
        #322a5e,
        #4a3465 40%,
        #94605a 76%,
        #d3925f
    );
}

/* Parallax mountain behind the board; layers slide with the camp camera
   and sink as the player climbs. */
#climb-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

body.home-map-mode #climb-scene,
body.home-map-mode #sky-shift {
    display: none;
}

.climb-clouds {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.climb-layer {
    position: absolute;
    left: -15%;
    top: 0;
    width: 130%;
    height: 100%;
    will-change: transform;
}

.climb-layer--sky {
    left: -2%;
    width: 104%;
}

.climb-layer--far {
    opacity: 0.85;
}

.climb-layer--mid {
    opacity: 0.92;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#game-container.home-map-secondary {
    width: min(1120px, 100%);
    margin: 0 auto;
    opacity: 0.25;
    filter: saturate(0.55);
    pointer-events: none;
}

#game-container.home-map-secondary #board-slot,
#game-container.home-map-secondary #ascent,
#game-container.home-map-secondary #hud,
#game-container.home-map-secondary #corner-controls,
#game-container.home-map-secondary #message {
    display: none !important;
}

#version {
    position: fixed;
    bottom: 8px;
    right: 12px;
    /* Stays clickable above the full-bleed map (dev-lab entry). */
    z-index: 60;
    font-size: 13px;
    font-weight: 600;
    color: rgba(235, 245, 255, 0.82);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

#build-id {
    color: rgba(170, 210, 235, 0.88);
}

#version.dev-clickable {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    #game-container {
        gap: 10px;
        width: 100%;
    }
}

@media (max-width: 500px) {
    body {
        padding: 5px;
    }
}
