/* ============================================
   CAPYBARA CHILL — Clicker Game Styles
   ============================================ */

body {
    background: linear-gradient(180deg, #87CEEB 0%, #B8E6B8 50%, #7DB86A 100%);
    min-height: 100vh;
}

/* --- Stats Bar --- */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.stat {
    text-align: center;
    min-width: 100px;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--capy-dark);
    font-variant-numeric: tabular-nums;
}

/* --- Game Layout --- */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 80px);
}

/* --- Click Area --- */
.click-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scene {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 70%,
        var(--water-light) 0%,
        var(--water-mid) 50%,
        var(--water-dark) 100%);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.3),
        0 0 0 16px rgba(126, 200, 227, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.scene:active {
    transform: scale(0.97);
}

.click-hint {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

/* --- Hot Spring Effects --- */
.hot-spring {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: radial-gradient(ellipse at 50% 80%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%);
}

.steam {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    animation: steamRise 3s ease-in-out infinite;
}

.steam-1 { left: 25%; bottom: 60%; animation-delay: 0s; }
.steam-2 { left: 55%; bottom: 55%; animation-delay: 1s; }
.steam-3 { left: 75%; bottom: 58%; animation-delay: 2s; }

@keyframes steamRise {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-80px) scale(1.5);
        opacity: 0;
    }
}

/* --- Clicker Capybara --- */
.clicker-capy {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 110px;
    transition: transform 0.1s ease;
}

.clicker-capy .capy-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 65px;
    background: var(--capy-brown);
    border-radius: 55px 55px 45px 45px;
}

.clicker-capy .capy-head {
    position: absolute;
    bottom: 40px;
    left: 15px;
    width: 75px;
    height: 60px;
    background: var(--capy-brown);
    border-radius: 38px 38px 28px 32px;
    z-index: 3;
}

.clicker-capy .capy-ear {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 12px;
    background: var(--capy-dark);
    border-radius: 50% 50% 30% 30%;
}

.clicker-capy .capy-ear.left { left: 10px; transform: rotate(-15deg); }
.clicker-capy .capy-ear.right { right: 10px; transform: rotate(15deg); }

.clicker-capy .capy-face {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 38px;
}

.clicker-capy .capy-eye {
    position: absolute;
    top: 4px;
    width: 9px;
    height: 11px;
    background: var(--capy-nose);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clicker-capy .capy-eye.left { left: 7px; }
.clicker-capy .capy-eye.right { right: 7px; }

.clicker-capy .capy-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* Happy eyes when clicking */
.clicker-capy.happy .capy-eye {
    height: 4px;
    top: 8px;
    border-radius: 4px 4px 0 0;
}

.clicker-capy .capy-nose {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: var(--capy-nose);
    border-radius: 50%;
}

.clicker-capy .capy-mouth {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 5px;
    border-bottom: 2px solid var(--capy-dark);
    border-radius: 0 0 50% 50%;
}

.capy-accessory {
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 1.8rem;
    z-index: 10;
    transition: all 0.3s ease;
}

/* --- Friends --- */
.friends-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.friend {
    position: absolute;
    font-size: 1.5rem;
    animation: float 4s ease-in-out infinite;
}

/* --- Shop Panel --- */
.shop {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px var(--card-shadow);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 90px;
}

.shop-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--capy-dark);
    margin-bottom: 16px;
    text-align: center;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background: var(--warm-cream);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.shop-item:hover:not(.locked) {
    border-color: var(--orange-accent);
    transform: translateX(4px);
}

.shop-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.shop-item.purchased-max {
    opacity: 0.5;
    border-color: var(--grass-light);
    background: #E8F5E9;
}

.shop-item .item-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.shop-item .item-info {
    flex: 1;
    min-width: 0;
}

.shop-item .item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--capy-dark);
}

.shop-item .item-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.shop-item .item-cost {
    flex-shrink: 0;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--orange-accent), var(--orange-glow));
    color: white;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
}

.shop-item.locked .item-cost {
    background: #ccc;
}

.shop-item .item-owned {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* --- Click Indicators --- */
#clickIndicators {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

.click-indicator {
    position: absolute;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--orange-accent);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .scene {
        width: 280px;
        height: 280px;
    }

    .shop {
        position: static;
        max-height: none;
    }

    .stats-bar {
        gap: 10px;
    }

    .stat {
        min-width: 70px;
    }

    .stat-value {
        font-size: 1.1rem;
    }
}
