/**
 * Adventure Styles
 * Styles for the Immersive Math Adventure System
 */

/* ========================================
   Phaser Test Screen (Phase 1)
======================================== */

.phaser-test-container {
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phaser-test-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1000px;
}

.phaser-test-title {
    color: #fff;
    font-size: 1.8rem;
    font-family: 'Fredoka', sans-serif;
}

.phaser-game-wrapper {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

#phaser-game-container {
    width: 960px;
    height: 540px;
}

#phaser-game-container canvas {
    display: block;
}

.phaser-test-info {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

@media (max-width: 1000px) {
    #phaser-game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .phaser-game-wrapper {
        width: 100%;
        max-width: 960px;
    }
}

/* ========================================
   Mode Selection Card (Adventure)
======================================== */

.adventure-mode-card.adventure-story-mode {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #0984e3 100%);
    border: 3px solid #00b894;
}

.adventure-mode-card.adventure-story-mode:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 184, 148, 0.4);
}

/* ========================================
   Adventure Dashboard Screen
======================================== */

.adventure-dashboard-container {
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.adventure-dashboard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.adventure-dashboard-title {
    font-size: 2rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.adventure-intro-banner {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(52, 152, 219, 0.3));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.adventure-intro-banner .intro-emoji {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.adventure-intro-banner .intro-text {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* World Picker Grid */
.world-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 700px;
    margin: 0 auto 25px auto;
}

.world-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.world-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.world-card:active {
    transform: translateY(0);
}

.world-card-forest {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.35), rgba(46, 139, 87, 0.25));
}

.world-card-underwater {
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.35), rgba(26, 75, 122, 0.25));
}

.world-card-sky {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(240, 240, 255, 0.2));
}

.world-card-cave {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(74, 74, 90, 0.25));
}

.world-card-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.world-card-info {
    flex: 1;
    min-width: 0;
}

.world-card-name {
    color: #fff;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.world-card-desc {
    color: rgba(255, 255, 255, 0.65);
    margin: 3px 0 0;
    font-size: 0.78rem;
    line-height: 1.3;
}

