.pixel-theme {
    font-family: 'Press Start 2P', monospace;
    background-color: #1a1a1a;
    color: #fff;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.pixel-theme .bento-nav {
    background: #000;
    border-bottom: 4px solid #fff;
    border-radius: 0;
    font-family: 'Inter', sans-serif; /* Keep nav readable */
}

.game-container {
    position: relative;
    width: 100vw;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #222;
}

.pixel-title {
    text-align: center;
    color: #ffd700;
    text-shadow: 2px 2px #b8860b, 4px 4px #000;
    margin: 1rem 0;
    font-size: 2rem;
    z-index: 10;
    position: relative;
}

/* Overworld Map */
.map-wrapper {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 0 auto;
    border: 8px solid #fff;
    background: #4caf50;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.map-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.node {
    position: absolute;
    cursor: pointer;
    text-align: center;
    transition: transform 0.1s;
}

.node:hover {
    transform: scale(1.2);
}

.node-icon {
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px #000);
}

.node-label {
    background: #000;
    color: #fff;
    padding: 2px 4px;
    font-size: 0.6rem;
    border: 2px solid #fff;
}

/* Player Stats Overlay */
.player-stats {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #000;
    border: 4px solid #fff;
    padding: 10px;
    z-index: 100;
    font-size: 0.8rem;
    min-width: 200px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hp-bar-bg {
    width: 100px;
    height: 12px;
    background: #333;
    border: 2px solid #fff;
}

.hp-bar-fill {
    height: 100%;
    background: #e52521;
    width: 100%;
    transition: width 0.3s;
}

.exp-bar-fill {
    height: 100%;
    background: #ffd700;
    width: 0%;
    transition: width 0.3s;
}

/* Combat View */
.combat-arena {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: url('../assets/images/pixel_map.png') center/cover no-repeat;
    image-rendering: pixelated;
}

.combat-top {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
}

.boss-stats {
    background: rgba(0,0,0,0.8);
    border: 4px solid #fff;
    padding: 10px;
    min-width: 300px;
}

.boss-stats h2 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #ff4444;
}

.boss-hp-fill {
    background: #ff0000;
}

.combat-middle {
    flex: 1;
    position: relative;
}

.hero-sprite, .boss-sprite {
    position: absolute;
    bottom: 20%;
}

.hero-sprite {
    left: 15%;
}

.boss-sprite {
    right: 15%;
}

.hero-sprite img, .boss-sprite img {
    height: 200px;
    image-rendering: pixelated;
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.5));
}

/* Animations */
@keyframes attack-hero {
    0% { transform: translateX(0); }
    50% { transform: translateX(50px); }
    100% { transform: translateX(0); }
}

@keyframes attack-boss {
    0% { transform: translateX(0); }
    50% { transform: translateX(-50px); }
    100% { transform: translateX(0); }
}

@keyframes damage {
    0% { filter: brightness(1) drop-shadow(4px 4px 0px rgba(0,0,0,0.5)); }
    50% { filter: brightness(2) drop-shadow(4px 4px 0px rgba(255,0,0,0.8)); }
    100% { filter: brightness(1) drop-shadow(4px 4px 0px rgba(0,0,0,0.5)); }
}

.anim-attack-hero { animation: attack-hero 0.3s ease-in-out; }
.anim-attack-boss { animation: attack-boss 0.3s ease-in-out; }
.anim-damage { animation: damage 0.3s ease-in-out; }

/* Combat UI */
.combat-ui {
    background: #000;
    border-top: 6px solid #fff;
    height: 35vh;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.question-box {
    flex: 2;
    border: 4px solid #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.question-box p {
    margin: 0 0 15px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
}

.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    background: #000;
    color: #fff;
    border: 4px solid #fff;
    padding: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.1s;
    text-align: left;
}

.pixel-btn:hover {
    background: #fff;
    color: #000;
}

.combat-log {
    flex: 1;
    border: 4px solid #fff;
    padding: 15px;
    font-size: 0.7rem;
    line-height: 1.8;
    overflow-y: auto;
}

.flee-btn {
    align-self: flex-start;
    border-color: #ff4444;
    color: #ff4444;
}

.flee-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* Modals */
.pixel-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pixel-modal-content {
    background: #000;
    border: 6px solid #fff;
    padding: 30px;
    text-align: center;
    max-width: 400px;
}

.pixel-modal-content h2 {
    color: #ffd700;
    margin-top: 0;
}

.pixel-modal-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
