* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
    background: #1a1a2e;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    text-align: center;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px 50px;
    border-radius: 10px;
    color: #fff;
}

#gameOver h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #ff6b6b;
    font-weight: 900;
}

#gameOver p {
    font-size: 18px;
    margin: 10px 0;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* Stat Bars */
#statBars {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    width: 55px;
    text-align: right;
}

.stat-bar-bg {
    width: 100px;
    height: 14px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 7px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.3s ease;
}

.stat-bar-fill.hunger {
    background: linear-gradient(90deg, #ff6b6b, #ff8c42);
}

.stat-bar-fill.thirst {
    background: linear-gradient(90deg, #4dabf7, #74c0fc);
}

.stat-bar-fill.energy {
    background: linear-gradient(90deg, #51cf66, #69db7c);
}

.stat-bar-fill.hygiene {
    background: linear-gradient(90deg, #a9e34b, #d8f5a2);
}

/* Reset Button */
#resetBtn {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 28px;
    background: rgba(255, 107, 107, 0.9);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#resetBtn:hover {
    background: rgba(255, 107, 107, 1);
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #score {
        font-size: 18px;
        top: 10px;
        left: 10px;
    }

    #statBars {
        top: 50px;
        right: 10px;
    }

    .stat-bar-bg {
        width: 80px;
    }

    .stat-label {
        font-size: 10px;
        width: 45px;
    }

    #resetBtn {
        top: 10px;
        padding: 8px 20px;
        font-size: 12px;
    }

    #gameOver {
        padding: 20px 30px;
    }

    #gameOver h2 {
        font-size: 28px;
    }

    #gameOver p {
        font-size: 16px;
    }
}
