body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#gameCanvas {
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: pointer;
}

.menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    text-align: center;
}

.menu.hidden {
    display: none;
    pointer-events: none;
}

.goal-section {
    margin: 1.5rem 0;
}

.goal-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.goal-input input {
    width: 80px;
    padding: 5px;
    font-size: 16px;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    text-align: center;
}

.color-section {
    margin: 1.5rem 0;
}

.preset-colors {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.color-btn {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-btn:hover {
    transform: scale(1.1);
}

#colorPicker {
    width: 100px;
    height: 40px;
    margin: 1rem 0;
}

#startGame, .menu-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

#startGame:hover, .menu-button:hover {
    background: #45a049;
}

.menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.click-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    animation: clickRipple 1s ease-out;
    z-index: 99;
}

@keyframes clickRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animal-section {
    margin: 1.5rem 0;
}

.animal-choices label {
    margin-right: 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.animal-choices input[type="radio"] {
    margin-right: 0.3rem;
}

.rpg-dialog {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.97);
    padding: 2rem 2.5rem;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    z-index: 2000;
    text-align: center;
    font-size: 1.2rem;
    min-width: 320px;
}

.rpg-dialog button {
    margin-top: 1.2rem;
    background: #4fc3f7;
    color: #fff;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.rpg-dialog button:hover {
    background: #1976d2;
}

.hud {
    position: fixed;
    left: 20px;
    bottom: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 1rem;
    z-index: 1000;
    pointer-events: auto;
    background: rgba(0,0,0,0.2);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    gap: 15px;
}

#score {
    position: relative;
    top: auto;
    left: auto;
    color: white;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
    pointer-events: auto;
    width: 100%;
    text-align: left;
}

.hud-bar-container {
    position: relative;
    top: auto;
    left: auto;
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
    pointer-events: auto;
}

#waterBarContainer {
    top: auto;
    background-color: rgba(0, 0, 100, 0.6);
}

.hud-bar-fill {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease-out, background-color 0.3s ease-out;
}

.health-bar {
    background-color: #4CAF50;
}

.water-bar {
    background-color: #3399ff;
}

.hud-diamond-container {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 5px 10px;
    z-index: 100;
    color: white;
    font-size: 20px;
    line-height: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
    pointer-events: auto;
}

.diamond-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.hud-birds {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 0;
    background: #fff;
    color: #1976d2;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    padding: 0.5em 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    pointer-events: auto;
}

.hud-attacks {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1em;
    margin-bottom: 0;
    pointer-events: auto;
    width: 100%;
}

.hud-attacks button {
    padding: 0.5em 0.8em;
    font-size: 0.9rem;
    white-space: nowrap;
    background: #4fc3f7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s;
}

.hud-attacks button:hover {
    background: #1976d2;
}

#saveLoadSection {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 1em;
    margin-top: 2em;
}

#saveString, #loadString {
    font-family: monospace;
    border-radius: 5px;
    border: 1px solid #bbb;
    margin-bottom: 0.5em;
}

#copySave, #loadSave {
    background: #4fc3f7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4em 1.2em;
    font-size: 1em;
    margin-right: 0.5em;
    cursor: pointer;
    margin-top: 0.3em;
}

#copySave:hover, #loadSave:hover {
    background: #1976d2;
}

.rpg-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #1976d2;
    color: #fff;
    padding: 0.8em 2em;
    border-radius: 8px;
    font-size: 1.1em;
    z-index: 3000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    animation: fadeInOut 1.8s;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.menu:not(.hidden) ~ .hud {
    /* REMOVE THIS RULE. We will control HUD visibility directly in JS to avoid conflicts. */
    /* display: none; */
}

/* New: Health and Water Bar Styles */
.hud-bar-container {
    position: relative;
    top: auto;
    left: auto;
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    pointer-events: auto;
}

#waterBarContainer {
    top: auto;
    background-color: rgba(0, 0, 100, 0.6);
}

.hud-bar-fill {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease-out, background-color 0.3s ease-out;
}

.health-bar {
    background-color: #4CAF50;
}

.water-bar {
    background-color: #3399ff;
}

/* New: Diamond Counter Styles */
.hud-diamond-container {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 5px 10px;
    z-index: 100;
    color: white;
    font-size: 20px;
    line-height: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    pointer-events: auto;
}

.diamond-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
} 