.world-card-play {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.world-card:hover .world-card-play {
    color: #fff;
}

@media (max-width: 600px) {
    .world-picker-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .world-card-emoji {
        font-size: 1.8rem;
    }

    .world-card-name {
        font-size: 0.95rem;
    }
}

/* Adventure Cards Container */
.adventure-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Adventure Select Card */
.adventure-select-card {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.adventure-select-card:hover {
    transform: translateY(-5px);
    border-color: rgba(155, 89, 182, 0.5);
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.3);
}

.adventure-select-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.adventure-character-emoji {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.adventure-character-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.adventure-select-body {
    padding: 20px;
}

.adventure-select-title {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.adventure-select-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.adventure-select-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.adventure-scenes,
.adventure-operation {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #fff;
}

.adventure-select-rewards {
    display: flex;
    gap: 10px;
}

.adventure-xp,
.adventure-bonus {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #2d3436;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.adventure-bonus {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.adventure-select-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.adventure-start-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.adventure-start-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

/* ========================================
   Adventure Intro Screen
======================================== */

.adventure-intro-container {
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.adventure-intro-character-container {
    margin-bottom: 30px;
}

.adventure-intro-character {
    font-size: 6rem;
    animation: float 3s ease-in-out infinite;
    display: block;
    margin-bottom: 10px;
}

.adventure-intro-character-name {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.adventure-intro-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.adventure-intro-narrative {
    max-width: 600px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    line-height: 1.8;
    min-height: 100px;
    margin-bottom: 40px;
}

.adventure-intro-buttons {
    display: flex;
    gap: 15px;
}

.adventure-intro-btn {
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.adventure-intro-btn.primary {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: #fff;
}

.adventure-intro-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.4);
}

.adventure-intro-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.adventure-intro-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Adventure Game Screen
======================================== */

.adventure-game-container {
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

/* Scene Backgrounds */
.adventure-game-container.scene-forest {
    background: linear-gradient(180deg, #2d5a27 0%, #4a8c3f 30%, #6ab04c 100%);
}

.adventure-game-container.scene-river {
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 50%, #4da0b0 100%);
}

.adventure-game-container.scene-cave {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.adventure-game-container.scene-nest {
    background: linear-gradient(180deg, #f39c12 0%, #e74c3c 50%, #9b59b6 100%);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-element {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.5;
    animation: floatAround 10s ease-in-out infinite;
}

@keyframes floatAround {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-30px) rotate(3deg); }
}

/* Game Header */
.adventure-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.adventure-progress-wrapper {
    flex: 1;
    max-width: 300px;
    margin-left: 20px;
}

.adventure-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.adventure-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #f39c12);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.adventure-progress-text {
    color: #fff;
    font-size: 0.85rem;
    text-align: right;
}

/* Scene Header */
.adventure-scene-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.adventure-scene-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
}

.adventure-scene-title {
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Character Display */
.adventure-character-display {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 10;
}

.adventure-game-character {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

/* Challenge Card */
.adventure-challenge-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin: 0 auto 20px;
    max-width: 500px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.adventure-challenge-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* ========================================
   3D Explorable World
======================================== */

/* Guide character and speech bubble */
.adventure-guide {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 0 auto 15px;
    max-width: 600px;
    position: relative;
    z-index: 20;
}

.adventure-guide-character {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.guide-speech-bubble {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 12px 18px;
    position: relative;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.guide-speech-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.95) transparent transparent;
}

.guide-speech-bubble .adventure-challenge-text {
    color: #2d3436;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* World Wrapper - Theatre-like container */
.adventure-world-wrapper {
    position: relative;
    margin: 0 auto 20px;
    max-width: 100%;
    width: 95vw;
    max-width: 1200px;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Adventure World Container (inside wrapper, holds the JS-generated world) */
#adventure-world-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* World Container (JS-generated) */
.world-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Beautiful sky gradient like illustration */
    background: linear-gradient(180deg,
        #4FC3F7 0%,      /* Bright sky blue top */
        #81D4FA 30%,     /* Light sky blue */
        #B3E5FC 60%,     /* Very light blue near horizon */
        #E1F5FE 100%     /* Almost white at horizon */
    );
    cursor: pointer;
}

/* ========================================
   CSS-Drawn Illustrated Forest Elements
======================================== */

/* Sun - CSS drawn circle */
.world-sun {
    position: absolute;
    top: 8%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFE066 0%, #FFD93D 50%, #F4D03F 100%);
    border-radius: 50%;
    box-shadow:
        0 0 60px 20px rgba(255, 230, 102, 0.6),
        0 0 100px 40px rgba(255, 217, 61, 0.3);
    z-index: 1;
}

/* Sparkles around sun */
.sun-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #FFF9C4;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

.sun-sparkle:nth-child(1) { top: 30%; left: 75%; animation-delay: 0s; }
.sun-sparkle:nth-child(2) { top: 20%; left: 82%; animation-delay: 0.5s; }
.sun-sparkle:nth-child(3) { top: 35%; left: 88%; animation-delay: 1s; }
.sun-sparkle:nth-child(4) { top: 45%; left: 78%; animation-delay: 1.5s; }

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Clouds - CSS drawn fluffy clouds */
.world-cloud {
    position: absolute;
    z-index: 2;
}

.cloud-body {
    position: relative;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cloud-body::before,
.cloud-body::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

/* Cloud 1 - Large */
.world-cloud.cloud-1 {
    top: 12%;
    left: 5%;
    animation: cloudFloat 30s ease-in-out infinite;
}

.world-cloud.cloud-1 .cloud-body {
    width: 100px;
    height: 50px;
    border-radius: 50px;
}

.world-cloud.cloud-1 .cloud-body::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.world-cloud.cloud-1 .cloud-body::after {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 45px;
}

/* Cloud 2 - Medium */
.world-cloud.cloud-2 {
    top: 18%;
    left: 25%;
    animation: cloudFloat 25s ease-in-out infinite;
    animation-delay: -10s;
}

.world-cloud.cloud-2 .cloud-body {
    width: 80px;
    height: 40px;
    border-radius: 40px;
}

.world-cloud.cloud-2 .cloud-body::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 10px;
}

.world-cloud.cloud-2 .cloud-body::after {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 35px;
}

/* Cloud 3 - Small */
.world-cloud.cloud-3 {
    top: 8%;
    left: 55%;
    animation: cloudFloat 35s ease-in-out infinite;
    animation-delay: -5s;
}

.world-cloud.cloud-3 .cloud-body {
    width: 60px;
    height: 30px;
    border-radius: 30px;
}

.world-cloud.cloud-3 .cloud-body::before {
    width: 30px;
    height: 30px;
    top: -15px;
    left: 8px;
}

.world-cloud.cloud-3 .cloud-body::after {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 25px;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

/* Rolling Hills - Background layers */
.world-hills {
    position: absolute;
    bottom: 28%;
    left: 0;
    right: 0;
    height: 35%;
    z-index: 3;
}

.hill {
    position: absolute;
    bottom: 0;
    border-radius: 100% 100% 0 0 / 100% 100% 0 0;
}

.hill-far-1 {
    left: -15%;
    width: 55%;
    height: 80%;
    background: linear-gradient(180deg, #A5D6A7 0%, #81C784 100%);
    opacity: 0.5;
}

.hill-far-2 {
    right: -15%;
    width: 60%;
    height: 70%;
    background: linear-gradient(180deg, #C8E6C9 0%, #A5D6A7 100%);
    opacity: 0.4;
}

.hill-mid-1 {
    left: 5%;
    width: 50%;
    height: 55%;
    background: linear-gradient(180deg, #81C784 0%, #66BB6A 100%);
    opacity: 0.6;
}

.hill-mid-2 {
    right: 0%;
    width: 55%;
    height: 45%;
    background: linear-gradient(180deg, #A5D6A7 0%, #81C784 100%);
    opacity: 0.55;
}

/* Trees Container */
.world-trees {
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* CSS Pine Trees */
.css-tree {
    position: absolute;
    bottom: 26%;
    z-index: 4;
    transform: translateX(-50%);
}

.css-tree.pine {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pine-top {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid #2E7D32;
    position: relative;
    z-index: 3;
}

.pine-mid {
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 50px solid #388E3C;
    margin-top: -15px;
    position: relative;
    z-index: 2;
}

.pine-bottom {
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 60px solid #43A047;
    margin-top: -20px;
    position: relative;
    z-index: 1;
}

.tree-trunk {
    width: 20px;
    height: 30px;
    background: linear-gradient(90deg, #5D4037 0%, #795548 50%, #6D4C41 100%);
    margin-top: -5px;
    border-radius: 0 0 3px 3px;
}

/* CSS Round Trees */
.css-tree.round {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-crown {
    width: 80px;
    height: 70px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 40%, #388E3C 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: inset -10px -10px 20px rgba(0,0,0,0.1);
}

.tree-crown::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(129, 199, 132, 0.6);
    border-radius: 50%;
    top: 15px;
    left: 15px;
}

.tree-crown::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(129, 199, 132, 0.4);
    border-radius: 50%;
    top: 25px;
    right: 20px;
}

.round .tree-trunk {
    width: 25px;
    height: 40px;
    margin-top: -10px;
}

/* Tree size variations */
.css-tree.large .pine-top { border-left-width: 35px; border-right-width: 35px; border-bottom-width: 55px; }
.css-tree.large .pine-mid { border-left-width: 50px; border-right-width: 50px; border-bottom-width: 70px; }
.css-tree.large .pine-bottom { border-left-width: 65px; border-right-width: 65px; border-bottom-width: 85px; }
.css-tree.large .tree-trunk { width: 28px; height: 45px; }

.css-tree.large.round .tree-crown { width: 110px; height: 95px; }
.css-tree.large.round .tree-trunk { width: 35px; height: 55px; }

.css-tree.small .pine-top { border-left-width: 18px; border-right-width: 18px; border-bottom-width: 28px; }
.css-tree.small .pine-mid { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 35px; }
.css-tree.small .pine-bottom { border-left-width: 32px; border-right-width: 32px; border-bottom-width: 42px; }
.css-tree.small .tree-trunk { width: 14px; height: 20px; }

.css-tree.small.round .tree-crown { width: 55px; height: 48px; }
.css-tree.small.round .tree-trunk { width: 18px; height: 28px; }

/* Tree opacity and positioning for depth */
.css-tree.far {
    opacity: 0.6;
    z-index: 4;
    bottom: 42%;
    filter: brightness(1.1) saturate(0.7);
}
.css-tree.mid {
    opacity: 0.85;
    z-index: 5;
    bottom: 34%;
    filter: brightness(1.05);
}
.css-tree.near {
    opacity: 1;
    z-index: 6;
    bottom: 26%;
}

/* Gentle tree swaying animation */
.css-tree {
    animation: gentleSway 6s ease-in-out infinite;
}

.css-tree:nth-child(odd) {
    animation-delay: -2s;
}

.css-tree:nth-child(3n) {
    animation-delay: -4s;
}

@keyframes gentleSway {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(1deg); }
}

/* CSS Animals */
.css-animal {
    position: absolute;
    z-index: 7;
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2));
}

.css-animal.deer {
    animation: animalIdle 3s ease-in-out infinite;
}

.css-animal.rabbit {
    animation: rabbitHop 2s ease-in-out infinite;
}

.css-animal.squirrel {
    animation: animalIdle 2.5s ease-in-out infinite;
    animation-delay: -1s;
}

@keyframes animalIdle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes rabbitHop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

/* Flying birds */
.css-bird {
    position: absolute;
    z-index: 8;
    font-size: 1.5rem;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
}

.css-bird:nth-child(1) { animation: birdFly1 12s ease-in-out infinite; }
.css-bird:nth-child(2) { animation: birdFly2 10s ease-in-out infinite; animation-delay: -2s; }
.css-bird:nth-child(3) { animation: birdFly3 14s ease-in-out infinite; animation-delay: -4s; }

@keyframes birdFly1 {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    25% { transform: translate(30px, -15px) scaleX(1); }
    50% { transform: translate(60px, 10px) scaleX(1); }
    75% { transform: translate(30px, -5px) scaleX(1); }
}

@keyframes birdFly2 {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    30% { transform: translate(40px, -20px) scaleX(1); }
    60% { transform: translate(20px, 15px) scaleX(1); }
}

@keyframes birdFly3 {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    20% { transform: translate(-20px, -10px) scaleX(-1); }
    50% { transform: translate(30px, 5px) scaleX(1); }
    80% { transform: translate(10px, -15px) scaleX(1); }
}

/* Fireflies/Sparkles in forest */
.forest-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FFF59D;
    border-radius: 50%;
    box-shadow: 0 0 10px 3px rgba(255, 245, 157, 0.8);
    animation: fireflyFloat 4s ease-in-out infinite;
    z-index: 9;
}

@keyframes fireflyFloat {
    0%, 100% { opacity: 0.3; transform: translate(0, 0); }
    25% { opacity: 1; transform: translate(10px, -15px); }
    50% { opacity: 0.6; transform: translate(-5px, -25px); }
    75% { opacity: 0.9; transform: translate(15px, -10px); }
}

/* Parallax Layers */
.world-layers {
    position: absolute;
    inset: 0;
    width: 200%;
    transition: transform 0.3s ease-out;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-out;
}

.layer-sky {
    top: 0;
    height: 40%;
}

.layer-mountains,
.layer-hills {
    bottom: 20%;
    height: 60%;
    top: auto;
}

/* Forest layers - all positioned from bottom so trees grow up */
.layer-trees-far {
    bottom: 0;
    height: 100%;
    top: auto;
    opacity: 0.5;
}

.layer-trees-mid {
    bottom: 0;
    height: 100%;
    top: auto;
    opacity: 0.7;
}

.layer-trees-near {
    bottom: 0;
    height: 100%;
    top: auto;
}

.layer-bushes {
    bottom: 0;
    height: 100%;
    top: auto;
}

.layer-trees-back,
.layer-trees {
    bottom: 0;
    height: 100%;
    top: auto;
}

.layer-trees-front {
    bottom: 0;
    height: 100%;
    top: auto;
}

.layer-ceiling {
    top: 0;
    height: 20%;
}

.layer-stalactites {
    top: 5%;
    height: 30%;
}

.layer-rocks {
    top: 50%;
    height: 40%;
}

.layer-clouds {
    top: 5%;
    height: 25%;
}

.layer-water {
    bottom: 0;
    height: 20%;
}

.layer-element {
    position: absolute;
    /* Position is set inline by JS (top or bottom) */
}

.layer-element.animated {
    animation: waterWave 2s ease-in-out infinite;
}

/* Subtle swaying for trees */
.layer-trees-far .layer-element,
.layer-trees-mid .layer-element,
.layer-trees-near .layer-element {
    animation: treeSway 6s ease-in-out infinite;
}

@keyframes treeSway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

@keyframes layerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes waterWave {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(5px) translateY(-3px); }
    50% { transform: translateX(0) translateY(-5px); }
    75% { transform: translateX(-5px) translateY(-3px); }
}

/* Ground */
.world-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28%;
    z-index: 10;
}

.world-ground.ground-grass {
    background: linear-gradient(180deg, #4CAF50 0%, #43A047 30%, #388E3C 100%);
}

/* Grass Blades Layer */
.grass-blades {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25px;
    overflow: hidden;
}

.grass-blade {
    position: absolute;
    bottom: 0;
    width: 8px;
    background: linear-gradient(180deg, #66BB6A 0%, #4CAF50 100%);
    border-radius: 50% 50% 0 0;
    transform-origin: bottom center;
}

/* Flowers row */
.flowers-row {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 20px;
}

.css-flower {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flower-head {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
}

.flower-head.pink { background: linear-gradient(135deg, #F48FB1 0%, #EC407A 100%); }
.flower-head.yellow { background: linear-gradient(135deg, #FFF176 0%, #FFEE58 100%); }
.flower-head.orange { background: linear-gradient(135deg, #FFCC80 0%, #FFA726 100%); }
.flower-head.purple { background: linear-gradient(135deg, #CE93D8 0%, #AB47BC 100%); }
.flower-head.red { background: linear-gradient(135deg, #EF9A9A 0%, #EF5350 100%); }

.flower-head::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #FFF59D;
    border-radius: 50%;
}

.flower-stem {
    width: 3px;
    height: 25px;
    background: linear-gradient(180deg, #66BB6A 0%, #4CAF50 100%);
}

/* Varied flower sizes */
.css-flower:nth-child(odd) .flower-head { width: 18px; height: 18px; }
.css-flower:nth-child(odd) .flower-stem { height: 22px; }

.css-flower:nth-child(3n) .flower-head { width: 24px; height: 24px; }
.css-flower:nth-child(3n) .flower-stem { height: 30px; }

.css-flower:nth-child(4n) .flower-head { width: 16px; height: 16px; }
.css-flower:nth-child(4n) .flower-stem { height: 20px; }

/* Gentle flower sway */
.css-flower {
    animation: flowerSway 4s ease-in-out infinite;
}

.css-flower:nth-child(odd) { animation-delay: -1s; }
.css-flower:nth-child(3n) { animation-delay: -2s; }

@keyframes flowerSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.world-ground.ground-water {
    background: linear-gradient(180deg, #2980b9 0%, #3498db 50%, #5dade2 100%);
}

.world-ground.ground-stone {
    background: linear-gradient(180deg, #2c3e50 0%, #1a1a2e 50%, #0d0d1a 100%);
}

.world-ground.ground-rocky {
    background: linear-gradient(180deg, #d35400 0%, #a04000 50%, #7f3300 100%);
}

.ground-pattern {
    position: absolute;
    inset: 0;
}

.ground-pattern.grass {
    background:
        /* Grass blade pattern */
        repeating-linear-gradient(
            85deg,
            transparent 0px,
            transparent 3px,
            rgba(60, 120, 50, 0.4) 3px,
            rgba(60, 120, 50, 0.4) 5px
        ),
        repeating-linear-gradient(
            95deg,
            transparent 0px,
            transparent 4px,
            rgba(45, 90, 39, 0.3) 4px,
            rgba(45, 90, 39, 0.3) 6px
        ),
        /* Subtle dirt patches */
        radial-gradient(ellipse 40px 20px at 20% 70%, rgba(101, 67, 33, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 30px 15px at 60% 80%, rgba(101, 67, 33, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50px 25px at 85% 60%, rgba(101, 67, 33, 0.2) 0%, transparent 70%);
}

.ground-pattern.water {
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 5px,
        rgba(255, 255, 255, 0.1) 5px,
        rgba(255, 255, 255, 0.1) 7px
    );
    animation: waterShimmer 3s ease-in-out infinite;
}

@keyframes waterShimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.ground-pattern.stone {
    background: repeating-radial-gradient(
        circle at 20% 50%,
        transparent 0px,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 12px
    );
}

.ground-pattern.rocky {
    background: repeating-linear-gradient(
        45deg,
        transparent 0px,
        transparent 15px,
        rgba(0, 0, 0, 0.1) 15px,
        rgba(0, 0, 0, 0.1) 17px
    );
}

/* Interactive Objects Layer */
.world-objects {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 15;
    transition: transform 0.3s ease-out;
    pointer-events: none;
}

.world-objects .world-object {
    pointer-events: auto;
}

.world-object {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
}

.world-object .object-emoji {
    font-size: 3.5rem;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
    animation: objectFloat 2s ease-in-out infinite;
}

/* No color filters needed - using red/blue hearts */

@keyframes objectFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.world-object .object-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* Red glow for group 1 */
.world-object[data-group="1"] .object-glow {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.6) 0%, rgba(255, 100, 100, 0.3) 50%, transparent 70%);
}

/* Blue glow for group 2 */
.world-object[data-group="2"] .object-glow {
    background: radial-gradient(circle, rgba(0, 100, 255, 0.6) 0%, rgba(100, 150, 255, 0.3) 50%, transparent 70%);
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 0.9; }
}

/* Tap indicator removed - objects are self-explanatory with glow effect */

.world-object:hover .object-emoji {
    transform: scale(1.2);
}

.world-object:hover .object-glow {
    opacity: 1;
}

.world-object.nearby .object-glow {
    opacity: 1;
}

.world-object.nearby .object-emoji {
    animation: objectBounce 0.5s ease-in-out infinite;
}

@keyframes objectBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.world-object.collected {
    pointer-events: none;
    transition: all 0.3s ease;
}

.world-object.hidden-object .object-emoji {
    opacity: 0.6;
}

/* ========================================
   CSS Gems - Pure CSS colored gems
   These render reliably across all platforms
======================================== */
.css-gem {
    display: inline-block;
    width: 32px;
    height: 38px;
    position: relative;
}

/* Gem shape using CSS clip-path */
.css-gem::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: gemSparkle 2s ease-in-out infinite;
}

/* Gem shine effect */
.css-gem::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 25%;
    width: 30%;
    height: 25%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: rotate(-30deg);
}

/* Ruby - Red gem */
.css-gem.ruby::before {
    background: linear-gradient(135deg, #ff4757 0%, #c0392b 50%, #8b0000 100%);
    box-shadow:
        inset 0 -5px 15px rgba(0,0,0,0.3),
        inset 0 5px 10px rgba(255,255,255,0.2),
        0 0 20px rgba(255, 71, 87, 0.5);
}

/* Sapphire - Blue gem */
.css-gem.sapphire::before {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 50%, #1a5276 100%);
    box-shadow:
        inset 0 -5px 15px rgba(0,0,0,0.3),
        inset 0 5px 10px rgba(255,255,255,0.2),
        0 0 20px rgba(52, 152, 219, 0.5);
}

/* Emerald - Green gem */
.css-gem.emerald::before {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #1e8449 100%);
    box-shadow:
        inset 0 -5px 15px rgba(0,0,0,0.3),
        inset 0 5px 10px rgba(255,255,255,0.2),
        0 0 20px rgba(46, 204, 113, 0.5);
}

/* Gem sparkle animation */
@keyframes gemSparkle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* Scale gems inside world objects */
.world-object .css-gem {
    width: 40px;
    height: 48px;
}

/* Character - Static kid figure for reference */
.world-character {
    position: absolute;
    bottom: 22%;
    left: 8%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none; /* Static, not interactive */
}

.character-sprite {
    font-size: 5rem;
    display: block;
    filter: drop-shadow(4px 4px 6px rgba(0,0,0,0.4));
    animation: characterIdle 3s ease-in-out infinite;
}

/* Gentle idle animation - no walking since character is static */
@keyframes characterIdle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.world-character.walking .character-sprite {
    /* No longer used - character is static */
    animation: characterIdle 3s ease-in-out infinite;
}

@keyframes characterWalk {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.character-shadow {
    width: 60px;
    height: 15px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    margin: 0 auto;
    margin-top: -8px;
}

/* Decorations */
.world-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.decoration {
    position: absolute;
}

.decoration-ground {
    animation: groundBob 4s ease-in-out infinite;
}

.decoration-flying {
    animation: flyAround 8s ease-in-out infinite;
}

@keyframes groundBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes flyAround {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -8px); }
    50% { transform: translate(5px, -15px); }
    75% { transform: translate(-5px, -5px); }
}

/* World UI */
.world-ui {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 30;
}

.collected-counter {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5D4037;
    font-weight: 700;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    border: 3px solid rgba(255,255,255,0.5);
}

.collected-counter.pulse {
    animation: counterPulse 0.3s ease;
}

@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.counter-icon {
    font-size: 1.5rem;
}

.counter-text {
    font-size: 1.3rem;
}

.movement-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9) 0%, rgba(56, 142, 60, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 10px 20px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 25;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
}

/* Exploration Prompt - Kid-friendly instructions */
.adventure-explore-prompt {
    max-width: 700px;
    margin: 0 auto 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.explore-instruction {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.9), rgba(52, 152, 219, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px 28px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.explore-icon {
    font-size: 2rem;
    /* No animation - static icon */
}

.explore-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.explore-subtext {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 400;
}

.collect-progress {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-radius: 20px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2d3436;
    font-weight: 600;
}

.collect-icon {
    font-size: 1.3rem;
}

/* Answer Section */
.adventure-answer-section {
    position: relative;
    z-index: 10;
}

.adventure-answer-section.slide-in {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.answer-prompt {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Visual Container - Main puzzle display area */
.adventure-visual-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    margin: 0 auto 25px;
    max-width: 650px;
    min-height: 220px;
    position: relative;
    z-index: 10;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: containerAppear 0.5s ease-out;
}

@keyframes containerAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Visual scene wrapper */
.visual-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.visual-scene.counting-scene .group-items {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 15px;
    min-width: 100px;
}

/* Visual Problem Styles */
.visual-problem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.visual-groups-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.visual-group {
    text-align: center;
}

.group-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.group-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
}

.group-count {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}

.visual-item {
    font-size: 2.5rem;
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}

.visual-item.bounce-in {
    animation: bounceIn 0.5s ease-out forwards;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.visual-operator {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.operator-symbol {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.visual-question {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

/* Missing Addend Styles */
.visual-bridge .bridge-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.row-label {
    color: rgba(255, 255, 255, 0.8);
    min-width: 90px;
    font-weight: 500;
}

.bridge-stones {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.row-count {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}

.visual-item.mystery {
    opacity: 0.6;
}

.visual-item.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Group Counting Styles */
.torch-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.torch-group {
    text-align: center;
}

.group-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    gap: 5px;
}

.torch-group .group-label {
    margin-top: 8px;
    color: #fff;
    font-weight: 600;
}

.visual-item.flicker {
    animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.visual-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Nest Scene Styles */
.nest-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nest-bowl {
    text-align: center;
}

.visible-eggs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    max-width: 150px;
}

.nest-material {
    font-size: 3rem;
    margin-top: 10px;
}

.hidden-area {
    text-align: center;
}

.leaves {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.hidden-eggs {
    display: flex;
    gap: 5px;
}

.visual-item.wobble {
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.nest-info {
    margin-top: 20px;
}

.info-line {
    display: flex;
    justify-content: center;
    gap: 10px;
    color: #fff;
    margin-bottom: 5px;
}

.info-label {
    opacity: 0.8;
}

.info-value {
    font-weight: 600;
}

/* Choices Container */
.adventure-choices-container {
    max-width: 500px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 10;
}

.choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.adventure-choice-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 100px;
}

.adventure-choice-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.adventure-choice-btn.selected {
    background: rgba(52, 152, 219, 0.4);
    border-color: #3498db;
    transform: scale(1.05);
}

.adventure-choice-btn.correct {
    background: rgba(46, 204, 113, 0.5);
    border-color: #2ecc71;
    animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
}

.adventure-choice-btn.incorrect {
    background: rgba(231, 76, 60, 0.4);
    border-color: #e74c3c;
}

.adventure-choice-btn.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.adventure-choice-btn .choice-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.adventure-choice-btn .choice-visual {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.choice-dots {
    line-height: 1;
    letter-spacing: 2px;
    font-size: 0.75rem;
    opacity: 0.8;
    color: #FFD54F;
}

/* Action Buttons */
.adventure-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.adventure-hint-btn,
.adventure-submit-btn {
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.adventure-hint-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.adventure-hint-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.adventure-submit-btn {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: #fff;
}

.adventure-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

/* Feedback */
.adventure-feedback {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
    min-height: 80px;
}

.adventure-feedback-correct,
.adventure-feedback-incorrect,
.adventure-hint {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adventure-feedback-correct {
    border: 2px solid #2ecc71;
}

.adventure-feedback-incorrect {
    border: 2px solid #e74c3c;
}

.adventure-hint {
    border: 2px solid #f1c40f;
}

.feedback-emoji,
.hint-emoji {
    font-size: 2rem;
}

.feedback-text,
.hint-text {
    color: #fff;
    font-size: 1.1rem;
}

.character-reaction {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 0.95rem;
}

/* Transition Effects */
.adventure-game-container.transitioning {
    opacity: 0.5;
    transform: scale(0.98);
}

/* ========================================
   Adventure Complete Screen
======================================== */

.adventure-complete-container {
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 50%, #6c3483 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.adventure-complete-character {
    font-size: 6rem;
    animation: celebrateBounce 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes celebrateBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.adventure-complete-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.adventure-complete-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 10px;
}

.adventure-complete-reaction {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 30px;
}

.adventure-complete-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.adventure-stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    text-align: center;
}

.adventure-stat-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.adventure-stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.adventure-complete-rewards {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    min-width: 300px;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-item.total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 10px;
}

.reward-item.bonus .reward-value {
    color: #2ecc71;
}

.reward-chest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-radius: 10px;
    color: #2d3436;
    font-weight: 600;
}

.chest-emoji {
    font-size: 2rem;
    animation: bounce 1s ease-in-out infinite;
}

.adventure-complete-buttons {
    display: flex;
    gap: 15px;
}

.adventure-complete-btn {
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.adventure-complete-btn.primary {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: #fff;
}

.adventure-complete-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.4);
}

.adventure-complete-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.adventure-complete-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Animation Utilities
======================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 600px) {
    .adventure-world-wrapper {
        height: 45vh;
        min-height: 280px;
        max-height: 400px;
        margin: 0 10px 15px;
        border-radius: 16px;
    }

    .world-object .object-emoji {
        font-size: 2rem;
    }

    .world-object .css-gem {
        width: 28px;
        height: 34px;
    }

    .character-sprite {
        font-size: 3.5rem;
    }

    .explore-instruction {
        padding: 12px 20px;
    }

    .explore-text {
        font-size: 1rem;
    }

    .explore-subtext {
        font-size: 0.85rem;
    }

    .adventure-dashboard-title {
        font-size: 1.5rem;
    }

    .adventure-intro-title {
        font-size: 1.8rem;
    }

    .adventure-intro-character {
        font-size: 4rem;
    }

    .adventure-intro-narrative {
        font-size: 1rem;
    }

    .adventure-intro-buttons {
        flex-direction: column;
    }

    .choices-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .adventure-choice-btn {
        padding: 15px;
    }

    .adventure-choice-btn .choice-number {
        font-size: 1.5rem;
    }

    .adventure-action-buttons {
        flex-direction: column;
    }

    .adventure-complete-stats {
        flex-direction: column;
        gap: 15px;
    }

    .adventure-complete-buttons {
        flex-direction: column;
    }

    .visual-groups-row {
        flex-direction: column;
    }

    .visual-item {
        font-size: 1.5rem;
    }

    /* World responsive */
    .adventure-world-wrapper {
        height: 40vh;
        min-height: 250px;
        max-height: 350px;
        margin: 0 10px 15px;
        border-radius: 12px;
    }

    .world-object .object-emoji {
        font-size: 1.8rem;
    }

    .world-object .css-gem {
        width: 24px;
        height: 30px;
    }

    .character-sprite {
        font-size: 3rem;
    }

    .adventure-guide-character {
        font-size: 2.5rem;
    }

    .guide-speech-bubble {
        padding: 10px 15px;
    }

    .guide-speech-bubble .adventure-challenge-text {
        font-size: 0.95rem;
    }

    .movement-hint {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* ========================================
   River Scene - Broken Bridge
======================================== */

.river-world {
    background: linear-gradient(180deg,
        #87CEEB 0%,      /* Sky blue */
        #B0E0E6 40%,     /* Powder blue */
        #E0F7FA 70%,     /* Light cyan near horizon */
        #4DD0E1 70.1%,   /* River starts */
        #26C6DA 85%,     /* River middle */
        #00ACC1 100%     /* River deep */
    );
}

/* Distant Mountains */
.river-mountains {
    position: absolute;
    bottom: 35%;
    left: 0;
    right: 0;
    height: 25%;
    z-index: 1;
}

.mountain {
    position: absolute;
    bottom: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 100px solid #90A4AE;
}

.mountain::after {
    content: '';
    position: absolute;
    top: -70px;
    left: -30px;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 40px solid #ECEFF1;
}

.mountain-1 {
    left: 5%;
    border-bottom-color: #78909C;
    transform: scale(1.2);
}

.mountain-2 {
    left: 35%;
    border-bottom-color: #90A4AE;
    transform: scale(0.9);
}

.mountain-3 {
    right: 10%;
    border-bottom-color: #78909C;
    transform: scale(1.1);
}

/* Riverbanks */
.riverbank {
    position: absolute;
    bottom: 0;
    width: 18%;
    height: 45%;
    z-index: 10;
}

.riverbank-left {
    left: 0;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 70%, #81C784 100%);
    border-radius: 0 100% 0 0;
}

.riverbank-right {
    right: 0;
    background: linear-gradient(270deg, #4CAF50 0%, #66BB6A 70%, #81C784 100%);
    border-radius: 100% 0 0 0;
}

.bank-grass {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 5px,
        #388E3C 5px,
        #388E3C 8px
    );
    opacity: 0.6;
}

.bank-tree {
    position: absolute;
    font-size: 3rem;
    filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.3));
}

.riverbank-left .tree-1 { top: 10%; left: 20%; }
.riverbank-left .tree-2 { top: 30%; left: 50%; font-size: 2.5rem; }
.riverbank-right .tree-1 { top: 15%; right: 20%; }
.riverbank-right .tree-2 { top: 35%; right: 45%; font-size: 2.5rem; }

.bank-flowers {
    position: absolute;
    bottom: 20%;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: space-around;
    font-size: 1.5rem;
}

.bank-flowers span {
    animation: flowerSway 3s ease-in-out infinite;
}

.bank-flowers span:nth-child(2) { animation-delay: -1s; }
.bank-flowers span:nth-child(3) { animation-delay: -2s; }

/* River Water */
.river-water {
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 40%;
    background: linear-gradient(180deg,
        rgba(77, 208, 225, 0.9) 0%,
        rgba(38, 198, 218, 0.95) 50%,
        rgba(0, 172, 193, 1) 100%
    );
    z-index: 5;
}

.water-shimmer {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 20px,
        rgba(255, 255, 255, 0.15) 20px,
        rgba(255, 255, 255, 0.15) 22px
    );
    animation: shimmerMove 3s linear infinite;
}

@keyframes shimmerMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(22px); }
}

.water-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.wave-1 { top: 20%; animation: waveMove 4s ease-in-out infinite; }
.wave-2 { top: 50%; animation: waveMove 5s ease-in-out infinite; animation-delay: -1s; }
.wave-3 { top: 75%; animation: waveMove 4.5s ease-in-out infinite; animation-delay: -2s; }

@keyframes waveMove {
    0%, 100% { transform: translateX(-5%) scaleX(1.1); opacity: 0.3; }
    50% { transform: translateX(5%) scaleX(0.9); opacity: 0.5; }
}

/* Broken Wooden Bridge */
.broken-bridge {
    position: absolute;
    bottom: 25%;
    left: 10%;
    right: 10%;
    height: 60px;
    z-index: 15;
    display: flex;
    align-items: flex-end;
}

.bridge-post {
    width: 25px;
    height: 80px;
    background: linear-gradient(90deg, #5D4037 0%, #795548 50%, #6D4C41 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.bridge-post::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -5px;
    width: 35px;
    height: 20px;
    background: linear-gradient(180deg, #6D4C41 0%, #5D4037 100%);
    border-radius: 5px;
}

.bridge-planks {
    display: flex;
    gap: 5px;
    padding: 0 10px;
}

.bridge-planks-left {
    margin-bottom: 10px;
}

.bridge-planks-right {
    margin-bottom: 10px;
}

.plank {
    width: 50px;
    height: 15px;
    background: linear-gradient(180deg, #8D6E63 0%, #6D4C41 50%, #5D4037 100%);
    border-radius: 2px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.plank.broken {
    transform: rotate(15deg) translateY(10px);
    opacity: 0.7;
}

.bridge-gap {
    flex: 1;
    min-width: 200px;
    /* This is where stepping stones go */
}

/* Swimming Fish */
.river-fish {
    position: absolute;
    font-size: 2rem;
    z-index: 6;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.fish-1 {
    bottom: 15%;
    left: 25%;
    animation: fishSwim1 8s ease-in-out infinite;
}

.fish-2 {
    bottom: 25%;
    left: 50%;
    animation: fishSwim2 10s ease-in-out infinite;
    animation-delay: -3s;
}

.fish-3 {
    bottom: 10%;
    right: 25%;
    animation: fishSwim1 7s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes fishSwim1 {
    0%, 100% { transform: translateX(0) scaleX(1); }
    50% { transform: translateX(80px) scaleX(1); }
}

@keyframes fishSwim2 {
    0%, 100% { transform: translateX(0) scaleX(-1); }
    50% { transform: translateX(-60px) scaleX(-1); }
}

/* Lily Pads */
.lily-pad {
    position: absolute;
    font-size: 2rem;
    z-index: 7;
    animation: lilyFloat 4s ease-in-out infinite;
}

.lily-1 { bottom: 30%; left: 30%; }
.lily-2 { bottom: 20%; left: 55%; animation-delay: -1.5s; }
.lily-3 { bottom: 35%; right: 30%; animation-delay: -3s; }

@keyframes lilyFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

/* Duck */
.river-duck {
    position: absolute;
    bottom: 32%;
    left: 40%;
    font-size: 2.5rem;
    z-index: 8;
    animation: duckSwim 12s ease-in-out infinite;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
}

@keyframes duckSwim {
    0%, 100% { transform: translateX(0) scaleX(1); }
    25% { transform: translateX(50px) scaleX(1); }
    50% { transform: translateX(30px) scaleX(-1); }
    75% { transform: translateX(-20px) scaleX(-1); }
}

/* ========================================
   Cave Scene - Dark Cave with Torches
======================================== */

.cave-world {
    background: linear-gradient(180deg,
        #0d0d1a 0%,      /* Very dark top */
        #1a1a2e 30%,     /* Dark purple */
        #16213e 60%,     /* Deep blue */
        #1e3a5f 85%,     /* Slightly lighter bottom */
        #0f3460 100%
    );
}

/* Cave ceiling with stalactites */
.cave-ceiling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15%;
    background: linear-gradient(180deg, #0a0a15 0%, transparent 100%);
    z-index: 3;
}

.stalactite {
    position: absolute;
    top: 0;
    width: 12px;
    background: linear-gradient(180deg,
        #3d3d5c 0%,
        #4a4a6a 50%,
        #5d5d7f 100%
    );
    clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

/* Wall torches */
.cave-torches {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.cave-torch {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.torch-handle {
    width: 8px;
    height: 40px;
    background: linear-gradient(90deg, #5D4037 0%, #795548 50%, #6D4C41 100%);
    border-radius: 2px;
}

.torch-flame {
    width: 20px;
    height: 30px;
    background: linear-gradient(0deg,
        #ff6b35 0%,
        #ff9a00 40%,
        #ffcc00 70%,
        rgba(255, 220, 0, 0.3) 100%
    );
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: torchFlicker 0.5s ease-in-out infinite alternate;
    box-shadow:
        0 0 10px #ff6b35,
        0 0 20px #ff9a00,
        0 0 40px rgba(255, 154, 0, 0.4);
}

@keyframes torchFlicker {
    0% {
        transform: scaleY(1) scaleX(1);
        opacity: 0.9;
    }
    50% {
        transform: scaleY(1.1) scaleX(0.9);
        opacity: 1;
    }
    100% {
        transform: scaleY(0.95) scaleX(1.05);
        opacity: 0.85;
    }
}

/* Flying bats */
.cave-bat {
    position: absolute;
    font-size: 1.8rem;
    animation: batFly 8s ease-in-out infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
    z-index: 4;
}

.cave-bat:nth-child(odd) {
    animation-direction: reverse;
}

@keyframes batFly {
    0%, 100% {
        transform: translate(0, 0) rotate(-5deg);
    }
    25% {
        transform: translate(30px, -10px) rotate(5deg);
    }
    50% {
        transform: translate(10px, 5px) rotate(-3deg);
    }
    75% {
        transform: translate(-20px, -5px) rotate(3deg);
    }
}

/* Magical crystals */
.cave-crystals {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.cave-crystal {
    position: absolute;
    width: 15px;
    height: 30px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: crystalGlow 3s ease-in-out infinite;
}

.cave-crystal.blue {
    background: linear-gradient(180deg, #00bcd4 0%, #0097a7 50%, #006064 100%);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.6);
}

.cave-crystal.purple {
    background: linear-gradient(180deg, #9c27b0 0%, #7b1fa2 50%, #4a148c 100%);
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.6);
}

.cave-crystal.pink {
    background: linear-gradient(180deg, #e91e63 0%, #c2185b 50%, #880e4f 100%);
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.6);
}

@keyframes crystalGlow {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 10px currentColor;
    }
    50% {
        filter: brightness(1.3);
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

/* Cave sparkles */
.cave-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: caveSparkle 2s ease-in-out infinite;
    box-shadow: 0 0 6px #fff, 0 0 10px rgba(255,255,255,0.5);
}

@keyframes caveSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cave floor */
.cave-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(0deg,
        #2d2d44 0%,
        #3d3d5c 30%,
        transparent 100%
    );
}

.ground-stone {
    background: linear-gradient(0deg, #1a1a2e 0%, transparent 100%);
}

.ground-stone::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 0px,
        rgba(255,255,255,0.05) 30px,
        transparent 30px,
        transparent 60px
    );
}

/* ========================================
   Nest Scene - Dragon Nest with Eggs
======================================== */

.nest-world {
    background: linear-gradient(180deg,
        #1a0a2e 0%,       /* Deep purple night */
        #4a1942 20%,      /* Purple */
        #c0392b 50%,      /* Red sunset */
        #e74c3c 70%,      /* Orange-red */
        #f39c12 90%,      /* Golden */
        #d35400 100%      /* Deep orange ground */
    );
}

/* Stars */
.nest-star {
    position: absolute;
    animation: starTwinkle 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Mountains */
.nest-mountains {
    position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    height: 30%;
    z-index: 3;
}

.nest-mountain {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
}

.nest-mountain.mountain-1 {
    left: -5%;
    border-bottom: 150px solid #2c1810;
    transform: scale(1.5);
}

.nest-mountain.mountain-2 {
    left: 30%;
    border-bottom: 120px solid #3d2317;
    transform: scale(1.2);
}

.nest-mountain.mountain-3 {
    right: -10%;
    border-bottom: 180px solid #1e0f08;
    transform: scale(1.8);
}

/* Dragon Nest */
.dragon-nest {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 25%;
    z-index: 10;
}

.nest-base {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 60%;
    background: radial-gradient(ellipse at center bottom,
        #8B4513 0%,
        #654321 50%,
        #3d2817 100%
    );
    border-radius: 50% 50% 40% 40% / 30% 30% 70% 70%;
    box-shadow:
        inset 0 -10px 20px rgba(0,0,0,0.3),
        0 5px 15px rgba(0,0,0,0.4);
}

.nest-twigs {
    position: absolute;
    bottom: 40%;
    left: 5%;
    right: 5%;
    height: 30%;
    background:
        repeating-linear-gradient(
            75deg,
            transparent 0px,
            transparent 5px,
            #5D4037 5px,
            #5D4037 7px
        ),
        repeating-linear-gradient(
            -75deg,
            transparent 0px,
            transparent 5px,
            #6D4C41 5px,
            #6D4C41 7px
        );
    opacity: 0.7;
}

.nest-glow {
    position: absolute;
    bottom: 10%;
    left: 20%;
    right: 20%;
    height: 40%;
    background: radial-gradient(ellipse at center,
        rgba(255, 200, 100, 0.4) 0%,
        rgba(255, 150, 50, 0.2) 40%,
        transparent 70%
    );
    animation: nestGlow 3s ease-in-out infinite;
}

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

/* Parent Dragon */
.parent-dragon {
    position: absolute;
    top: 15%;
    right: 10%;
    font-size: 5rem;
    z-index: 5;
    animation: dragonHover 4s ease-in-out infinite;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

@keyframes dragonHover {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Floating Embers */
.floating-ember {
    position: absolute;
    bottom: 20%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ff6b35 0%, #ff9a00 50%, transparent 70%);
    border-radius: 50%;
    animation: emberFloat 6s ease-in-out infinite;
    box-shadow: 0 0 8px #ff6b35;
}

@keyframes emberFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) translateX(30px);
        opacity: 0;
    }
}

/* Nest ground */
.ground-nest {
    background: linear-gradient(0deg,
        #8B4513 0%,
        #A0522D 30%,
        transparent 100%
    );
}

/* Visible items (non-clickable) styling */
.visible-item {
    opacity: 0.9;
    pointer-events: none;
}

.visible-item .object-emoji {
    filter: brightness(0.9);
}

/* Blocked items (subtraction - items that can't be reached) */
.blocked-item {
    opacity: 0.5;
    pointer-events: none;
}

.blocked-item .object-emoji {
    filter: grayscale(0.5);
}

/* Taken items (subtraction - items already removed) */
.taken-item {
    opacity: 0.4;
    pointer-events: none;
}

.taken-item .object-emoji {
    filter: grayscale(0.8);
}

/* Hidden/Gone items that need to be clicked (with glow) */
.hidden-object {
    opacity: 1;
}

.hidden-object .object-emoji {
    animation: pulseGone 1.5s ease-in-out infinite;
}

@keyframes pulseGone {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ========================================
   Beach World - Pirate Adventure Scene 1
======================================== */

.beach-world {
    background: linear-gradient(180deg,
        #87CEEB 0%,       /* Sky blue */
        #B0E0E6 30%,      /* Powder blue */
        #F5DEB3 60%,      /* Sand color starts */
        #DEB887 80%,      /* Darker sand */
        #D2B48C 100%      /* Beach sand */
    );
}

/* Sun */
.beach-sun {
    position: absolute;
    top: 8%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
        #FFD700 0%,
        #FFA500 40%,
        rgba(255, 165, 0, 0.3) 70%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6);
    z-index: 2;
    animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(255, 215, 0, 0.6); }
    50% { transform: scale(1.05); box-shadow: 0 0 80px rgba(255, 215, 0, 0.8); }
}

/* Ocean waves in background */
.beach-ocean {
    position: absolute;
    bottom: 40%;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg,
        #4DD0E1 0%,
        #26C6DA 50%,
        #00ACC1 100%
    );
    z-index: 3;
}

.beach-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: beachWaveMove 3s ease-in-out infinite;
}

.beach-wave.wave-1 { bottom: 0; }
.beach-wave.wave-2 { bottom: 30%; animation-delay: -1s; }
.beach-wave.wave-3 { bottom: 60%; animation-delay: -2s; }

/* Ocean waves - alternative class name */
.ocean-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: beachWaveMove 3s ease-in-out infinite;
}

.ocean-wave.wave-1 { bottom: 0; }
.ocean-wave.wave-2 { bottom: 30%; animation-delay: -1s; }
.ocean-wave.wave-3 { bottom: 60%; animation-delay: -2s; }

/* Beach sky container */
.beach-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    z-index: 1;
}

/* Sandy beach area */
.sandy-beach {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
        #F5DEB3 0%,
        #DEB887 50%,
        #D2B48C 100%
    );
    z-index: 5;
}

/* Palm trees container */
.palm-trees {
    position: absolute;
    bottom: 40%;
    left: 0;
    right: 0;
    height: 30%;
    z-index: 6;
    pointer-events: none;
}

/* Individual palm tree */
.palm-tree {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: palmSway 5s ease-in-out infinite;
}

.palm-trunk {
    width: 15px;
    height: 60px;
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    border-radius: 5px;
}

.palm-leaves {
    position: relative;
    width: 80px;
    height: 50px;
}

.palm-leaf {
    position: absolute;
    width: 40px;
    height: 15px;
    background: linear-gradient(90deg, #228B22 0%, #32CD32 50%, #228B22 100%);
    border-radius: 50%;
    transform-origin: left center;
}

.palm-leaf.leaf-1 { transform: rotate(-30deg); left: 40px; top: 20px; }
.palm-leaf.leaf-2 { transform: rotate(-60deg); left: 35px; top: 10px; }
.palm-leaf.leaf-3 { transform: rotate(30deg) scaleX(-1); right: 40px; left: auto; top: 20px; }
.palm-leaf.leaf-4 { transform: rotate(60deg) scaleX(-1); right: 35px; left: auto; top: 10px; }

.coconuts {
    position: absolute;
    top: 35px;
    font-size: 1rem;
}

/* Seagulls */
.seagull {
    position: absolute;
    font-size: 1.5rem;
    animation: seagullFly 10s ease-in-out infinite;
    z-index: 7;
}

@keyframes seagullFly {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(40px, -20px); }
    50% { transform: translate(80px, -10px); }
    75% { transform: translate(40px, -25px); }
}

/* Pirate ship in distance */
.pirate-ship-distant {
    position: absolute;
    top: 25%;
    left: 20%;
    font-size: 2rem;
    opacity: 0.6;
    z-index: 4;
    animation: shipRock 5s ease-in-out infinite;
}

/* Guide parrot */
.guide-parrot {
    position: absolute;
    top: 15%;
    left: 10%;
    font-size: 2.5rem;
    z-index: 10;
    animation: parrotBob 2s ease-in-out infinite;
}

@keyframes beachWaveMove {
    0%, 100% { transform: translateX(-10px) scaleY(1); }
    50% { transform: translateX(10px) scaleY(1.2); }
}

/* Sand dunes */
.beach-sand {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg,
        #F5DEB3 0%,
        #DEB887 50%,
        #D2B48C 100%
    );
    z-index: 5;
}

.sand-dune {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 60px;
    background: radial-gradient(ellipse at center bottom,
        #E8D4A8 0%,
        #DEB887 100%
    );
    border-radius: 100% 100% 0 0;
}

.sand-dune.dune-1 { left: 5%; width: 180px; height: 50px; }
.sand-dune.dune-2 { left: 40%; width: 250px; height: 70px; }
.sand-dune.dune-3 { right: 10%; width: 200px; height: 55px; }

/* Palm trees */
.beach-palm {
    position: absolute;
    z-index: 8;
    font-size: 4rem;
    filter: drop-shadow(3px 5px 4px rgba(0,0,0,0.3));
    animation: palmSway 5s ease-in-out infinite;
}

@keyframes palmSway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* Seashells and starfish decorations */
.beach-shell {
    position: absolute;
    z-index: 6;
    font-size: 1.8rem;
    animation: shellBob 3s ease-in-out infinite;
}

@keyframes shellBob {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-3px) rotate(5deg); }
}

/* Seagulls */
.beach-bird {
    position: absolute;
    z-index: 10;
    font-size: 1.5rem;
    animation: seagullFly 10s ease-in-out infinite;
}

@keyframes seagullFly {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(40px, -20px); }
    50% { transform: translate(80px, -10px); }
    75% { transform: translate(40px, -25px); }
}

/* Treasure chest on beach */
.beach-chest {
    position: absolute;
    bottom: 25%;
    right: 20%;
    font-size: 3rem;
    z-index: 9;
    animation: chestGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}

@keyframes chestGlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)); }
}

/* ========================================
   Ocean World - Pirate Adventure Scene 2
======================================== */

.ocean-world {
    background: linear-gradient(180deg,
        #1a5276 0%,       /* Deep blue sky/water */
        #2980b9 30%,      /* Ocean blue */
        #3498db 60%,      /* Lighter blue */
        #1abc9c 85%,      /* Turquoise depths */
        #16a085 100%      /* Deep turquoise */
    );
}

/* Sunlight rays through water */
.ocean-light-ray {
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        transparent 100%
    );
    transform: skewX(-15deg);
    z-index: 2;
    animation: lightRayShimmer 4s ease-in-out infinite;
}

@keyframes lightRayShimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Bubbles */
.ocean-bubble {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: bubbleRise 6s ease-in-out infinite;
    z-index: 5;
}

@keyframes bubbleRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-300px) scale(0.5); opacity: 0; }
}

/* Seaweed */
.ocean-seaweed {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 120px;
    background: linear-gradient(0deg, #27ae60 0%, #2ecc71 50%, #1abc9c 100%);
    border-radius: 50% 50% 0 0;
    transform-origin: bottom center;
    animation: seaweedSway 4s ease-in-out infinite;
    z-index: 3;
}

@keyframes seaweedSway {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* Coral */
.ocean-coral {
    position: absolute;
    bottom: 5%;
    font-size: 3rem;
    z-index: 4;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3));
}

/* Swimming fish */
.ocean-fish {
    position: absolute;
    font-size: 2.5rem;
    z-index: 6;
    animation: fishSwimOcean 12s ease-in-out infinite;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
}

@keyframes fishSwimOcean {
    0%, 100% { transform: translateX(0) scaleX(1); }
    50% { transform: translateX(100px) scaleX(1); }
}

/* Pirate ship silhouette */
.ocean-ship {
    position: absolute;
    top: 10%;
    font-size: 4rem;
    z-index: 8;
    opacity: 0.7;
    animation: shipRock 5s ease-in-out infinite;
    filter: drop-shadow(3px 5px 5px rgba(0,0,0,0.4));
}

@keyframes shipRock {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-10px); }
}

/* Sunken treasure */
.ocean-treasure {
    position: absolute;
    bottom: 10%;
    font-size: 2.5rem;
    z-index: 7;
    animation: treasureGlint 2s ease-in-out infinite;
}

@keyframes treasureGlint {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.3)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)); }
}

/* Ocean floor */
.ocean-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15%;
    background: linear-gradient(0deg,
        #1e8449 0%,
        #27ae60 50%,
        transparent 100%
    );
    z-index: 2;
}

/* ========================================
   Pirate Cave World - Pirate Adventure Scene 3
======================================== */

.pirate-cave-world {
    background: linear-gradient(180deg,
        #1a1a2e 0%,       /* Dark ceiling */
        #16213e 30%,      /* Deep blue */
        #0f3460 60%,      /* Cave blue */
        #533e2d 85%,      /* Rocky brown */
        #3d2817 100%      /* Dark ground */
    );
}

/* Treasure pile glow */
.cave-treasure-glow {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 150px;
    background: radial-gradient(ellipse at center,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 165, 0, 0.15) 50%,
        transparent 80%
    );
    z-index: 4;
    animation: treasureGlow 3s ease-in-out infinite;
}

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

/* Skull decorations */
.cave-skull {
    position: absolute;
    font-size: 2rem;
    z-index: 5;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

/* Cobwebs */
.cave-cobweb {
    position: absolute;
    width: 80px;
    height: 80px;
    background:
        linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%),
        linear-gradient(90deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%),
        linear-gradient(0deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%);
    z-index: 3;
    opacity: 0.5;
}

/* Pirate map */
.cave-map {
    position: absolute;
    font-size: 2.5rem;
    z-index: 6;
    animation: mapFloat 4s ease-in-out infinite;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.4));
}

@keyframes mapFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

/* Wooden barrels */
.cave-barrel {
    position: absolute;
    font-size: 2.5rem;
    z-index: 5;
    filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.4));
}

/* Dripping water */
.cave-drip {
    position: absolute;
    width: 4px;
    height: 15px;
    background: linear-gradient(180deg,
        rgba(100, 200, 255, 0.8) 0%,
        rgba(100, 200, 255, 0.4) 100%
    );
    border-radius: 0 0 50% 50%;
    animation: waterDrip 3s ease-in infinite;
    z-index: 4;
}

@keyframes waterDrip {
    0% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(100px); opacity: 0.5; }
    100% { transform: translateY(120px); opacity: 0; }
}

/* Pirate cave rocks */
.cave-rock-pile {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(0deg,
        #3d2817 0%,
        #533e2d 50%,
        transparent 100%
    );
    z-index: 5;
}

/* ========================================
   Island World - Pirate Adventure Scene 4
======================================== */

.island-world {
    background: linear-gradient(180deg,
        #ff7e5f 0%,       /* Sunset orange */
        #feb47b 20%,      /* Peach */
        #FFD700 40%,      /* Golden */
        #87CEEB 60%,      /* Sky blue */
        #4DD0E1 80%,      /* Ocean */
        #26C6DA 100%      /* Deep ocean */
    );
}

/* Sunset sun */
.island-sun {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle,
        #FFD700 0%,
        #FFA500 40%,
        rgba(255, 165, 0, 0.4) 70%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.8);
    z-index: 2;
}

/* Clouds */
.island-cloud {
    position: absolute;
    font-size: 3rem;
    z-index: 3;
    opacity: 0.8;
    animation: cloudDrift 20s linear infinite;
}

@keyframes cloudDrift {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100vw); }
}

