:root {
    --primary: #8C5A2B;
    --primary-light: #A67341;
    --accent: #5C8001;
    --text-light: #F9F6F0;
    --glass-bg: rgba(20, 30, 15, 0.6);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    user-select: none; /* Prevent text selection while clicking */
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a2421; /* Fallback */
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('assets/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glassmorphism Utilities */
.glass-panel, .glass-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--text-light);
}

.glass-modal {
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    z-index: 100;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.glass-modal h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.glass-modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

.glass-modal p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #cccccc;
}

.highlight {
    color: #FFD700;
    font-weight: 800;
    font-size: 2rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #456001);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(92, 128, 1, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(92, 128, 1, 0.6);
    background: linear-gradient(135deg, #6c9601, #517101);
}

.primary-btn:active {
    transform: translateY(1px);
}

/* UI Header */
#game-ui {
    position: absolute;
    top: 20px;
    width: 90%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none; /* Let clicks pass through */
}

.stat-box {
    padding: 1rem 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-box .label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bbb;
    margin-bottom: 0.2rem;
}

.stat-box .value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Play Area */
#play-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

.hazelnut {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('assets/hazelnut.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
    transition: transform 0.1s;
}

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

.hazelnut:active {
    transform: scale(0.9);
}

.hazelnut.collected {
    pointer-events: none;
    animation: collectAnim 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes collectAnim {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Floating Points */
.floating-text {
    position: absolute;
    color: #FFD700;
    font-weight: 800;
    font-size: 1.5rem;
    pointer-events: none;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    animation: floatUp 1s forwards ease-out;
    z-index: 20;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.active {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .glass-modal {
        padding: 2rem;
    }
    .glass-modal h1 {
        font-size: 2.2rem;
    }
    #game-ui {
        top: 10px;
    }
    .stat-box {
        padding: 0.8rem 1.5rem;
        min-width: 100px;
    }
    .stat-box .value {
        font-size: 1.5rem;
    }
    .hazelnut {
        width: 60px;
        height: 60px;
    }
}
