body, html { margin: 0; padding: 0; overflow: hidden; background: #111; font-family: 'Courier New', Courier, monospace; }
#gameCanvas { display: block; touch-action: none; }
#ui-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

#btn-settings {
    position: absolute; top: 10px; right: 10px; font-size: 28px; 
    background: none; border: none; cursor: pointer; pointer-events: auto;
    text-shadow: 2px 2px 4px black; z-index: 50;
}

#stats { 
    pointer-events: auto; background: rgba(0,0,0,0.8); color: gold; 
    padding: 10px; border-bottom: 2px solid gold; border-right: 2px solid gold;
    border-bottom-right-radius: 10px; width: fit-content; text-shadow: 1px 1px 2px black;
}

#minimap-container {
    position: absolute; bottom: 20px; right: 20px; width: 150px; height: 150px;
    background: rgba(0,0,0,0.5); border: 2px solid #555; pointer-events: auto; overflow: hidden;
}
#minimapCanvas { width: 100%; height: 100%; }

.modal {
    display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); pointer-events: auto;
}
.modal-content {
    background-color: #2c3e50; color: white; margin: 10vh auto; padding: 0 20px 20px 20px;
    border: 2px solid gold; border-radius: 8px; width: 330px; font-family: sans-serif;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); max-height: 80vh; overflow-y: auto;
    position: relative; scroll-behavior: smooth;
}
/* Sticky Header logic */
.modal-content h2 { 
    position: sticky; top: -5px; background: #2c3e50; 
    z-index: 10; margin: 0; padding: 20px 0 10px 0; 
    color: gold; text-align: center; border-bottom: 2px solid rgba(255,215,0,0.5);
    margin-bottom: 15px;
}
.close-modal { 
    position: sticky; top: 0px; float: right; z-index: 20;
    color: #ff4757; font-size: 24px; font-weight: bold; cursor: pointer;
    line-height: 1; margin-top: 15px; margin-right: -10px; transition: 0.2s;
    background: rgba(0,0,0,0.2); width: 30px; height: 30px; 
    display: flex; align-items: center; justify-content: center; border-radius: 5px;
}
.close-modal:hover { color: #ff4757; transform: scale(1.2); }

.action-list button:not(.info-btn) {
    display: block; width: 100%; padding: 10px;
    background-color: #34495e; color: white; border: 1px solid gold;
    border-radius: 5px; cursor: pointer; font-size: 13px; text-align: left;
    transition: 0.2s; position: relative;
}
.action-list button:not(.info-btn):hover { background-color: #f39c12; color: black; }
.action-list hr { border-color: #555; margin: 10px 0; }

.info-btn {
    background: #3498db !important;
    color: white !important;
    border: 1px solid #fff !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    font-size: 14px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.info-btn:hover { transform: scale(1.1); background: #2980b9; }

.item-btn-container {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

#info-stats {
    margin-top: 15px; color: #00ff00; font-weight: bold; background: rgba(0,0,0,0.4); 
    padding: 12px; border-radius: 5px; border-left: 4px solid #00ff00;
}
#info-desc { color: #fff; line-height: 1.5; padding: 10px; font-style: italic; }

