* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px 30px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filters select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

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


.models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.model-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.model-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.model-author {
    color: #666;
    font-size: 0.9rem;
}

.model-provider {
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

.category-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-language { background: #e3f2fd; color: #1976d2; }
.category-vision { background: #f3e5f5; color: #7b1fa2; }
.category-audio { background: #e8f5e8; color: #388e3c; }
.category-multimodal { background: #fff3e0; color: #f57c00; }
.category-embedding { background: #fce4ec; color: #c2185b; }

.model-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.model-plain-description {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 500;
    background: #f8f9ff;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.model-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #888;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #666;
}

.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modalities-section, .use-cases-section, .tech-specs-section {
    margin-bottom: 15px;
}

.modalities-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modality-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modalities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.use-cases {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modality {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.input-modality {
    background: #e3f2fd;
    color: #1565c0;
}

.output-modality {
    background: #fce4ec;
    color: #ad1457;
}

.use-case {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.tech-spec {
    background: #fff3e0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #e65100;
}

.tech-spec strong {
    color: #bf360c;
}

.tech-spec:nth-child(5), .tech-spec:nth-child(6) {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tech-spec:nth-child(5) strong, .tech-spec:nth-child(6) strong {
    color: #4a148c;
}

.tech-spec:nth-child(7), .tech-spec:nth-child(8) {
    background: #e8f5e8;
    color: #2e7d32;
}

.tech-spec:nth-child(7) strong, .tech-spec:nth-child(8) strong {
    color: #1b5e20;
}

.model-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.license {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.model-links {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
}

@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .tech-specs {
        grid-template-columns: 1fr;
    }
    
    .modalities-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}