/* Investment Modal - Unique Styles */
.investment-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    transition: background-color 0.3s ease;
}

.investment-modal.show {
    background-color: rgba(0,0,0,0.8);
}

.investment-modal-content {
    background: #2d2d2d;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 92%;
    max-width: 1100px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(-30px) scale(0.98);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.investment-modal.show .investment-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.investment-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
}

.investment-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
}

.investment-close-modal {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.investment-close-modal:hover {
    background: #404040;
    color: #ffffff;
}

.investment-modal-body {
    padding: 30px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.investment-item-gallery {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Investment Search Section */
.investment-search-section {
    margin-bottom: 30px;
}

.investment-search-container {
    position: relative;
    margin-bottom: 20px;
}

.investment-search-container input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: #404040;
    border: 2px solid #555;
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.2s ease;
}

.investment-search-container input:focus {
    outline: none;
    border-color: #667eea;
    background: #4a4a4a;
}

.investment-search-container .investment-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.investment-search-filters {
    display: flex;
    gap: 15px;
}

.investment-search-filters select {
    padding: 10px 15px;
    background: #404040;
    border: 1px solid #555;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    min-width: 150px;
}

.investment-search-filters select:focus {
    outline: none;
    border-color: #667eea;
}

/* Investment Gallery */
.investment-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.investment-gallery-item {
    background: #1a1a1a;
    border: 2px solid #404040;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
}

.investment-gallery-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.investment-gallery-item.selected {
    border-color: #667eea;
    background: #2a2a4a;
}

.investment-gallery-item-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
}

.investment-gallery-item-name {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.investment-gallery-item-type {
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.investment-gallery-item-rarity {
    color: #666;
    font-size: 0.75rem;
}

.investment-gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* Investment Selected Item Form */
.investment-selected-item-form {
    background: #1a1a1a;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    opacity: 1;
    transform: translateY(0);
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

.investment-selected-item-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #404040;
}

.investment-selected-item-info img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #404040;
}

.investment-selected-item-details h3 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.investment-selected-item-details p {
    color: #999;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.investment-form .investment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.investment-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Investment Form Groups */
.investment-form-group {
    display: flex;
    flex-direction: column;
}

.investment-form-group label {
    color: #ccc;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.investment-form-group input {
    padding: 12px 16px;
    background: #404040;
    border: 1px solid #555;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.investment-form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #4a4a4a;
}

/* Responsive Investment Modal */
@media (max-width: 768px) {
    .investment-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .investment-modal-body {
        padding: 20px;
    }
    
    .investment-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .investment-form .investment-form-row {
        grid-template-columns: 1fr;
    }
    
    .investment-form-actions {
        flex-direction: column;
    }
    
    .investment-selected-item-info {
        flex-direction: column;
        text-align: center;
    }
}
