/**
 * Enhanced Models Grid Styling
 * Improves the display of models and adds animation effects
 */

/* Model grid container */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    animation: fadeIn 0.3s ease;
}

/* Scrollbar styling for models grid */
.models-grid::-webkit-scrollbar {
    width: 6px;
}

.models-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.models-grid::-webkit-scrollbar-thumb {
    background: var(--neon-blue, #00ffff);
    border-radius: 3px;
}

/* Model card styling */
.model-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: modelCardAppear 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

/* Sequential animation for model cards */
.model-card:nth-child(2) { animation-delay: 0.05s; }
.model-card:nth-child(3) { animation-delay: 0.1s; }
.model-card:nth-child(4) { animation-delay: 0.15s; }
.model-card:nth-child(5) { animation-delay: 0.2s; }
.model-card:nth-child(6) { animation-delay: 0.25s; }
.model-card:nth-child(7) { animation-delay: 0.3s; }
.model-card:nth-child(8) { animation-delay: 0.35s; }
.model-card:nth-child(9) { animation-delay: 0.4s; }
.model-card:nth-child(10) { animation-delay: 0.45s; }
.model-card:nth-child(11) { animation-delay: 0.5s; }
.model-card:nth-child(12) { animation-delay: 0.55s; }

/* Model card hover effect */
.model-card:hover {
    border-color: var(--neon-blue, #00ffff);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Selected model card styling */
.model-card.selected {
    border-color: var(--neon-green, #00ff00);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    background-color: rgba(0, 50, 0, 0.3);
}

/* Model card name styling */
.model-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-color, #ffffff);
    text-align: center;
    word-break: break-word;
}

/* Model card details styling */
.model-details {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Loading indicator styling */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    grid-column: 1 / -1;
}

/* Cyber spinner animation */
.cyber-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-top-color: var(--neon-blue, #00ffff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading indicator text */
.loading-indicator p {
    margin-top: 10px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-color, #ffffff);
}

/* Animation keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modelCardAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Refresh error/success indicator styles */
button.refresh-success {
    background-color: rgba(0, 255, 0, 0.2) !important;
    border-color: var(--neon-green, #00ff00) !important;
    box-shadow: 0 0 10px var(--neon-green, #00ff00) !important;
    transition: all 0.3s ease;
}

button.refresh-error {
    background-color: rgba(255, 0, 0, 0.2) !important;
    border-color: var(--neon-red, #ff0055) !important;
    box-shadow: 0 0 10px var(--neon-red, #ff0055) !important;
    transition: all 0.3s ease;
}