/* Island landmass */
.island-land {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 30%;
    z-index: 5;
}

.island-hill {
    position: absolute;
    bottom: 0;
    background: linear-gradient(180deg,
        #27ae60 0%,
        #2ecc71 30%,
        #229954 100%
    );
    border-radius: 50% 50% 0 0;
}

.island-hill.hill-main {
    left: 20%;
    width: 60%;
    height: 100%;
}

.island-hill.hill-left {
    left: 5%;
    width: 40%;
    height: 60%;
}

.island-hill.hill-right {
    right: 5%;
    width: 45%;
    height: 70%;
}

/* Palm trees on island */
.island-palm {
    position: absolute;
    z-index: 8;
    font-size: 3.5rem;
    filter: drop-shadow(3px 5px 4px rgba(0,0,0,0.4));
    animation: palmSway 5s ease-in-out infinite;
}

/* Treasure X mark */
.island-x-mark {
    position: absolute;
    font-size: 3rem;
    z-index: 10;
    color: #c0392b;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: xMarkPulse 1.5s ease-in-out infinite;
}

@keyframes xMarkPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Pirate flag */
.island-flag {
    position: absolute;
    font-size: 2.5rem;
    z-index: 9;
    animation: flagWave 2s ease-in-out infinite;
    filter: drop-shadow(2px 3px 3px rgba(0,0,0,0.4));
}

