/* Pixel Art Font - Retro Arcade Style */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    gap: 15px;
    padding: 20px;
}

/* Game Container - Square format */
.game-container {
    width: 700px;
    height: 700px;
    position: relative;
    background-color: #16213e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 4px #0f3460,
        0 0 40px rgba(94, 53, 177, 0.3);
}

/* Scenes */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.scene.active {
    opacity: 1;
    visibility: visible;
}

/* Scene Background */
.scene-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder for missing images */
.scene-bg.placeholder {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #e94560;
    font-size: 1.2rem;
    gap: 15px;
    text-shadow: 2px 2px 0 #9b2c3d;
}

.scene-bg.placeholder small {
    font-size: 0.6rem;
    color: #888;
    text-shadow: none;
}

/* Credits Background - Retro Style */
.credits-bg {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 40px;
}

.credits-bg h1 {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #e94560;
    text-shadow: 3px 3px 0 #9b2c3d;
    line-height: 1.6;
}

.credits-bg p {
    font-size: 0.7rem;
    margin-bottom: 15px;
    line-height: 2;
}

.credits-text {
    margin-top: 30px;
    padding: 25px;
    background: #0f3460;
    box-shadow:
        0 0 0 4px #e94560,
        6px 6px 0 4px rgba(0, 0, 0, 0.3);
}

/* Map Location Lights */
.map-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-light {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: auto;
    cursor: default;
    border: 3px solid #440000;
    background: #2a0000;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: background 0.3s, box-shadow 0.3s;
}

/* Large invisible tap target for kids (~70x70px) */
.map-light::before {
    content: '';
    position: absolute;
    top: -22px;
    left: -22px;
    right: -22px;
    bottom: -22px;
    border-radius: 50%;
}

/* Blinking state - next location to visit */
.map-light.active {
    cursor: pointer;
    background: #ff1a1a;
    border-color: #ff4444;
    box-shadow:
        0 0 6px #ff0000,
        0 0 16px rgba(255, 0, 0, 0.6),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        inset 0 2px 3px rgba(255, 150, 150, 0.4);
    animation: light-blink 1s ease-in-out infinite;
}

/* Visited state - solid red, still clickable */
.map-light.visited {
    cursor: pointer;
    background: #cc0000;
    border-color: #ff3333;
    box-shadow:
        0 0 4px rgba(255, 0, 0, 0.4),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        inset 0 2px 3px rgba(255, 100, 100, 0.3);
}

@keyframes light-blink {
    0%, 100% {
        background: #ff1a1a;
        box-shadow:
            0 0 6px #ff0000,
            0 0 16px rgba(255, 0, 0, 0.6),
            inset 0 -2px 3px rgba(0, 0, 0, 0.3),
            inset 0 2px 3px rgba(255, 150, 150, 0.4);
    }
    50% {
        background: #880000;
        box-shadow:
            0 0 2px #ff0000,
            0 0 6px rgba(255, 0, 0, 0.2),
            inset 0 -2px 3px rgba(0, 0, 0, 0.3),
            inset 0 2px 3px rgba(255, 100, 100, 0.1);
    }
}

/* Map light name labels */
.map-label {
    font-family: 'Press Start 2P', monospace;
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    pointer-events: none;
}

/* Show label when light is active (blinking) or visited */
.map-light.active .map-label,
.map-light.visited .map-label,
.map-light.revealed .map-label {
    opacity: 1;
    visibility: visible;
}

/* Position map lights (2048x2048 source image) */
.map-light[data-location="1"] { top: 42%; left: 17.6%; }
.map-light[data-location="2"] { top: 60.5%; left: 7.3%; }
.map-light[data-location="3"] { top: 52.2%; left: 18%; }
.map-light[data-location="4"] { top: 48.3%; left: 53.7%; }

/* UI Overlay - Bottom buttons */
.ui-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

/* Buttons - Retro Pixel Art Style */
.btn-main {
    font-family: 'Press Start 2P', cursive;
    background: #e94560;
    color: white;
    border: none;
    padding: 18px 28px;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease;
    /* Pixel art border effect */
    box-shadow:
        0 6px 0 #9b2c3d,
        0 8px 0 #1a1a2e,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.2);
    border-radius: 0;
    image-rendering: pixelated;
    text-shadow: 2px 2px 0 #9b2c3d;
}

.btn-main:hover {
    transform: translateY(2px);
    box-shadow:
        0 4px 0 #9b2c3d,
        0 6px 0 #1a1a2e,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.2);
}

