/**
 * Inventory UI Styles - Fantasy Theme
 * Matches the medieval aesthetic of the main UI
 */

/* ============================================
   INVENTORY CONTAINER
   ============================================ */

#inventory-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.empty-inventory {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(45, 62, 82, 0.6), rgba(107, 142, 35, 0.3));
    border: 2px solid #d4a574;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-inventory p {
    font-size: 1.3em;
    color: #d4a574;
    margin: 10px 0;
    font-family: Georgia, 'Times New Roman', serif;
}

.empty-inventory .hint {
    font-size: 1em;
    color: #95a5a6;
    font-style: italic;
}

/* ============================================
   INVENTORY HEADER
   ============================================ */

.inventory-header {
    background: linear-gradient(135deg, #2d3e52, #1a252f);
    border: 3px solid #d4a574;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5),
                inset 0 2px 4px rgba(212, 165, 116, 0.3);
}

.inventory-header h3 {
    color: #d4a574;
    font-size: 2em;
    margin: 0 0 15px 0;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 0 10px rgba(212, 165, 116, 0.8),
                 0 0 20px rgba(212, 165, 116, 0.4);
}

.inventory-stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    flex-wrap: wrap;
}

.inventory-stats span {
    background: rgba(201, 48, 44, 0.3);
    padding: 8px 15px;
    border-radius: 5px;
    border: 2px solid rgba(212, 165, 116, 0.5);
    color: #ecf0f1;
    font-family: Georgia, serif;
    font-size: 0.95em;
    min-width: 120px;
    text-align: center;
}

/* ============================================
   INVENTORY SECTIONS
   ============================================ */

.inventory-section {
    margin-bottom: 40px;
}

.section-title {
    color: #d4a574;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid rgba(212, 165, 116, 0.5);
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 0 8px rgba(212, 165, 116, 0.6);
}

/* ============================================
   INVENTORY GRID
   ============================================ */

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* ============================================
   INVENTORY ITEM CARD
   ============================================ */

.inventory-item {
    background: linear-gradient(135deg, rgba(45, 62, 82, 0.8), rgba(26, 37, 47, 0.9));
    border: 3px solid #95a5a6;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.inventory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(212, 165, 116, 0.3);
}

/* Equipped highlight */
.inventory-item.equipped {
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(45, 62, 82, 0.8));
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5),
                0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Rarity borders */
.inventory-item.rarity-common {
    border-color: #95a5a6;
}

.inventory-item.rarity-uncommon {
    border-color: #2ecc71;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.inventory-item.rarity-rare {
    border-color: #3498db;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.inventory-item.rarity-epic {
    border-color: #9b59b6;
    box-shadow: 0 4px 10px rgba(155, 89, 182, 0.5);
}

.inventory-item.rarity-legendary {
    border-color: #f39c12;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.7),
                0 4px 10px rgba(0, 0, 0, 0.4);
    animation: legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(243, 156, 18, 0.7);
    }
    50% {
        box-shadow: 0 0 50px rgba(243, 156, 18, 1),
                    0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* ============================================
   ITEM COMPONENTS
   ============================================ */

.item-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 8px rgba(212, 165, 116, 0.5));
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 0 8px currentColor;
}

.item-rarity {
    font-size: 0.85em;
    color: #95a5a6;
    font-style: italic;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.item-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.item-stats .stat {
    color: #ecf0f1;
    font-size: 0.95em;
    font-family: Georgia, serif;
}

.item-description {
    font-size: 0.9em;
    color: #bdc3c7;
    font-style: italic;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

/* ============================================
   ITEM ACTIONS
   ============================================ */

.item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.item-actions button {
    flex: 1;
    padding: 10px;
    border: 2px solid #d4a574;
    border-radius: 5px;
    background: linear-gradient(135deg, #c9302c, #a02622);
    color: #ecf0f1;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.item-actions button:hover {
    background: linear-gradient(135deg, #d4a574, #b8936a);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(212, 165, 116, 0.6),
                0 4px 8px rgba(0, 0, 0, 0.4);
}

.item-actions .btn-equip {
    background: linear-gradient(135deg, #6b8e23, #556b1f);
}

.item-actions .btn-equip:hover {
    background: linear-gradient(135deg, #7fa62d, #6b8e23);
}

.item-actions .btn-unequip {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.item-actions .btn-unequip:hover {
    background: linear-gradient(135deg, #a8b9ba, #95a5a6);
}

.item-actions .btn-sell {
    background: linear-gradient(135deg, #f39c12, #d68910);
}

.item-actions .btn-sell:hover {
    background: linear-gradient(135deg, #ffb74d, #f39c12);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #d4a574;
    color: #ecf0f1;
    font-family: Georgia, serif;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: linear-gradient(135deg, #6b8e23, #556b1f);
    border-color: #7fa62d;
}

.notification-error {
    background: linear-gradient(135deg, #c9302c, #a02622);
    border-color: #e74c3c;
}

.notification-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #5dade2;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .inventory-stats {
        flex-direction: column;
    }

    .inventory-stats span {
        width: 100%;
    }

    #notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}
