:root {
    --primary: #f89d31; /* Capybara Orange/Brown */
    --secondary: #a8d5ba; /* Grass Green */
    --bg: #f9f7f2;
    --text: #4a3c31;
    --accent: #ff6b6b;
    --glass: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jua', sans-serif;
    user-select: none;
}

body {
    background: var(--bg);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    background: #e3f2fd; /* Light Sky */
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
}

/* --- UI COMPONENTS --- */
#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

/* TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    pointer-events: auto;
}

.player-stats {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 20px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.bar-bg {
    width: 120px;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

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

.bar-fill.hp { background: var(--accent); }

#hp-text, #gold-text { font-size: 1.1rem; color: var(--text); }

.stage-info {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-align: right;
    box-shadow: 0 5px 15px rgba(248, 157, 49, 0.3);
}

#stage-text { font-size: 1.5rem; }
#day-text { font-size: 0.9rem; opacity: 0.8; }

/* EVENT LOG */
#event-log {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 30px;
    border-radius: 50px;
    font-size: 1rem;
    animation: fadeInOut 2s infinite alternate;
}

@keyframes fadeInOut {
    from { opacity: 0.7; transform: translateX(-50%) translateY(0); }
    to { opacity: 1; transform: translateX(-50%) translateY(-5px); }
}

/* BOTTOM DOCK */
.bottom-dock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.skills-container {
    display: flex;
    gap: 15px;
}

.skill-slot {
    width: 60px;
    height: 60px;
    background: var(--glass);
    border: 3px solid white;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

#go-btn {
    width: 250px;
    height: 70px;
    background: linear-gradient(180deg, #f89d31, #f3821a);
    border: none;
    border-bottom: 5px solid #c06300;
    border-radius: 35px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.1s, background 0.3s;
}

#go-btn:hover { background: #ffaa44; transform: translateY(-2px); }
#go-btn:active { transform: translateY(2px); border-bottom-width: 0; }

/* MODALS */
.modal {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 90%;
}

.choice-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.choice-btn {
    padding: 20px;
    background: #fdf2e9;
    border: 2px solid var(--primary);
    border-radius: 20px;
    cursor: pointer;
    width: 150px;
    transition: all 0.2s;
}

.choice-btn:hover { background: var(--primary); color: white; transform: scale(1.05); }

/* START SCREEN */
.screen {
    position: absolute;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #a8ebe9 0%, #f1a7f1 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.intro-box {
    background: var(--glass);
    padding: 60px;
    border-radius: 50px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    text-align: center;
}

.game-title {
    font-size: 5rem;
    line-height: 0.9;
    color: var(--primary);
    text-shadow: 0 5px 0 white;
}

.game-title span { color: var(--text); font-size: 4rem; }

#start-btn {
    margin-top: 30px;
    padding: 20px 60px;
    background: var(--primary);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.hidden { display: none !important; }