@keyframes flagWave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Ocean around island */
.island-ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg,
        #4DD0E1 0%,
        #26C6DA 50%,
        #00ACC1 100%
    );
    z-index: 4;
}

.island-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: islandWaveMove 4s ease-in-out infinite;
}

.island-wave.wave-1 { top: 10%; }
.island-wave.wave-2 { top: 40%; animation-delay: -1.5s; }
.island-wave.wave-3 { top: 70%; animation-delay: -3s; }

@keyframes islandWaveMove {
    0%, 100% { transform: translateX(-5%) scaleX(1.05); }
    50% { transform: translateX(5%) scaleX(0.95); }
}

/* Parrot */
.island-parrot {
    position: absolute;
    font-size: 2.5rem;
    z-index: 11;
    animation: parrotBob 2s ease-in-out infinite;
    filter: drop-shadow(2px 3px 3px rgba(0,0,0,0.3));
}

@keyframes parrotBob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

/* Beach on island */
.island-beach {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 10%;
    background: linear-gradient(180deg,
        #F5DEB3 0%,
        #DEB887 100%
    );
    border-radius: 50% 50% 0 0;
    z-index: 6;
}

/* ========================================
   Multiplication Worlds - Starlight Garden
======================================== */

/* Garden World */
.garden-world {
    background: linear-gradient(180deg,
        #87CEEB 0%,
        #98FB98 40%,
        #228B22 70%,
        #006400 100%
    );
}

