/* --- RESET GENERAL --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    height: 100svh; 
    overflow: hidden; 
    box-sizing: border-box;
}

body {
    background-color: #d1d5db;
    background-image: url('fondo-desktop.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Courier New', Courier, monospace;
    color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
}

/* --- CONTENEDOR CENTRAL (ESTILO COLUMNA VERTICAL UNIFICADA) --- */
#main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 450px; /* Mantiene el juego como una app móvil al centro de la pantalla en PC */
    height: calc(100% - 140px); 
    overflow-y: auto;
    padding-bottom: 10px;
}

/* --- SECCIONES INTERNAS --- */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.stats-panel {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border: 2px solid #222;
    box-shadow: 4px 4px 0px #222;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-box {
    font-weight: bold;
    font-size: 0.9em;
}

.avatar-container {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #222;
    box-shadow: 4px 4px 0px #222;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: 120px;
}

#player-sprite {
    max-height: 100%;
    object-fit: contain;
}

/* --- TARJETA DE NARRATIVA --- */
.game-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.card-container {
    background: #fff;
    border: 2px solid #222;
    box-shadow: 4px 4px 0px #222;
}

.card-header {
    background: #222;
    color: #fff;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 0.9em;
}

.card-body {
    padding: 15px;
}

#event-text {
    font-size: 1.05em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.letra-chica {
    font-size: 0.85em;
    color: #555;
    font-style: italic;
    margin: 0;
}

/* --- OPCIONES / BOTONES --- */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-btn {
    background: #f3f4f6;
    border: 2px solid #222;
    padding: 12px 10px;
    font-family: inherit;
    font-size: 0.9em;
    text-align: left;
    cursor: pointer;
    box-shadow: 3px 3px 0px #222;
    transition: transform 0.1s, background 0.1s;
}

.option-btn:hover {
    background: #e5e7eb;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #222;
}

.option-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #222;
}

/* --- INTERFAZ MONETIZACIÓN INFERIOR --- */
#monetization-footer {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-top: 2px dashed #222;
    box-sizing: border-box;
    z-index: 10;
}

.ads-clean-banner {
    width: 100%;
    min-height: 50px;
    background: #f9fafb;
    border: 1px dashed #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    font-size: 0.75em;
    color: #6b7280;
    margin: 0;
}

.cafecito-btn {
    display: inline-block;
    background: #22c55e;
    color: white;
    text-decoration: none;
    font-family: inherit;
    font-weight: bold;
    font-size: 0.85em;
    padding: 8px 12px;
    border-radius: 4px;
    border-bottom: 3px solid #16a34a;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.cafecito-btn:hover {
    background: #16a34a;
}

/* --- RESPONSIVE PARA PANTALLAS GRANDES (Mantiene el layout compacto de celular al centro) --- */
@media (min-width: 768px) {
    body {
        padding-top: 30px;
    }
    #main-layout {
        height: calc(100vh - 200px); /* Ajuste dinámico de altura para monitores */
    }
}
