:root { --gold: #daa520; --gold-light: #f1c40f; --bg-dark: #0c0a09; --panel-bg: linear-gradient(135deg, #1c1512 0%, #0a0806 100%); --border-panel: #b8860b; }
body { background-color: var(--bg-dark); background-image: radial-gradient(circle at center, #1c1512 0%, #050403 100%); color: #e5e5e5; font-family: 'Georgia', serif; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; box-sizing: border-box; }
.game-layout { display: grid; grid-template-columns: 400px 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 20px; max-width: 950px; width: 100%; height: calc(100vh - 40px); max-height: 850px; min-height: 650px; }
.board-column { grid-column: 1 / 2; grid-row: 1 / 2; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.dashboard-column { grid-column: 2 / 3; grid-row: 1 / 2; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.medieval-panel { background: var(--panel-bg); border: 2px solid var(--border-panel); border-radius: 4px; padding: 12px 15px; box-shadow: inset 0 0 20px rgba(0,0,0,0.9), 0 5px 10px rgba(0,0,0,0.6); position: relative; }
.medieval-panel::after { content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px; border: 1px solid rgba(184, 134, 11, 0.2); pointer-events: none; }
.panel-title { color: var(--gold); text-align: center; font-size: 13px; margin: 0 0 10px 0; padding-bottom: 5px; border-bottom: 1px solid #5c4018; text-transform: uppercase; letter-spacing: 1px; text-shadow: 1px 1px 2px #000; }
.dice-panel { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.dice-grid { display: flex; justify-content: space-around; align-items: center; width: 100%; padding-top: 5px; }
.dice-svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.8)); cursor: pointer; z-index: 2; transition: transform 0.2s ease, filter 0.2s ease; user-select: none; }
.dice-svg:hover { transform: translateY(-5px) scale(1.15) rotate(5deg); filter: drop-shadow(0 8px 12px rgba(241,196,15,0.4)); }
.dice-svg:active { transform: scale(0.9); }
.rolling { animation: roll-anim 0.3s infinite linear; pointer-events: none; }
@keyframes roll-anim { 0% { transform: rotate(0deg) scale(1.1); } 25% { transform: rotate(15deg) scale(1.1) translateY(-5px); } 50% { transform: rotate(0deg) scale(1.2); } 75% { transform: rotate(-15deg) scale(1.1) translateY(-5px); } 100% { transform: rotate(0deg) scale(1.1); } }
.game-container-wrapper { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; }
.game-container { position: relative; height: 100%; max-height: 533px; aspect-ratio: 400 / 533; overflow: hidden; border: 3px solid var(--border-panel); border-radius: 4px; box-shadow: 0 0 20px rgba(0,0,0,0.9), 0 0 15px rgba(218,165,32,0.15); background-color: #000; }
.background-video { width: 100%; height: 100%; object-fit: contain; background-color: black; }
.grid-overlay { position: absolute; top: 7.5%; left: 20%; width: 60%; height: 87%; padding-top: 2%; padding-bottom: 2.5%; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(12, 1fr); box-sizing: border-box; pointer-events: auto; }
.cell { box-sizing: border-box; border: 1px solid rgba(255, 255, 255, 0.03); cursor: pointer; background-color: transparent; transition: all 0.3s ease; }
.cell.selected { background-color: rgba(0, 200, 255, 0.3); box-shadow: inset 0 0 10px rgba(0, 200, 255, 0.6); }
.door-entrance { border-bottom: 3px solid var(--gold) !important; background: radial-gradient(circle at bottom, rgba(218,165,32,0.3) 0%, transparent 70%); }
.door-exit { border-top: 3px solid #22c55e !important; background: radial-gradient(circle at top, rgba(34,197,94,0.3) 0%, transparent 70%); }
.hero { position: absolute; width: calc(60% / 7); height: calc(87% / 12); z-index: 2; pointer-events: none; overflow: hidden; padding-bottom: 50%; transition: top 0.25s ease, left 0.25s ease; }
.hero video { width: 100%; height: 100%; object-fit: fill; position: absolute; top: 0; left: 0; }
.mission-card { background: linear-gradient(to bottom, #d2b48c, #a0522d); color: #3e2723; border-color: #5c4018; flex-shrink: 0;}
.mission-card .panel-title { color: #3e2723; border-bottom-color: #5c4018; text-shadow: none; font-weight: bold; }
.mission-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 15px; font-size: 12.5px; font-weight: bold; }
.mission-stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(92,64,24,0.3); padding-bottom: 3px; }
.map-panel { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.map-grid { display: grid; grid-template-columns: repeat(31, 8px); grid-template-rows: repeat(16, 8px); background-color: #050403; border: 2px solid #2c2016; padding: 2px; box-shadow: 0 4px 8px rgba(0,0,0,0.8); }
.m-cell { width: 8px; height: 8px; box-sizing: border-box; position: relative; }
.m-floor { background-color: #241c16; } .m-main-room { background-color: #2c231c; } 
.m-wall-t { border-top: 1px solid #ab8042; } .m-wall-b { border-bottom: 1px solid #ab8042; }
.m-wall-l { border-left: 1px solid #ab8042; } .m-wall-r { border-right: 1px solid #ab8042; }
.m-marker { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 1px; z-index: 10; }
.m-entrance { background-color: #f1c40f; box-shadow: 0 0 4px #f1c40f; }
.m-exit { background-color: #2ecc71; box-shadow: 0 0 4px #2ecc71; }
.m-player { background-color: #3498db; box-shadow: 0 0 5px #3498db; z-index: 15; border-radius: 50%;}
.legend { display: flex; gap: 15px; margin-top: 10px; font-size: 11px; color: #a89f91; justify-content: center; width: 100%;}
.legend-box { width: 10px; height: 10px; border-radius: 2px; border: 1px solid #000; display: inline-block; margin-right: 3px; vertical-align: middle;}
.action-log-panel { flex-grow: 1; display: flex; flex-direction: column; min-height: 180px; }
.log-container { flex-grow: 1; font-size: 12px; display: flex; flex-direction: column; gap: 5px; padding-right: 5px; font-family: 'Courier New', Courier, monospace; letter-spacing: 0.5px; overflow-y: auto; height: 0; }
.log-msg { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; line-height: 1.4; }
.log-container::-webkit-scrollbar { width: 6px; } .log-container::-webkit-scrollbar-track { background: #111; } .log-container::-webkit-scrollbar-thumb { background: #5c4018; border-radius: 3px; }
.log-move { color: #3498db; } .log-dice { color: var(--gold-light); font-weight: bold;} .log-success { color: #2ecc71; font-weight: bold;} .log-error { color: #e74c3c; } .log-info { color: #d4c2a5; }     
.hud-bar { grid-column: 1 / -1; grid-row: 2 / 3; background-image: url('/img/barra.png'); background-size: cover; background-position: center; background-color: #1c1512; border: 3px solid var(--border-panel); border-radius: 4px; padding: 12px 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; box-sizing: border-box; box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.8); position: relative; flex-shrink: 0; }
.hud-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); pointer-events: none; }
.hud-bar > * { position: relative; z-index: 1; }
.hero-card { display: flex; gap: 15px; align-items: center; }
.hero-portrait { width: 65px; height: 80px; background: linear-gradient(135deg, #2c2016, #150f0a); border: 2px solid var(--border-panel); border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 35px; box-shadow: inset 0 0 15px #000; }
.hero-info { display: flex; flex-direction: column; gap: 4px; min-width: 160px;}
.hero-name { margin: 0; color: var(--gold); font-size: 19px; letter-spacing: 1px; text-shadow: 2px 2px 2px #000; }
.hero-portrait img {width: 60px; height: 60px; object-fit: cover; display: block;}
.hero video { width: 30px; height: 30px; object-fit: contain; display: block; align-items: center; }
.bar-container { height: 14px; background: #000; border: 1px solid #4a3319; border-radius: 2px; position: relative; width: 100%; margin-bottom: 2px; box-shadow: inset 0 0 5px rgba(0,0,0,0.8);}
.bar-fill { height: 100%; transition: width 0.3s ease; }
.bar-hp { background: linear-gradient(90deg, #8b0000, #ff3333); } .bar-mp { background: linear-gradient(90deg, #00008b, #3366ff); }
.bar-text { position: absolute; top: 0; left: 0; right: 0; bottom: 0; text-align: center; line-height: 14px; font-size: 10px; font-weight: bold; color: #fff; text-shadow: 1px 1px 1px #000; }
.skill-panel { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.skill-button { background: linear-gradient(180deg, #2c2016, #150f0a); border: 1px solid var(--border-panel); border-radius: 4px; width: 60px; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; color: #e5e5e5; font-family: inherit; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); transition: 0.2s; }
.skill-button:hover { border-color: var(--gold-light); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.8); }
.skill-button:active { transform: translateY(1px); }
.skill-icon { font-size: 22px; margin-bottom: 2px; filter: drop-shadow(2px 2px 2px #000); }
.skill-name { font-size: 8.5px; text-transform: uppercase; text-align: center; line-height: 1.1; font-weight: bold; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.inv-window { background: #090605; border: 2px solid #ab8042; border-radius: 4px; width: 850px; max-width: 95vw; display: flex; flex-direction: column; box-shadow: 0 0 40px #000, inset 0 0 20px rgba(0,0,0,0.9); position: relative; }
.inv-close-btn { position: absolute; top: -15px; right: -15px; width: 35px; height: 35px; background: #1c1512; border: 2px solid #b8860b; color: #daa520; border-radius: 50%; font-weight: bold; cursor: pointer; box-shadow: 0 0 10px #000; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.inv-close-btn:hover { background: #3e2723; color: #fff; border-color: #f1c40f; }
.inv-tabs-header { display: flex; background: #120d09; border-bottom: 2px solid #ab8042; padding-top: 10px; padding-left: 20px; gap: 5px; }
.inv-tab-btn { padding: 10px 40px; background: #1a130f; border: 1px solid #5c4018; border-bottom: none; color: #a89f91; font-weight: bold; border-radius: 6px 6px 0 0; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; cursor: default; margin-bottom: -2px; z-index: 2; }
.inv-tab-btn.active { background: #0a0705; color: #f1c40f; border-color: #ab8042; border-bottom: 2px solid #0a0705; padding-bottom: 12px; }
.inv-body { display: flex; gap: 20px; padding: 20px; background: #0a0705; flex-wrap: wrap;}
.inv-pane { flex: 1; min-width: 300px; display: flex; flex-direction: column; border: 1px solid #3d2b1f; border-radius: 4px; padding: 15px; background: #100b08; }
.inv-pane-title { color: #daa520; text-align: center; font-size: 14px; margin: 0 0 15px 0; border-bottom: 1px solid #3d2b1f; padding-bottom: 10px; letter-spacing: 1px; }
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.inv-slot { aspect-ratio: 1 / 1.15; background: linear-gradient(135deg, #1c1512, #0a0806); border: 1px solid #2a1f12; border-radius: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; cursor: pointer; transition: 0.2s; }
.inv-slot:hover, .inv-slot.selected { border-color: #f1c40f; box-shadow: inset 0 0 15px rgba(241,196,15,0.2); background: #2c2016; }
.inv-slot.empty { cursor: default; } .inv-slot.empty:hover { border-color: #2a1f12; box-shadow: none; background: linear-gradient(135deg, #1c1512, #0a0806); }
.inv-slot.empty::after { content: '✥'; color: #2a1e15; font-size: 24px; }
.item-icon { font-size: 32px; filter: drop-shadow(2px 2px 2px #000); margin-bottom: 10px; }
.item-qty { position: absolute; bottom: 22px; right: 5px; color: #fff; font-size: 11px; font-weight: bold; text-shadow: 1px 1px 2px #000; }
.item-name { position: absolute; bottom: 5px; font-size: 10px; color: #d4c2a5; text-align: center; width: 100%; line-height: 1.1; }
.inv-detail { display: flex; border-top: 1px solid #3d2b1f; padding-top: 15px; gap: 15px; align-items: center; margin-top: auto; min-height: 80px; }
.detail-icon-box { width: 55px; height: 55px; background: #050403; border: 1px solid #3d2b1f; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 32px; }
.detail-info { flex: 1; }
.detail-title { color: #f1c40f; font-size: 15px; margin: 0 0 4px 0; font-weight: bold; }
.detail-desc { color: #a89f91; font-size: 12px; margin: 0 0 6px 0; line-height: 1.3; }
.detail-meta { display: flex; justify-content: space-between; font-size: 11px; color: #777; }
.btn-use { background: linear-gradient(to bottom, #2ecc71, #1e8449); border: 1px solid #229954; color: #fff; padding: 8px 15px; border-radius: 3px; cursor: pointer; font-weight: bold; font-family: inherit; font-size: 12px; text-shadow: 1px 1px 2px #000; letter-spacing: 1px; transition: 0.2s; }
.btn-use:hover { filter: brightness(1.2); }
.spell-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 5px; max-height: 350px;}
.spell-list::-webkit-scrollbar { width: 5px; } .spell-list::-webkit-scrollbar-thumb { background: #3d2b1f; border-radius: 3px; }
.spell-item { display: flex; background: linear-gradient(90deg, #150f0a, #0c0a08); border: 1px solid #3d2b1f; padding: 10px; border-radius: 4px; gap: 12px; align-items: center; }
.spell-icon-box { width: 44px; height: 44px; background: #000; border: 1px solid #555; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 24px; box-shadow: inset 0 0 10px rgba(255,255,255,0.1); flex-shrink: 0; }
.spell-info { flex: 1; } .spell-title { margin: 0 0 4px 0; font-size: 14px; font-weight: bold; } .spell-desc { margin: 0; font-size: 11px; line-height: 1.2; }
.spell-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 85px; }
.spell-cost { font-size: 14px; font-weight: bold; display: flex; align-items: center; gap: 4px; }
.btn-cast { background: linear-gradient(to bottom, #5b2c6f, #3e1b4d); border: 1px solid #8e44ad; color: #d7b5f5; padding: 5px 15px; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: bold; font-family: inherit; transition: 0.2s; letter-spacing: 1px; width: 100%;}
.btn-cast:hover { filter: brightness(1.2); color: #fff; }
.btn-locked { background: #1a1a1a; border: 1px solid #333; color: #666; padding: 5px 10px; border-radius: 3px; font-size: 11px; font-weight: bold; font-family: inherit; width: 100%; cursor: not-allowed; }
@media (max-width: 850px) {
    body { overflow-y: auto; padding: 10px; }
    .game-layout { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; max-height: none; }
    .board-column { grid-column: 1 / -1; grid-row: 1; max-width: 450px; margin: 0 auto; width: 100%;}
    .dashboard-column { grid-column: 1 / -1; grid-row: 2; max-width: 450px; margin: 0 auto; width: 100%;}
    .hud-bar { grid-column: 1 / -1; grid-row: 3; max-width: 450px; margin: 0 auto; width: 100%; justify-content: center;}
    .game-container-wrapper { height: auto; display: block; }
    .game-container { aspect-ratio: 400 / 533; height: auto; width: 100%; max-width: none; }
    .action-log-panel { min-height: 200px; }
    .inv-body { flex-direction: column; } 
}
:root { --gold: #daa520; --gold-light: #f1c40f; --bg-dark: #0c0a09; --panel-bg: linear-gradient(135deg, #1c1512 0%, #0a0806 100%); --border-panel: #b8860b; }
body { background-color: var(--bg-dark); background-image: radial-gradient(circle at center, #1c1512 0%, #050403 100%); color: #e5e5e5; font-family: 'Georgia', serif; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; box-sizing: border-box; }
.game-layout { display: grid; grid-template-columns: 400px 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 20px; max-width: 950px; width: 100%; height: calc(100vh - 40px); max-height: 850px; min-height: 650px; }
.board-column { grid-column: 1 / 2; grid-row: 1 / 2; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.dashboard-column { grid-column: 2 / 3; grid-row: 1 / 2; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.medieval-panel { background: var(--panel-bg); border: 2px solid var(--border-panel); border-radius: 4px; padding: 12px 15px; box-shadow: inset 0 0 20px rgba(0,0,0,0.9), 0 5px 10px rgba(0,0,0,0.6); position: relative; }
.medieval-panel::after { content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px; border: 1px solid rgba(184, 134, 11, 0.2); pointer-events: none; }
.panel-title { color: var(--gold); text-align: center; font-size: 13px; margin: 0 0 10px 0; padding-bottom: 5px; border-bottom: 1px solid #5c4018; text-transform: uppercase; letter-spacing: 1px; text-shadow: 1px 1px 2px #000; }
.dice-panel { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.dice-grid { display: flex; justify-content: space-around; align-items: center; width: 100%; padding-top: 5px; }
.dice-svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.8)); cursor: pointer; z-index: 2; transition: transform 0.2s ease, filter 0.2s ease; user-select: none; }
.dice-svg:hover { transform: translateY(-5px) scale(1.15) rotate(5deg); filter: drop-shadow(0 8px 12px rgba(241,196,15,0.4)); }
.dice-svg:active { transform: scale(0.9); }
.rolling { animation: roll-anim 0.3s infinite linear; pointer-events: none; }
@keyframes roll-anim { 0% { transform: rotate(0deg) scale(1.1); } 25% { transform: rotate(15deg) scale(1.1) translateY(-5px); } 50% { transform: rotate(0deg) scale(1.2); } 75% { transform: rotate(-15deg) scale(1.1) translateY(-5px); } 100% { transform: rotate(0deg) scale(1.1); } }
.game-container-wrapper { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; }
.game-container { position: relative; height: 100%; max-height: 533px; aspect-ratio: 400 / 533; overflow: hidden; border: 3px solid var(--border-panel); border-radius: 4px; box-shadow: 0 0 20px rgba(0,0,0,0.9), 0 0 15px rgba(218,165,32,0.15); background-color: #000; }
.background-video { width: 100%; height: 100%; object-fit: contain; background-color: black; }
.grid-overlay { position: absolute; top: 7.5%; left: 20%; width: 60%; height: 87%; padding-top: 2%; padding-bottom: 2.5%; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(12, 1fr); box-sizing: border-box; pointer-events: auto; }
.cell { box-sizing: border-box; border: 1px solid rgba(255, 255, 255, 0.03); cursor: pointer; background-color: transparent; transition: all 0.3s ease; }
.cell.selected { background-color: rgba(0, 200, 255, 0.3); box-shadow: inset 0 0 10px rgba(0, 200, 255, 0.6); }
.door-entrance { border-bottom: 3px solid var(--gold) !important; background: radial-gradient(circle at bottom, rgba(218,165,32,0.3) 0%, transparent 70%); }
.door-exit { border-top: 3px solid #22c55e !important; background: radial-gradient(circle at top, rgba(34,197,94,0.3) 0%, transparent 70%); }
.hero { position: absolute; width: calc(60% / 7); height: calc(87% / 12); z-index: 2; pointer-events: none; overflow: hidden; padding-bottom: 50%; transition: top 0.25s ease, left 0.25s ease; }
.hero video { width: 100%; height: 100%; object-fit: fill; position: absolute; top: 0; left: 0; }
.mission-card { background: linear-gradient(to bottom, #d2b48c, #a0522d); color: #3e2723; border-color: #5c4018; flex-shrink: 0;}
.mission-card .panel-title { color: #3e2723; border-bottom-color: #5c4018; text-shadow: none; font-weight: bold; }
.mission-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 15px; font-size: 12.5px; font-weight: bold; }
.mission-stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(92,64,24,0.3); padding-bottom: 3px; }
.map-panel { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.map-grid { display: grid; grid-template-columns: repeat(31, 8px); grid-template-rows: repeat(16, 8px); background-color: #050403; border: 2px solid #2c2016; padding: 2px; box-shadow: 0 4px 8px rgba(0,0,0,0.8); }
.m-cell { width: 8px; height: 8px; box-sizing: border-box; position: relative; }
.m-floor { background-color: #241c16; } .m-main-room { background-color: #2c231c; } 
.m-wall-t { border-top: 1px solid #ab8042; } .m-wall-b { border-bottom: 1px solid #ab8042; }
.m-wall-l { border-left: 1px solid #ab8042; } .m-wall-r { border-right: 1px solid #ab8042; }
.m-marker { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 1px; z-index: 10; }
.m-entrance { background-color: #f1c40f; box-shadow: 0 0 4px #f1c40f; }
.m-exit { background-color: #2ecc71; box-shadow: 0 0 4px #2ecc71; }
.m-player { background-color: #3498db; box-shadow: 0 0 5px #3498db; z-index: 15; border-radius: 50%;}
.legend { display: flex; gap: 15px; margin-top: 10px; font-size: 11px; color: #a89f91; justify-content: center; width: 100%;}
.legend-box { width: 10px; height: 10px; border-radius: 2px; border: 1px solid #000; display: inline-block; margin-right: 3px; vertical-align: middle;}
.action-log-panel { flex-grow: 1; display: flex; flex-direction: column; min-height: 180px; }
.log-container { flex-grow: 1; font-size: 12px; display: flex; flex-direction: column; gap: 5px; padding-right: 5px; font-family: 'Courier New', Courier, monospace; letter-spacing: 0.5px; overflow-y: auto; height: 0; }
.log-msg { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; line-height: 1.4; }
.log-container::-webkit-scrollbar { width: 6px; } .log-container::-webkit-scrollbar-track { background: #111; } .log-container::-webkit-scrollbar-thumb { background: #5c4018; border-radius: 3px; }
.log-move { color: #3498db; } .log-dice { color: var(--gold-light); font-weight: bold;} .log-success { color: #2ecc71; font-weight: bold;} .log-error { color: #e74c3c; } .log-info { color: #d4c2a5; }     
.hud-bar { grid-column: 1 / -1; grid-row: 2 / 3; background-image: url('/img/barra.png'); background-size: cover; background-position: center; background-color: #1c1512; border: 3px solid var(--border-panel); border-radius: 4px; padding: 12px 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; box-sizing: border-box; box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.8); position: relative; flex-shrink: 0; }
.hud-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); pointer-events: none; }
.hud-bar > * { position: relative; z-index: 1; }
.hero-card { display: flex; gap: 15px; align-items: center; }
.hero-portrait { width: 65px; height: 80px; background: linear-gradient(135deg, #2c2016, #150f0a); border: 2px solid var(--border-panel); border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 35px; box-shadow: inset 0 0 15px #000; }
.hero-info { display: flex; flex-direction: column; gap: 4px; min-width: 160px;}
.hero-name { margin: 0; color: var(--gold); font-size: 19px; letter-spacing: 1px; text-shadow: 2px 2px 2px #000; }
.hero-portrait img {width: 60px; height: 60px; object-fit: cover; display: block;}
.hero video { width: 30px; height: 30px; object-fit: contain; display: block; align-items: center; }
.bar-container { height: 14px; background: #000; border: 1px solid #4a3319; border-radius: 2px; position: relative; width: 100%; margin-bottom: 2px; box-shadow: inset 0 0 5px rgba(0,0,0,0.8);}
.bar-fill { height: 100%; transition: width 0.3s ease; }
.bar-hp { background: linear-gradient(90deg, #8b0000, #ff3333); } .bar-mp { background: linear-gradient(90deg, #00008b, #3366ff); }
.bar-text { position: absolute; top: 0; left: 0; right: 0; bottom: 0; text-align: center; line-height: 14px; font-size: 10px; font-weight: bold; color: #fff; text-shadow: 1px 1px 1px #000; }
.skill-panel { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.skill-button { background: linear-gradient(180deg, #2c2016, #150f0a); border: 1px solid var(--border-panel); border-radius: 4px; width: 60px; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; color: #e5e5e5; font-family: inherit; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); transition: 0.2s; }
.skill-button:hover { border-color: var(--gold-light); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.8); }
.skill-button:active { transform: translateY(1px); }
.skill-icon { font-size: 22px; margin-bottom: 2px; filter: drop-shadow(2px 2px 2px #000); }
.skill-name { font-size: 8.5px; text-transform: uppercase; text-align: center; line-height: 1.1; font-weight: bold; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.inv-window { background: #090605; border: 2px solid #ab8042; border-radius: 4px; width: 850px; max-width: 95vw; display: flex; flex-direction: column; box-shadow: 0 0 40px #000, inset 0 0 20px rgba(0,0,0,0.9); position: relative; }
.inv-close-btn { position: absolute; top: -15px; right: -15px; width: 35px; height: 35px; background: #1c1512; border: 2px solid #b8860b; color: #daa520; border-radius: 50%; font-weight: bold; cursor: pointer; box-shadow: 0 0 10px #000; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.inv-close-btn:hover { background: #3e2723; color: #fff; border-color: #f1c40f; }
.inv-tabs-header { display: flex; background: #120d09; border-bottom: 2px solid #ab8042; padding-top: 10px; padding-left: 20px; gap: 5px; }
.inv-tab-btn { padding: 10px 40px; background: #1a130f; border: 1px solid #5c4018; border-bottom: none; color: #a89f91; font-weight: bold; border-radius: 6px 6px 0 0; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; cursor: default; margin-bottom: -2px; z-index: 2; }
.inv-tab-btn.active { background: #0a0705; color: #f1c40f; border-color: #ab8042; border-bottom: 2px solid #0a0705; padding-bottom: 12px; }
.inv-body { display: flex; gap: 20px; padding: 20px; background: #0a0705; flex-wrap: wrap;}
.inv-pane { flex: 1; min-width: 300px; display: flex; flex-direction: column; border: 1px solid #3d2b1f; border-radius: 4px; padding: 15px; background: #100b08; }
.inv-pane-title { color: #daa520; text-align: center; font-size: 14px; margin: 0 0 15px 0; border-bottom: 1px solid #3d2b1f; padding-bottom: 10px; letter-spacing: 1px; }
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.inv-slot { aspect-ratio: 1 / 1.15; background: linear-gradient(135deg, #1c1512, #0a0806); border: 1px solid #2a1f12; border-radius: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; cursor: pointer; transition: 0.2s; }
.inv-slot:hover, .inv-slot.selected { border-color: #f1c40f; box-shadow: inset 0 0 15px rgba(241,196,15,0.2); background: #2c2016; }
.inv-slot.empty { cursor: default; } .inv-slot.empty:hover { border-color: #2a1f12; box-shadow: none; background: linear-gradient(135deg, #1c1512, #0a0806); }
.inv-slot.empty::after { content: '✥'; color: #2a1e15; font-size: 24px; }
.item-icon { font-size: 32px; filter: drop-shadow(2px 2px 2px #000); margin-bottom: 10px; }
.item-qty { position: absolute; bottom: 22px; right: 5px; color: #fff; font-size: 11px; font-weight: bold; text-shadow: 1px 1px 2px #000; }
.item-name { position: absolute; bottom: 5px; font-size: 10px; color: #d4c2a5; text-align: center; width: 100%; line-height: 1.1; }
.inv-detail { display: flex; border-top: 1px solid #3d2b1f; padding-top: 15px; gap: 15px; align-items: center; margin-top: auto; min-height: 80px; }
.detail-icon-box { width: 55px; height: 55px; background: #050403; border: 1px solid #3d2b1f; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 32px; }
.detail-info { flex: 1; }
.detail-title { color: #f1c40f; font-size: 15px; margin: 0 0 4px 0; font-weight: bold; }
.detail-desc { color: #a89f91; font-size: 12px; margin: 0 0 6px 0; line-height: 1.3; }
.detail-meta { display: flex; justify-content: space-between; font-size: 11px; color: #777; }
.btn-use { background: linear-gradient(to bottom, #2ecc71, #1e8449); border: 1px solid #229954; color: #fff; padding: 8px 15px; border-radius: 3px; cursor: pointer; font-weight: bold; font-family: inherit; font-size: 12px; text-shadow: 1px 1px 2px #000; letter-spacing: 1px; transition: 0.2s; }
.btn-use:hover { filter: brightness(1.2); }
.spell-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 5px; max-height: 350px;}
.spell-list::-webkit-scrollbar { width: 5px; } .spell-list::-webkit-scrollbar-thumb { background: #3d2b1f; border-radius: 3px; }
.spell-item { display: flex; background: linear-gradient(90deg, #150f0a, #0c0a08); border: 1px solid #3d2b1f; padding: 10px; border-radius: 4px; gap: 12px; align-items: center; }
.spell-icon-box { width: 44px; height: 44px; background: #000; border: 1px solid #555; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 24px; box-shadow: inset 0 0 10px rgba(255,255,255,0.1); flex-shrink: 0; }
.spell-info { flex: 1; } .spell-title { margin: 0 0 4px 0; font-size: 14px; font-weight: bold; } .spell-desc { margin: 0; font-size: 11px; line-height: 1.2; }
.spell-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 85px; }
.spell-cost { font-size: 14px; font-weight: bold; display: flex; align-items: center; gap: 4px; }
.btn-cast { background: linear-gradient(to bottom, #5b2c6f, #3e1b4d); border: 1px solid #8e44ad; color: #d7b5f5; padding: 5px 15px; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: bold; font-family: inherit; transition: 0.2s; letter-spacing: 1px; width: 100%;}
.btn-cast:hover { filter: brightness(1.2); color: #fff; }
.btn-locked { background: #1a1a1a; border: 1px solid #333; color: #666; padding: 5px 10px; border-radius: 3px; font-size: 11px; font-weight: bold; font-family: inherit; width: 100%; cursor: not-allowed; }
/* --- EFECTO DEL ANILLO DE SELECCIÓN PARA LEONHART --- */
.cell {
    position: relative; /* Necesario para que el anillo se centre bien */
    z-index: 1;
}

/* Elevamos la casilla seleccionada para que el anillo no se corte */
.cell.selected {
    z-index: 10;
}

/* El anillo mágico cyan */
.cell.selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    
    border: 2px solid #4ba3e3;
    border-radius: 50%; 
    box-shadow: 0 0 18px rgba(75, 163, 227, 0.8), inset 0 0 10px rgba(75, 163, 227, 0.5);
    
    pointer-events: none;
    animation: pulso-anillo 0.5s ease-out forwards;
}

/* Estilos del iframe del Mapa */
.map-iframe {
    width: 100%;
    height: 180px; 
    border: 1px solid rgba(218, 165, 32, 0.4); /* Usando un tono derivado de tu --gold */
    background-color: #000; 
    border-radius: 4px;
    margin-bottom: 10px;
    display: block;
}

/* La animación de expansión */
@keyframes pulso-anillo {
    0% {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
        border-width: 3px;
    }
}
@media (max-width: 850px) {
    body { overflow-y: auto; padding: 10px; }
    .game-layout { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; max-height: none; }
    .board-column { grid-column: 1 / -1; grid-row: 1; max-width: 450px; margin: 0 auto; width: 100%;}
    .dashboard-column { grid-column: 1 / -1; grid-row: 2; max-width: 450px; margin: 0 auto; width: 100%;}
    .hud-bar { grid-column: 1 / -1; grid-row: 3; max-width: 450px; margin: 0 auto; width: 100%; justify-content: center;}
    .game-container-wrapper { height: auto; display: block; }
    .game-container { aspect-ratio: 400 / 533; height: auto; width: 100%; max-width: none; }
    .action-log-panel { min-height: 200px; }
    .inv-body { flex-direction: column; }
}