.garden-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    z-index: 1;
}

.garden-sun {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 50%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
}

.garden-cloud {
    position: absolute;
    font-size: 3rem;
    opacity: 0.8;
    animation: cloudDrift 25s linear infinite;
}

.garden-cloud.cloud-1 { top: 8%; left: 20%; }
.garden-cloud.cloud-2 { top: 15%; left: 60%; animation-delay: -10s; }

.garden-fence {
    position: absolute;
    bottom: 45%;
    left: 0;
    right: 0;
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        #8B4513 0px, #8B4513 15px,
        #A0522D 15px, #A0522D 20px
    );
    z-index: 4;
}

.garden-decor-bg {
    position: absolute;
    bottom: 50%;
    left: 10%;
    right: 10%;
    font-size: 2rem;
    display: flex;
    justify-content: space-around;
    z-index: 3;
}

.garden-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, #228B22 0%, #006400 100%);
    z-index: 5;
}

.guide-fairy {
    position: absolute;
    top: 20%;
    left: 8%;
    font-size: 3rem;
    z-index: 10;
    animation: fairyFloat 3s ease-in-out infinite;
}

@keyframes fairyFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Greenhouse World */
.greenhouse-world {
    background: linear-gradient(180deg,
        #E8F5E9 0%,
        #C8E6C9 50%,
        #A5D6A7 100%
    );
}

