* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #2d2d44;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.header {
    background: var(--gradient-1);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    position: relative;
}

/* Search and Filter */
.search-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.filter-select {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Main Content */
main {
    padding: 3rem 0;
}

/* Models Grid */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

/* Model Card */
.model-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.model-card:hover::before {
    opacity: 1;
}

.model-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.model-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.model-company {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.model-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-text-to-video {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge-image-to-video {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.badge-video-to-video {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

.badge-open-source {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-commercial {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.model-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.model-features {
    margin-bottom: 1.25rem;
}

.model-features h4 {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.model-features ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.model-features li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.model-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.model-quality {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quality-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.quality-stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.model-links {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .model-card {
        padding: 1.25rem;
    }

    .model-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .model-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header {
        padding: 3rem 0 2rem;
    }

    .model-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .model-links {
        width: 100%;
    }

    .btn {
        flex: 1;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: fadeIn 0.5s ease forwards;
}

.model-card:nth-child(1) { animation-delay: 0.05s; }
.model-card:nth-child(2) { animation-delay: 0.1s; }
.model-card:nth-child(3) { animation-delay: 0.15s; }
.model-card:nth-child(4) { animation-delay: 0.2s; }
.model-card:nth-child(5) { animation-delay: 0.25s; }
.model-card:nth-child(6) { animation-delay: 0.3s; }
.model-card:nth-child(7) { animation-delay: 0.35s; }
.model-card:nth-child(8) { animation-delay: 0.4s; }
.model-card:nth-child(9) { animation-delay: 0.45s; }
.model-card:nth-child(10) { animation-delay: 0.5s; }
.model-card:nth-child(11) { animation-delay: 0.55s; }
.model-card:nth-child(12) { animation-delay: 0.6s; }