/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Header Styles */
.header {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: #3b82f6;
}

.add-ai-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.export-btn, .import-btn {
    background: #374151;
    color: #d1d5db;
    border: 1px solid #4b5563;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.export-btn:hover, .import-btn:hover {
    background: #4b5563;
    color: white;
    border-color: #6b7280;
}

.add-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Controls Styles */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #1e293b;
    font-size: 1rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #1e293b;
    font-size: 1rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.filter-select option {
    background: #1e293b;
    color: #e2e8f0;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

/* AI Grid Styles */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ai-card {
    background: #1e293b;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    transition: all 0.2s ease;
    cursor: pointer;
    aspect-ratio: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.ai-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ai-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.ai-name {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 6px;
    text-align: center;
}

.ai-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.use-case-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    margin-top: 6px;
}

/* Dynamic use case badge colors - will be generated based on use case name */
.use-case-badge {
    background: var(--badge-bg, #f3f4f6);
    color: var(--badge-color, #374151);
}

/* Use case input styling */
.use-case-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-use-case-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.add-use-case-btn:hover {
    background: #5a67d8;
}

.use-case-suggestions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.use-case-suggestion {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.use-case-suggestion:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.ai-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.ai-card:hover .ai-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #334155;
    color: #e2e8f0;
    border: 1px solid #475569;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s;
}

.btn-danger:hover::before {
    left: 100%;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.empty-icon {
    font-size: 4rem;
    color: #64748b;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 12px;
}

.empty-state p {
    color: #94a3b8;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #334155;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Form Styles */
.modal-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e2e8f0;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #1e293b;
    color: #e2e8f0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Details Modal */
.details-content {
    padding: 30px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.detail-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.model-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    background: #334155;
    transition: all 0.2s ease;
    border: 1px solid #475569;
}

.model-link:hover {
    background: #475569;
    color: #93c5fd;
}

.prompt-container {
    position: relative;
}

.prompt-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #475569;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: #1e293b;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.prompt-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #2563eb;
}

.modal-actions {
    padding: 24px 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-weight: 600;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

/* Animations */
/* Animations removed for simplicity */

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .ai-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.7rem;
    }
    
    .ai-card {
        padding: 20px;
    }
    
    .modal-form {
        padding: 20px;
    }
    
    .details-content {
        padding: 20px;
    }
} 