.greenhouse-frame {
    position: absolute;
    inset: 5%;
    border: 8px solid #8B4513;
    border-radius: 20px 20px 0 0;
    z-index: 2;
}

.greenhouse-glass {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px 15px 0 0;
}

.greenhouse-beams {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0px, transparent 80px, rgba(139, 69, 19, 0.3) 80px, rgba(139, 69, 19, 0.3) 85px),
        repeating-linear-gradient(0deg, transparent 0px, transparent 80px, rgba(139, 69, 19, 0.3) 80px, rgba(139, 69, 19, 0.3) 85px);
}

.greenhouse-plants {
    position: absolute;
    bottom: 25%;
    left: 10%;
    right: 10%;
    font-size: 3rem;
    display: flex;
    justify-content: space-around;
    z-index: 5;
}

.greenhouse-decor {
    position: absolute;
    top: 20%;
    left: 20%;
    right: 20%;
    z-index: 6;
}

.leaf {
    position: absolute;
    font-size: 2rem;
    animation: leafFloat 8s ease-in-out infinite;
}

.leaf.l1 { left: 10%; animation-delay: 0s; }
.leaf.l2 { left: 45%; animation-delay: -2s; }
.leaf.l3 { left: 80%; animation-delay: -4s; }

@keyframes leafFloat {
    0%, 100% { transform: translate(0, 0) rotate(-5deg); }
    25% { transform: translate(10px, -15px) rotate(5deg); }
    50% { transform: translate(-5px, -10px) rotate(-5deg); }
    75% { transform: translate(15px, -5px) rotate(5deg); }
}

