/**
 * D&D AI RPG - Loot System Styles
 * Treasure and loot UI styling
 */

.loot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lootFadeIn 0.3s ease;
}

@keyframes lootFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.loot-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    padding: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(243, 156, 18, 0.3);
}

.loot-modal-content h2 {
    color: #f39c12;
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

/* XP Display */
.loot-xp {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(142, 68, 173, 0.3));
    border: 1px solid #9b59b6;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.xp-icon {
    font-size: 24px;
}

.xp-amount {
    color: #9b59b6;
    font-size: 20px;
    font-weight: bold;
}

/* Gold Display */
.loot-gold {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(230, 126, 34, 0.2));
    border: 1px solid #f39c12;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gold-icon {
    font-size: 20px;
}

.gold-amount {
    color: #f39c12;
    font-size: 20px;
    font-weight: bold;
}

/* Items Section */
.loot-items h3 {
    color: #ecf0f1;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.loot-items-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.loot-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.loot-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(5px);
}

.loot-item.selected {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
}

.loot-item-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.loot-item-info {
    flex: 1;
}

.loot-item-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
}

.loot-item-rarity {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: capitalize;
}

.loot-item-value {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f39c12;
    font-size: 13px;
}

.loot-item-value .gold-icon {
    font-size: 14px;
}

/* Rarity Colors */
.loot-item[style*="border-color: #9e9e9e"] .loot-item-name { color: #9e9e9e; }
.loot-item[style*="border-color: #4caf50"] .loot-item-name { color: #4caf50; }
.loot-item[style*="border-color: #2196f3"] .loot-item-name { color: #2196f3; }
.loot-item[style*="border-color: #9c27b0"] .loot-item-name { color: #9c27b0; }
.loot-item[style*="border-color: #ff9800"] .loot-item-name { color: #ff9800; }

/* Actions */
.loot-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.loot-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loot-btn.take-all {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.loot-btn.take-all:hover {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.loot-btn.close {
    background: rgba(127, 140, 141, 0.3);
    border: 2px solid #7f8c8d;
    color: #bdc3c7;
}

.loot-btn.close:hover {
    background: rgba(127, 140, 141, 0.5);
    border-color: #95a5a6;
}

/* Notification */
.loot-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    z-index: 4000;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.loot-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.5s ease;
}

/* Combat Loot Drop Animation */
.loot-drop-indicator {
    position: absolute;
    animation: lootDrop 1s ease-out forwards;
    font-size: 24px;
    pointer-events: none;
    z-index: 100;
}

@keyframes lootDrop {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
}

/* Scrollbar styling for loot items */
.loot-items-grid::-webkit-scrollbar {
    width: 6px;
}

.loot-items-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.loot-items-grid::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 3px;
}

.loot-items-grid::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

/* Responsive */
@media (max-width: 600px) {
    .loot-modal-content {
        padding: 15px;
        max-width: 95%;
    }

    .loot-item {
        padding: 10px;
    }

    .loot-item-icon {
        font-size: 24px;
        min-width: 32px;
    }

    .loot-actions {
        flex-direction: column;
    }

    .loot-btn {
        width: 100%;
    }
}
