.overlay-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2c3e50;
    border: 3px solid #34495e;
    border-radius: 8px;
    z-index: 10000;
    color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    padding: 20px;
    min-width: 400px;
}

.overlay-panel.fullscreen {
    width: 90vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #34495e;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.close-btn {
    background: #e74c3c;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
}

.inventory-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    background: #34495e;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.tab-btn.active {
    background: #3498db;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.inventory-item {
    background: #34495e;
    border: 2px solid #7f8c8d;
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    font-size: 11px;
    position: relative;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: help;
}

.item-quality {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #27ae60;
    color: white;
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 2px;
}

.item-aura-rare { box-shadow: 0 0 5px #3498db; border-color: #3498db; }
.item-aura-epic { box-shadow: 0 0 8px #9b59b6; border-color: #9b59b6; }
.item-aura-legendary { box-shadow: 0 0 12px #f1c40f; border-color: #f1c40f; }

.dungeon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dungeon-scene {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.battle-side {
    text-align: center;
    width: 200px;
}

.army-visual, .boss-visual {
    font-size: 80px;
    margin-bottom: 20px;
}

.side-hp-bar {
    width: 100%;
    height: 20px;
    background: #34495e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.hp-fill {
    height: 100%;
    background: #e74c3c;
    width: 100%;
    transition: width 0.3s;
}

.battle-vs {
    font-size: 40px;
    font-weight: bold;
    color: #e67e22;
}

.combat-log {
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 4px;
    height: 150px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
}

.panel-divider {
    grid-column: span 2;
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    border-top: 1px solid #34495e;
    padding-top: 10px;
    text-align: left;
}

.button-group.scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.cost-label {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 4px;
}

.key-hint {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 12px;
    background: rgba(0,0,0,0.5);
    padding: 2px 4px;
    border-radius: 3px;
}