.greenhouse-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, #A5D6A7 0%, #81C784 100%);
    z-index: 4;
}

/* Meadow World (Night) */
.meadow-world {
    background: linear-gradient(180deg,
        #0a0a2e 0%,
        #1a1a4e 30%,
        #2d2d7a 60%,
        #1e3a5f 100%
    );
}

.meadow-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    z-index: 1;
}

.meadow-moon {
    position: absolute;
    top: 10%;
    right: 15%;
    font-size: 4rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 200, 0.8));
}

.meadow-cloud {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: cloudDrift 15s ease-in-out infinite;
}

@keyframes cloudDrift {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(20px); opacity: 0.4; }
}

.meadow-hills {
    position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    height: 30%;
    background:
        radial-gradient(ellipse 60% 100% at 20% 100%, #1e3a5f 0%, transparent 70%),
        radial-gradient(ellipse 50% 100% at 80% 100%, #1a1a4e 0%, transparent 70%);
    z-index: 3;
}

.meadow-grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f1f3a 100%);
    z-index: 5;
}

/* Rainbow World */
.rainbow-world {
    background: linear-gradient(180deg,
        #87CEEB 0%,
        #B0E0E6 30%,
        #E0F7FA 60%,
        #FFFFFF 100%
    );
}

.rainbow-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70%;
    z-index: 1;
}