.btn-main:active {
    transform: translateY(6px);
    box-shadow:
        0 0 0 #9b2c3d,
        0 2px 0 #1a1a2e,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    font-family: 'Press Start 2P', cursive;
    background: #0f3460;
    color: #e94560;
    border: none;
    padding: 14px 20px;
    font-size: 0.7rem;
    line-height: 1.4;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease;
    /* Pixel art border effect */
    box-shadow:
        0 4px 0 #091b36,
        0 6px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        inset 0 3px 0 rgba(255, 255, 255, 0.1);
    border-radius: 0;
    text-shadow: 1px 1px 0 #091b36;
}

.btn-secondary:hover {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #091b36,
        0 4px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        inset 0 3px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 #091b36,
        0 2px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        inset 0 3px 0 rgba(255, 255, 255, 0.1);
}

/* START Button - Bright Green Arcade Style */
.btn-start {
    font-family: 'Press Start 2P', monospace;
    background: #2ecc40;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease;
    box-shadow:
        0 5px 0 #25a233,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.3);
    border-radius: 0;
    text-shadow: 2px 2px 0 #1a7a0a;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.btn-start:hover {
    transform: translateY(2px);
    box-shadow:
        0 3px 0 #29b80f,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.3);
}

.btn-start:active {
    transform: translateY(5px);
    box-shadow:
        0 0 0 #29b80f,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.3);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 5px 0 #25a233,
            0 0 20px rgba(46, 204, 64, 0.4),
            inset 0 -4px 0 rgba(0, 0, 0, 0.2),
            inset 0 4px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 5px 0 #25a233,
            0 0 40px rgba(46, 204, 64, 0.7),
            inset 0 -4px 0 rgba(0, 0, 0, 0.2),
            inset 0 4px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Start screen button positioning - higher up */
#scene-start .ui-overlay {
    bottom: auto;
    top: 32%;
}

/* Icon Buttons - Retro pixel art style */
.btn-icon {
    position: absolute;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 0;
    border: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.1s ease;
    text-align: center;
    line-height: 50px;
    padding: 0;
    image-rendering: pixelated;
}

.btn-icon:hover {
    transform: translateY(2px);
}

.btn-icon:active {
    transform: translateY(4px);
}

/* Info button - bottom left, yellow */
.btn-info {
    left: 20px;
    background: #ffeb3b;
    color: #1a1a2e;
    font-style: italic;
    font-weight: bold;
    text-shadow: none;
    box-shadow:
        0 4px 0 #c6a700,
        0 6px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
}

.btn-info:hover {
    box-shadow:
        0 2px 0 #c6a700,
        0 4px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
}

.btn-info:active {
    box-shadow:
        0 0 0 #c6a700,
        0 2px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
}

/* Compass button - bottom right, gray by default */
.btn-compass {
    right: 20px;
    background: #555;
    color: #333;
    font-style: normal;
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow:
        0 4px 0 #333,
        0 6px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        inset 0 3px 0 rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.85;
}


.btn-compass:hover {
    transform: none;
}

/* Compass button - green when game is complete */
.btn-compass.complete {
    background: #2ecc40;
    color: #fff;
    cursor: pointer;
    opacity: 1;
    text-shadow: 2px 2px 0 #1a7a0a;
    box-shadow:
        0 4px 0 #25a233,
        0 6px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
    animation: compass-glow 1.5s ease-in-out infinite;
}

.btn-compass.complete:hover {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #25a233,
        0 4px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
}

.btn-compass.complete:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 #25a233,
        0 2px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
}

