/**
 * 3D Inventory System CSS
 * Styles for the model shop, inventory grid, and unlock system
 */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

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

/* Inventory Modal Specific */
.inventory-modal-content {
    width: 1200px;
    max-width: 95vw;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Inventory Container */
.inventory-container {
    color: white;
}

/* Inventory Header */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.inventory-header h2 {
    font-size: 32px;
    margin: 0;
    background: linear-gradient(45deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.selected-model {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

.selected-model strong {
    color: #00d4ff;
    font-weight: bold;
}

/* Inventory Tabs */
.inventory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.inventory-tabs .tab {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-tabs .tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.inventory-tabs .tab.active {
    background: linear-gradient(45deg, #00d4ff, #7b2ff7);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* Inventory Grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Inventory Item */
.inventory-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.inventory-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(123, 47, 247, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inventory-item:hover::before {
    opacity: 1;
}

.inventory-item:hover {
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.inventory-item.locked {
    opacity: 0.7;
}

.inventory-item.locked:hover {
    border-color: rgba(255, 200, 0, 0.5);
    box-shadow: 0 10px 30px rgba(255, 200, 0, 0.2);
}

.inventory-item.selected {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

/* Item Preview */
.item-preview {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.item-icon {
    font-size: 64px;
}

.favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    filter: drop-shadow(0 2px 5px rgba(255, 200, 0, 0.5));
}

.selected-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #00ff88;
    color: #0a0e1a;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Item Info */
.item-info {
    margin-bottom: 15px;
}

.item-info h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: white;
}

.item-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 10px;
}

.stat {
    display: inline-block;
    margin-right: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 10px;
}

.item-actions button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-select {
    background: linear-gradient(45deg, #00d4ff, #7b2ff7);
    color: white;
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.btn-unlock {
    background: linear-gradient(45deg, #ffc800, #ff6b00);
    color: white;
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 200, 0, 0.4);
}

.btn-unlock.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.btn-unlock.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-favorite {
    flex: 0;
    width: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
}

.btn-favorite:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .inventory-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px;
    }
    
    .inventory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .inventory-header h2 {
        font-size: 24px;
    }
    
    .selected-model {
        font-size: 14px;
    }
    
    .inventory-tabs {
        flex-wrap: wrap;
    }
    
    .inventory-tabs .tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .item-preview {
        height: 120px;
    }
    
    .item-icon {
        font-size: 48px;
    }
    
    .item-info h3 {
        font-size: 18px;
    }
    
    .item-info p {
        font-size: 13px;
    }
    
    .item-actions {
        flex-direction: column;
    }
    
    .btn-favorite {
        width: 100%;
    }
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00d4ff, #7b2ff7);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00ffaa, #aa2fff);
}