.rainbow-arc {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    height: 200px;
    border-radius: 100px 100px 0 0;
    background: linear-gradient(180deg,
        #FF6B6B 0%, #FF6B6B 14%,
        #FFA500 14%, #FFA500 28%,
        #FFD93D 28%, #FFD93D 42%,
        #6BCB77 42%, #6BCB77 56%,
        #4D96FF 56%, #4D96FF 70%,
        #9B59B6 70%, #9B59B6 84%,
        #E91E63 84%, #E91E63 100%
    );
    opacity: 0.8;
    z-index: 2;
}

.rainbow-sparkles {
    position: absolute;
    top: 30%;
    left: 20%;
    right: 20%;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-around;
    z-index: 3;
}

.rainbow-sparkles span {
    animation: sparkle 1.5s ease-in-out infinite;
}

.rainbow-sparkles span:nth-child(2) { animation-delay: -0.3s; }
.rainbow-sparkles span:nth-child(3) { animation-delay: -0.6s; }
.rainbow-sparkles span:nth-child(4) { animation-delay: -0.9s; }
.rainbow-sparkles span:nth-child(5) { animation-delay: -1.2s; }

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.rainbow-clouds {
    position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    z-index: 4;
}

.cloud-platform {
    position: absolute;
    font-size: 5rem;
    bottom: 0;
}

.cloud-platform.left { left: 5%; }
.cloud-platform.right { right: 5%; }

/* ========================================
   Division Worlds - Cookie Kingdom
======================================== */

/* Bakery World */
.bakery-world {
    background: linear-gradient(180deg,
        #FFECD2 0%,
        #FCB69F 50%,
        #D4A373 100%
    );
}

.bakery-wall {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, #FFF5E6 0%, #FFE4CC 100%);
    z-index: 1;
}

.bakery-shelf {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 50px;
    background: linear-gradient(180deg, #8B4513 0%, #A0522D 100%);
    border-radius: 5px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 2rem;
    z-index: 2;
}

.bakery-shelf.shelf-1 { top: 15%; }
.bakery-shelf.shelf-2 { top: 35%; }

.bakery-counter {
    position: absolute;
    bottom: 30%;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    z-index: 5;
}

.bakery-display {
    position: absolute;
    bottom: 35%;
    left: 30%;
    right: 30%;
    display: flex;
    justify-content: space-around;
    font-size: 2.5rem;
    z-index: 6;
}

.bakery-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background:
        repeating-linear-gradient(90deg, #D4A373 0px, #D4A373 50px, #C4936F 50px, #C4936F 100px);
    z-index: 4;
}

.guide-bear {
    position: absolute;
    top: 50%;
    left: 8%;
    font-size: 3rem;
    z-index: 10;
    animation: bearBounce 2s ease-in-out infinite;
}

@keyframes bearBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Kitchen World */
.kitchen-world {
    background: linear-gradient(180deg,
        #FFF5E6 0%,
        #FFE4CC 50%,
        #FFD4B3 100%
    );
}

.kitchen-wall {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: #FFF8E7;
    z-index: 1;
}

.kitchen-window {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    z-index: 2;
}

.kitchen-cabinets {
    position: absolute;
    top: 5%;
    left: 10%;
    right: 10%;
    height: 80px;
    background: linear-gradient(180deg, #D4A373 0%, #C4936F 100%);
    border-radius: 5px;
    z-index: 2;
}

.kitchen-counter {
    position: absolute;
    bottom: 35%;
    left: 10%;
    right: 10%;
    height: 60px;
    background: linear-gradient(180deg, #E0E0E0 0%, #BDBDBD 100%);
    border-radius: 5px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 2rem;
    z-index: 5;
}

.kitchen-table {
    position: absolute;
    bottom: 25%;
    left: 20%;
    right: 20%;
    height: 20px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    z-index: 4;
}

.kitchen-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background:
        repeating-linear-gradient(90deg, #F5F5F5 0px, #F5F5F5 40px, #E0E0E0 40px, #E0E0E0 80px);
    z-index: 3;
}

/* Party World */
.party-world {
    background: linear-gradient(180deg,
        #FFE5F1 0%,
        #FFB8D1 50%,
        #FF8FB1 100%
    );
}

.party-decorations {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    z-index: 3;
}

.party-banner {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF, #9B59B6);
    padding: 10px 30px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.party-balloons {
    position: absolute;
    top: 15%;
    left: 10%;
    right: 10%;
}

.balloon {
    position: absolute;
    font-size: 2.5rem;
    animation: balloonFloat 3s ease-in-out infinite;
}

.balloon.b1 { left: 10%; animation-delay: 0s; }
.balloon.b2 { left: 35%; animation-delay: -0.5s; }
.balloon.b3 { left: 60%; animation-delay: -1s; }
.balloon.b4 { left: 85%; animation-delay: -1.5s; }

@keyframes balloonFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.party-tables {
    position: absolute;
    bottom: 30%;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: space-around;
    z-index: 5;
}

.party-table {
    font-size: 3rem;
}

.party-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(180deg, #FFB8D1 0%, #FF8FB1 100%);
    z-index: 4;
}

/* Candy Castle World */
.candy-castle-world {
    background: linear-gradient(180deg,
        #E8D4F8 0%,
        #D4B8F0 30%,
        #C09BD8 60%,
        #A678C8 100%
    );
}

.castle-towers {
    position: absolute;
    top: 5%;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.castle-towers .tower {
    font-size: 4rem;
}

.castle-wall {
    position: absolute;
    top: 25%;
    left: 20%;
    right: 20%;
    height: 35%;
    background: linear-gradient(180deg, #E8D4F8 0%, #D4B8F0 100%);
    border-radius: 10px;
    z-index: 2;
}

.castle-window {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
}

.castle-entrance {
    position: absolute;
    bottom: 30%;
    left: 35%;
    right: 35%;
    height: 80px;
    background: linear-gradient(180deg, #4a148c 0%, #2a0a4c 100%);
    border-radius: 40px 40px 0 0;
    z-index: 4;
}

.castle-decorations {
    position: absolute;
    bottom: 35%;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: space-around;
    font-size: 2rem;
    z-index: 5;
}

.castle-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, #C09BD8 0%, #A678C8 100%);
    z-index: 3;
}

/* Friend and bag markers for division */
.friend-marker, .bag-marker {
    pointer-events: none;
    opacity: 0.8;
}

.friend-marker .object-emoji,
.bag-marker .object-emoji {
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}
