* { box-sizing: border-box; }
:root { --bg: #0d1117; --panel: #161b22; --accent: #238636; --danger: #da3633; --border: #30363d; }
body { background: var(--bg); color: white; margin: 0; font-family: sans-serif; overflow: hidden; touch-action: manipulation; }
header { display: flex; justify-content: space-around; padding: 10px; background: #010409; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.hidden { display: none !important; }

.main-nav { display: flex; gap: 5px; padding: 10px; }
.nav-btn { flex: 1; padding: 10px; background: var(--panel); border: 1px solid var(--border); color: white; border-radius: 6px; font-weight: bold; font-size: 0.8rem; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); display: flex; justify-content: center; align-items: flex-start; z-index: 100; padding: 10px; overflow-y: auto; }
.modal-content { background: var(--panel); width: 100%; max-width: 500px; padding: 20px 15px; border-radius: 12px; position: relative; border: 2px solid #30363d; box-shadow: 0 10px 30px rgba(0,0,0,0.5); margin: auto 0; }
.no-scroll { overflow-y: hidden !important; }

.close-btn { position: absolute; top: 12px; right: 12px; background: var(--danger); border: none; color: white; padding: 6px 10px; border-radius: 6px; z-index: 110; cursor: pointer; font-weight: bold; }

.hero-summary-item { background: #0d1117; padding: 10px; margin: 0 10px 6px 10px; border-radius: 6px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); }
.inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 5px; }
.section-title { font-size: 0.8rem; color: #888; margin: 15px 0 8px 0; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }
.section-divider { border-top: 2px solid #333; margin: 20px 0; position: relative; }
.section-divider::after { content: 'OU'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--panel); padding: 0 10px; font-size: 0.6rem; color: #555; }

.item-card { background: #161b22; padding: 6px; border-radius: 6px; text-align: center; border: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; align-items: center; width: 65px; height: 75px; flex-shrink: 0; cursor: pointer; transition: all 0.2s; }
.item-card:hover { border-color: var(--accent); background: #1c2128; transform: translateY(-2px); }
.item-card span { font-size: 1.4rem; display: block; margin-bottom: 2px; }

/* FIX DOS BÔNUS E PREÇOS */
.bonus-tag, .bonus-small { font-size: 0.5rem; color: #2ecc71; display: block; line-height: 1.1; font-weight: bold; }
.comp-box { font-size: 0.45rem; display: flex; flex-direction: column; line-height: 1; gap: 1px; font-weight: bold; width: 100%; }
.comp-box div { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 4px; }
.comp-box span { font-size: 0.45rem; }
.price-tag { font-size: 0.55rem; color: #f1c40f; display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 3px; font-weight: bold; }
.price-tag-sell { font-size: 0.5rem; background: var(--danger); color: white; border-radius: 2px; width: 100%; padding: 1px 0; margin-top: 3px; }
.req-tag { font-size: 0.45rem; color: #e74c3c; display: block; font-weight: normal; }

.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0; }
.slot-box { background: #010409; border: 1px solid #333; padding: 2px; text-align: center; border-radius: 4px; min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
.slot-box small { font-size: 0.45rem; color: #888; text-transform: uppercase; display: block; }
.slot-icon { font-size: 1rem; margin: 1px 0; }

.detail-stats { background: #010409; padding: 10px; border-radius: 10px; margin: 10px 0; border-left: 5px solid var(--accent); font-size: 0.9rem; border: 1px solid var(--border); }
.stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; border-bottom: 1px solid #161b22; padding-bottom: 3px; }
.stat-info { display: flex; align-items: baseline; gap: 6px; }
.stat-info b { font-size: 1rem; color: #fff; }
.stat-actions { display: flex; align-items: center; gap: 8px; }

.btn-up { 
    background: #fff; color: #000; border: none; padding: 5px 15px; border-radius: 6px; cursor: pointer;
    font-weight: 800; font-size: 0.85rem; box-shadow: 0 3px 0 #ccc; transition: all 0.1s;
    min-width: 50px; height: 34px; display: flex; align-items: center; justify-content: center;
}
.btn-up:active { transform: translateY(2px); box-shadow: 0 2px 0 #ccc; }
.btn-up:hover { background: #f0f0f0; }

.main-btn { display: block; width: 90%; margin: 20px auto; padding: 20px; background: var(--accent); color: white; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.skill-section { margin-top: 15px; background: #010409; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.skill-card { display: flex; align-items: center; gap: 10px; }
.skill-icon { font-size: 1.5rem; background: #161b22; padding: 8px; border-radius: 8px; min-width: 45px; text-align: center; }
.skill-info { text-align: left; }
.skill-info h5 { margin: 0; color: #f1c40f; font-size: 0.8rem; }
.skill-info p { margin: 2px 0 0 0; font-size: 0.65rem; color: #aaa; line-height: 1.2; }
.skill-card.locked { opacity: 0.4; filter: grayscale(1); }
.lock-tag { font-size: 0.55rem; color: #e74c3c; font-weight: bold; display: block; margin-top: 2px; }

.stat-highlight { color: #f1c40f; font-weight: bold; text-shadow: 0 0 5px rgba(241, 196, 15, 0.3); }
.stat-info span { cursor: pointer; border-bottom: 1px dotted #555; }
.stat-info span:hover { border-bottom-color: #f1c40f; }
.btn-swap-home { background: var(--accent); color: white; border: none; border-radius: 4px; padding: 4px 8px; font-size: 0.6rem; font-weight: bold; cursor: pointer; }
.hero-summary-item.locked { border: 1px dashed #333; cursor: pointer; }

/* MISSOES STYLES */
.mission-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 5px; }
.mission-card { background: #0d1117; border: 1px solid var(--border); padding: 10px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; border-left: 4px solid #333; }
.mission-card.done { border-left-color: #f1c40f; background: #1a1505; }
.mission-card h5 { margin: 0; font-size: 0.75rem; color: #fff; }
.mission-card p { margin: 3px 0; font-size: 0.6rem; color: #888; }
.mission-card small { font-weight: bold; color: #f1c40f; font-size: 0.6rem; }
.btn-claim { background: #f1c40f; color: #000; border: none; border-radius: 4px; padding: 5px 10px; font-weight: 800; font-size: 0.65rem; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 0 #b7950b; }
.btn-claim:active { transform: translateY(2px); box-shadow: 0 2px 0 #b7950b; }
.btn-locked { color: #444; font-size: 1rem; padding-right: 10px; }

/* CHEST SECTION IN DETAIL */
.chest-section { margin-top: 20px; padding: 12px; background: rgba(0,0,0,0.3); border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 10px; }

#battleCanvas { background: #000; width: 100%; height: 80vh; display: block; }
#battle-hud { position: absolute; top: 60px; left: 10px; pointer-events: none; text-shadow: 1px 1px 2px black; font-size: 0.8rem; }
.heal-btn { background: #2ecc71; color: white; border: none; padding: 4px; border-radius: 4px; font-size: 0.65rem; width: 100%; margin-top: 4px; font-weight: bold; }