@keyframes compass-glow {
    0%, 100% {
        box-shadow:
            0 4px 0 #25a233,
            0 0 12px rgba(46, 204, 64, 0.4),
            inset 0 -3px 0 rgba(0, 0, 0, 0.2),
            inset 0 3px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 4px 0 #25a233,
            0 0 25px rgba(46, 204, 64, 0.7),
            inset 0 -3px 0 rgba(0, 0, 0, 0.2),
            inset 0 3px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Info Box - Retro Scroll Style */
.info-box {
    font-family: 'Press Start 2P', cursive;
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 30, 0.92);
    color: #ffeb3b;
    padding: 22px 28px;
    max-width: 85%;
    text-align: center;
    font-size: 0.65rem;
    line-height: 2.2;
    border: 3px solid #ffeb3b;
    border-radius: 4px;
    box-shadow:
        0 0 12px rgba(255, 235, 59, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(10px);
    z-index: 15;
}

.info-box.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dialog Box - Pokemon Style */
.dialog-box {
    font-family: 'Press Start 2P', monospace;
    width: 700px;
    min-height: 100px;
    background: #1a1a2e;
    color: #fff;
    padding: 20px 25px;
    font-size: 0.75rem;
    line-height: 2.2;
    position: relative;
    /* Pixel border effect */
    border: 4px solid #fff;
    box-shadow:
        inset 0 0 0 3px #1a1a2e,
        inset 0 0 0 6px #0f3460,
        4px 4px 0 rgba(0, 0, 0, 0.3);
}

.dialog-box p {
    margin: 0;
    min-height: 3.5em;
}

/* Highlighted uppercase words in dialog */
.dialog-highlight {
    color: #ffeb3b;
    text-shadow: 1px 1px 0 #f57f17;
}

/* Blinking indicator */
.dialog-indicator {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: #fff;
    opacity: 0;
    animation: blink-indicator 1s ease-in-out infinite;
}

.dialog-indicator.visible {
    opacity: 1;
}

@keyframes blink-indicator {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* Dome Mini-Game */
.dome-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.dome {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease;
}

/* Position the 5 domes based on pixel coords (1024x1024 source image) */
.dome[data-dome="1"] { top: 1.8%; left: 42.7%; }
.dome[data-dome="2"] { top: 21.4%; left: 20.2%; }
.dome[data-dome="3"] { top: 21.4%; left: 34.8%; }
.dome[data-dome="4"] { top: 31.1%; left: 49%; }
.dome[data-dome="5"] { top: 21.4%; left: 59.3%; }

.dome:hover {
    transform: scale(1.1);
}


/* Star glint / sun reflection effect */
.spark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55px;
    height: 55px;
    transform: translate(-50%, -50%);
    animation: spark-pulse 1.8s ease-in-out infinite;
}

/* Vertical ray */
.spark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom,
        transparent 0%,
        #fff 20%,
        #ffeb3b 50%,
        #fff 80%,
        transparent 100%);
    box-shadow: 0 0 8px #ffeb3b, 0 0 20px rgba(255, 235, 59, 0.5);
}

/* Horizontal ray */
.spark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    background: linear-gradient(to right,
        transparent 0%,
        #fff 20%,
        #ffeb3b 50%,
        #fff 80%,
        transparent 100%);
    box-shadow: 0 0 8px #ffeb3b, 0 0 20px rgba(255, 235, 59, 0.5);
}

/* Diagonal rays via the dome element itself */
.dome::before,
.dome::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

/* Diagonal ray: top-left to bottom-right */
.dome::before {
    width: 3px;
    height: 46px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 25%,
        #ffeb3b 50%,
        rgba(255, 255, 255, 0.8) 75%,
        transparent 100%);
    box-shadow: 0 0 6px rgba(255, 235, 59, 0.4);
}

/* Diagonal ray: top-right to bottom-left */
.dome::after {
    width: 3px;
    height: 46px;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 25%,
        #ffeb3b 50%,
        rgba(255, 255, 255, 0.8) 75%,
        transparent 100%);
    box-shadow: 0 0 6px rgba(255, 235, 59, 0.4);
}

/* Elbrus Climbing Mini-Game */
.climber {
    position: absolute;
    left: 13.5%;
    bottom: 7.1%;
    width: 110px;
    height: auto;
    image-rendering: pixelated;
    transition: left 0.4s ease, bottom 0.4s ease, width 0.4s ease;
    z-index: 5;
}

.climb-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 10;
}

.climb-arrow {
    width: 0;
    height: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
    filter: drop-shadow(0 3px 0 #9b2c3d);
}

.climb-up {
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 50px solid #e94560;
}

.climb-up:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 5px 0 #9b2c3d);
}

