* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #87CEEB;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#mini-map {
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
    border-radius: 10px;
    position: relative;
}

#stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-bar label {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    width: 60px;
}

.bar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.health-bar .bar-fill {
    background: linear-gradient(90deg, #ff3333, #ff6666);
}

.energy-bar .bar-fill {
    background: linear-gradient(90deg, #3333ff, #6666ff);
}

#score-display {
    text-align: right;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-size: 18px;
    font-weight: bold;
}

.gardens-counter {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 255, 0, 0.3));
    padding: 5px 15px;
    border-radius: 20px;
    border: 2px solid #FFD700;
}

#barry-face {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: white;
    border: 4px solid #FFD700;
    border-radius: 50%;
    padding: 10px;
    cursor: help;
    position: relative;
}

#barry-face::before {
    content: "Barry's mood";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

#barry-face:hover::before {
    opacity: 1;
}

#barry-face img {
    width: 100%;
    height: 100%;
}

/* Pollination Progress */
#pollination-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.progress-bar {
    width: 300px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #66ff66);
    width: 0%;
    transition: width 0.1s linear;
}

.progress-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* Detection Meter */
#detection-meter {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
}

.meter-label {
    color: #ff3333;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.meter-bar {
    width: 30px;
    height: 200px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ff3333;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, #ff3333, #ff6666);
    transition: height 0.2s ease;
}

/* Tutorial Modal */
.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #FFD700;
    text-align: center;
    max-width: 500px;
}

.modal h2 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 32px;
}

.modal p {
    margin-bottom: 20px;
    font-size: 18px;
}

.controls-list {
    text-align: left;
    margin: 20px 0;
    display: grid;
    gap: 10px;
}

.controls-list div {
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

#start-game {
    background: #FFD700;
    color: black;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

#start-game:hover {
    transform: scale(1.1);
}

/* Voice Bubble */
#voice-bubble {
    position: absolute;
    bottom: 140px;
    right: 20px;
    background: white;
    border: 3px solid black;
    border-radius: 20px;
    padding: 15px;
    max-width: 300px;
    animation: bounce 0.5s ease;
}

.bubble-text {
    color: black;
    font-weight: bold;
    font-style: italic;
}

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

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