/* =============================================
   DIABLO RPG — Floating Button & Modal Styles
   ============================================= */

/* ---------- Floating Button ---------- */
#diablo-rpg-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1a0000 0%, #4a0000 50%, #7a0000 100%);
    color: #e8c070;
    border: 2px solid #8b1a1a;
    border-radius: 6px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(180, 0, 0, 0.6), inset 0 1px 0 rgba(255,180,50,0.15);
    transition: all 0.2s ease;
    text-shadow: 0 0 8px rgba(220, 150, 50, 0.8);
}

#diablo-rpg-btn:hover {
    background: linear-gradient(135deg, #2a0000 0%, #6a0000 50%, #9a0000 100%);
    box-shadow: 0 0 20px rgba(220, 0, 0, 0.8), inset 0 1px 0 rgba(255,200,80,0.2);
    color: #ffd580;
    border-color: #cc2a2a;
    transform: translateY(-1px);
}

#diablo-rpg-btn svg {
    fill: #e8c070;
    filter: drop-shadow(0 0 4px rgba(220,150,50,0.7));
}

#diablo-rpg-btn span {
    white-space: nowrap;
}

/* ---------- Modal Overlay ---------- */
#diablo-rpg-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

#diablo-rpg-modal.active {
    display: flex;
}

#diablo-rpg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}

/* ---------- Game Window ---------- */
#diablo-rpg-window {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(900px, 96vw);
    max-height: 96vh;
    background: #0d0000;
    border: 3px solid #6b1a1a;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px #2a0000,
        0 0 40px rgba(150, 0, 0, 0.5),
        0 0 80px rgba(100, 0, 0, 0.3);
    overflow: hidden;
}

/* ---------- Header ---------- */
#diablo-rpg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(90deg, #1a0000, #3a0000, #1a0000);
    border-bottom: 2px solid #6b1a1a;
}

#diablo-rpg-title {
    font-family: 'Georgia', serif;
    font-size: 16px;
    font-weight: bold;
    color: #e8c070;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(220, 140, 40, 0.8), 0 0 20px rgba(200, 50, 50, 0.5);
}

#diablo-rpg-close {
    background: none;
    border: 1px solid #6b1a1a;
    border-radius: 4px;
    color: #e8c070;
    font-size: 16px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

#diablo-rpg-close:hover {
    background: #4a0000;
    color: #fff;
    border-color: #cc2222;
}

/* ---------- Body & Canvas ---------- */
#diablo-rpg-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 12px 8px;
    gap: 8px;
    background: #080000;
}

#diablo-canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 2px solid #3a0000;
    border-radius: 4px;
    max-width: 100%;
    box-shadow: 0 0 20px rgba(180, 0, 0, 0.3);
}

/* ---------- Controls Bar ---------- */
#diablo-rpg-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    font-family: 'Georgia', serif;
    font-size: 11px;
    color: #8a6a30;
}

#diablo-rpg-controls kbd {
    background: #1a0a00;
    border: 1px solid #5a3010;
    border-radius: 3px;
    padding: 1px 5px;
    color: #c8a050;
    font-family: monospace;
    font-size: 11px;
}