.climb-up:active {
    transform: translateY(2px);
    filter: drop-shadow(0 1px 0 #9b2c3d);
}

.climb-down {
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-top: 50px solid #e94560;
}

.climb-down:hover {
    transform: translateY(3px);
    filter: drop-shadow(0 -3px 0 #9b2c3d);
}

.climb-down:active {
    transform: translateY(-2px);
    filter: drop-shadow(0 -1px 0 #9b2c3d);
}

/* Disabled climb arrows */
.climb-arrow:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.climb-arrow:disabled:hover {
    transform: none;
    filter: drop-shadow(0 3px 0 #9b2c3d);
}

/* Volga River Crossing Mini-Game */
.crosser {
    position: absolute;
    left: 10%;
    bottom: calc(25% - 100px);
    transform: translateX(-75px);
    width: 165px;
    height: auto;
    image-rendering: pixelated;
    transition: left 0.4s ease;
    z-index: 5;
}

.crosser-done {
    position: absolute;
    display: none;
    transform: translateX(-75px);
    width: 165px;
    height: auto;
    image-rendering: pixelated;
    z-index: 6;
}

.cross-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    z-index: 10;
}

.cross-arrow {
    width: 0;
    height: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
    filter: drop-shadow(3px 0 0 #9b2c3d);
}

.cross-left {
    border-top: 40px solid transparent;
    border-bottom: 40px solid transparent;
    border-right: 50px solid #e94560;
}

.cross-left:hover {
    transform: translateX(-3px);
    filter: drop-shadow(5px 0 0 #9b2c3d);
}

.cross-left:active {
    transform: translateX(2px);
    filter: drop-shadow(1px 0 0 #9b2c3d);
}

.cross-right {
    border-top: 40px solid transparent;
    border-bottom: 40px solid transparent;
    border-left: 50px solid #e94560;
}

.cross-right:hover {
    transform: translateX(3px);
    filter: drop-shadow(-5px 0 0 #9b2c3d);
}

.cross-right:active {
    transform: translateX(-2px);
    filter: drop-shadow(-1px 0 0 #9b2c3d);
}

/* Disabled cross arrows */
.cross-arrow:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.cross-arrow:disabled:hover {
    transform: none;
    filter: drop-shadow(3px 0 0 #9b2c3d);
}

/* Siberia Bear Mini-Game */
.siberia-player {
    position: absolute;
    right: calc(5% - 50px);
    bottom: calc(15% - 80px);
    width: 250px;
    height: auto;
    image-rendering: pixelated;
    transform: scaleX(-1);
    z-index: 5;
}

.bear-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.bear-spot {
    position: absolute;
    pointer-events: auto;
}

/* Position bear spots (from 1024x1024 source coords) */
.bear-spot[data-bear="1"] { top: 73.2%; left: 15.6%; }
.bear-spot[data-bear="2"] { top: 76.2%; left: 40%; }
.bear-spot[data-bear="3"] { top: 78.1%; left: 58.6%; }

.bear-tail {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle, #8B5E3C 40%, #6B3F1F 100%);
    border-radius: 50%;
    cursor: pointer;
    animation: tail-wiggle 3s ease-in-out infinite;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.bear-tail:hover {
    transform: scale(1.3);
}

@keyframes tail-wiggle {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, -2px); }
}

.bear-reveal {
    display: none;
    width: auto;
    image-rendering: pixelated;
    animation: bear-appear 0.4s ease-out;
}

.bear-spot[data-bear="1"] .bear-reveal { height: 200px; transform: translate(calc(11px - 50%), -90px) scaleX(-1); }
.bear-spot[data-bear="2"] .bear-reveal { height: 75px; transform: translate(calc(11px - 50%), -45px) scaleX(-1); }
.bear-spot[data-bear="3"] .bear-reveal { height: 125px; transform: translate(calc(11px - 50%), -75px); }

@keyframes bear-appear {
    0% {
        opacity: 0;
        scale: 0.5;
    }
    100% {
        opacity: 1;
        scale: 1;
    }
}

/* Shooting star */
.shooting-star {
    position: absolute;
    top: 8%;
    right: 5%;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    z-index: 2;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.4);
}

.shooting-star.active {
    animation: shooting-star 3s ease-in-out forwards;
}

.shooting-star::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 1px;
    height: 40px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(-50%) rotate(-27deg);
    transform-origin: bottom center;
}

@keyframes shooting-star {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    15% {
        opacity: 0.7;
    }
    80% {
        opacity: 0.7;
        transform: translate(-120px, 60px);
    }
    100% {
        opacity: 0;
        transform: translate(-150px, 75px);
    }
}

@keyframes spark-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.6) rotate(15deg);
    }
}

/* Flash effect on game container */
.game-container.flash {
    animation: container-flash 0.3s ease-out;
}

@keyframes container-flash {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(2.5);
    }
    100% {
        filter: brightness(1);
    }
}

/* Disabled button state */
.btn-main:disabled {
    background: #555;
    box-shadow:
        0 6px 0 #333,
        0 8px 0 #1a1a2e,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.6;
    text-shadow: none;
}

.btn-main:disabled:hover {
    transform: none;
    box-shadow:
        0 6px 0 #333,
        0 8px 0 #1a1a2e,
        inset 0 -4px 0 rgba(0, 0, 0, 0.2),
        inset 0 4px 0 rgba(255, 255, 255, 0.1);
}

/* Disabled compass overrides */
.btn-compass:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-compass:disabled:hover {
    transform: none;
    box-shadow:
        0 4px 0 #333,
        0 6px 0 #1a1a2e,
        inset 0 -3px 0 rgba(0, 0, 0, 0.3),
        inset 0 3px 0 rgba(255, 255, 255, 0.1);
}

/* Responsive - Smaller screens */
@media (max-width: 720px) {
    .game-container {
        width: 95vw;
        height: 95vw;
        max-width: 700px;
        max-height: 700px;
    }

    .btn-main {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .dialog-box {
        width: 95vw;
        max-width: 700px;
        font-size: 0.65rem;
    }
}
