/* Chill Guy Clicker - Custom Game Stylesheet */

:root {
    --chill-primary: #a1887f;
    --chill-primary-glow: rgba(161, 136, 127, 0.4);
    --chill-dark: #3e2723;
    --chill-light: #efebe9;
    --chill-accent: #d7ccc8;
    --chill-gold: #ffd54f;
    --chill-gold-glow: rgba(255, 213, 79, 0.3);
}

.clicker-game-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-top: 20px;
    min-height: 600px;
}

@media (max-width: 992px) {
    .clicker-game-container {
        grid-template-columns: 1fr;
    }
}

/* Left Panel: Active Clicker */
.clicker-main-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.clicker-stats-header {
    text-align: center;
    margin-bottom: 20px;
    z-index: 10;
}

.chill-stats-title {
    font-size: 0.9rem;
    color: var(--chill-primary);
    letter-spacing: 2px;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.score-display-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 15px var(--chill-primary-glow);
    animation: pulseGlow 3s infinite ease-in-out;
}

.score-label {
    font-size: 1.2rem;
    color: var(--chill-accent);
    font-weight: 500;
}

.cps-display-wrapper {
    font-size: 1rem;
    color: #b0bec5;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cps-display-wrapper .bullet {
    color: var(--chill-primary);
}

/* Click Target & Image keying out */
.click-area-wrapper {
    position: relative;
    width: 320px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 50%;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
}

.click-target {
    position: relative;
    width: 250px;
    height: 320px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    /* Clean container for multiplying overlay background */
    background: radial-gradient(circle, rgba(141, 110, 99, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

#chillguyImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* CSS Blend Magic: Keys out the white background programmatically! */
    mix-blend-mode: multiply;
    transition: filter 0.2s ease;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.click-target:hover #chillguyImg {
    filter: drop-shadow(0 15px 25px var(--chill-primary-glow));
}

/* Juice stretch-and-squash on click */
.click-target.clicked {
    transform: scale(0.92) translateY(5px);
}

.click-target:active {
    transform: scale(0.95);
}

/* Glowing Aura behind Chill Guy */
.chillguy-bg-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(161, 136, 127, 0.25) 0%, rgba(255, 213, 79, 0.05) 50%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: rotateGlow 20s infinite linear;
}

/* Shop Upgrades Panel Styling */
.clicker-shop-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    max-height: 650px;
    overflow-y: auto;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
}

.shop-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--chill-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--chill-accent);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reset-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    color: #ff8a80;
}

.shop-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-divider {
    font-size: 0.75rem;
    color: var(--chill-primary);
    letter-spacing: 2px;
    font-weight: 700;
    margin: 15px 0 5px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* Individual Upgrade Buttons */
.upgrade-btn {
    display: grid;
    grid-template-columns: 48px 1fr 90px;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease-in-out;
    width: 100%;
}

.upgrade-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--chill-primary);
    transform: translateX(3px);
}

.upgrade-btn:active {
    transform: scale(0.99) translateX(3px);
}

.upgrade-btn.locked {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
    transform: none !important;
}

.upgrade-btn.locked:hover {
    border-color: rgba(255, 255, 255, 0.03) !important;
}

.upgrade-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(161, 136, 127, 0.08);
    border: 1px solid rgba(161, 136, 127, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chill-primary);
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.upgrade-btn:hover:not(.locked) .upgrade-icon-box {
    background: var(--chill-primary);
    color: #fff;
    box-shadow: 0 0 10px var(--chill-primary-glow);
}

.upgrade-info {
    display: flex;
    flex-direction: column;
}

.upgrade-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.upgrade-desc {
    font-size: 0.75rem;
    color: #b0bec5;
    margin-top: 2px;
}

.upgrade-cost-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.upgrade-cost {
    font-size: 1rem;
    font-weight: 700;
    color: var(--chill-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

.upgrade-cost::before {
    content: "✨";
    font-size: 0.8rem;
}

.upgrade-qty {
    font-size: 0.8rem;
    color: var(--chill-primary);
    font-weight: 700;
    margin-top: 2px;
    background: rgba(161, 136, 127, 0.08);
    padding: 1px 8px;
    border-radius: 12px;
    border: 1px solid rgba(161, 136, 127, 0.15);
}

.upgrade-btn.locked .upgrade-cost {
    color: #90a4ae !important;
}

.upgrade-btn.locked .upgrade-cost::before {
    content: "🔒";
}

/* Animations */
@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { text-shadow: 0 0 15px var(--chill-primary-glow); }
    50% { text-shadow: 0 0 30px var(--chill-primary); }
}
