/* Inventory Styles */
.inventory-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.inventory-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.inventory-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.inventory-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.inventory-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.inventory-slot.empty {
    background: rgba(255, 255, 255, 0.05);
    border-style: dashed;
    cursor: default;
}

.inventory-slot.empty:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Item Rarity Borders */
.inventory-slot.rarity-common {
    border-color: #9d9d9d;
}

.inventory-slot.rarity-uncommon {
    border-color: #1eff00;
    box-shadow: 0 0 10px rgba(30, 255, 0, 0.3);
}

.inventory-slot.rarity-epic {
    border-color: #a335ee;
    box-shadow: 0 0 10px rgba(163, 53, 238, 0.3);
}

.inventory-slot.rarity-mythic {
    border-color: #ff8000;
    box-shadow: 0 0 10px rgba(255, 128, 0, 0.3);
}

.inventory-slot.rarity-eternal {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    animation: etherealGlow 2s ease-in-out infinite alternate;
}

@keyframes etherealGlow {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
    100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); }
}

/* Item Display */
.item-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.item-name {
    font-size: 0.7rem;
    text-align: center;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-level {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    min-width: 16px;
    text-align: center;
}

.item-quantity {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    min-width: 16px;
    text-align: center;
}

/* Item Tooltip */
.item-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    min-width: 250px;
    max-width: 350px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.item-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.tooltip-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tooltip-type {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.tooltip-level {
    font-size: 0.85rem;
    color: #ffd700;
}

.tooltip-stats {
    margin: 0.75rem 0;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.stat-name {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    color: #4caf50;
    font-weight: 600;
}

.tooltip-engravings {
    margin: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
}

.engraving-title {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.engraving-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid;
}

.engraving-item.tier-1 {
    border-left-color: #4caf50;
}

.engraving-item.tier-2 {
    border-left-color: #2196f3;
}

.engraving-item.tier-3 {
    border-left-color: #9c27b0;
}

.engraving-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.engraving-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.tooltip-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tooltip-action {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tooltip-action:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

/* Equipment Slots */
.equipment-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.equipment-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.equipment-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.equipment-slot.weapon {
    grid-column: 2;
    grid-row: 1;
}

.equipment-slot.helmet {
    grid-column: 2;
    grid-row: 2;
}

.equipment-slot.chestplate {
    grid-column: 2;
    grid-row: 3;
}

.equipment-slot.leggings {
    grid-column: 1;
    grid-row: 3;
}

.equipment-slot.boots {
    grid-column: 3;
    grid-row: 3;
}

.equipment-slot.gloves {
    grid-column: 1;
    grid-row: 2;
}

.equipment-slot.ring {
    grid-column: 3;
    grid-row: 2;
}

.equipment-slot.necklace {
    grid-column: 1;
    grid-row: 1;
}

.equipment-slot.earrings {
    grid-column: 3;
    grid-row: 1;
}

.slot-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inventory Filters */
.inventory-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    border-color: transparent;
}

.filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        gap: 0.75rem;
    }
    
    .item-tooltip {
        min-width: 200px;
        max-width: 280px;
    }
    
    .inventory-filters {
        justify-content: center;
    }
}