:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --glass-border: rgba(148, 163, 184, 0.2);
    --font-main: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

header {
    text-align: center;
    padding: 4rem 1rem 2rem;
    background: linear-gradient(to bottom, #ffffff, var(--bg-color));
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: white;
    color: var(--text-primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-lg);
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.filter-btn {
    background: white;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.ai-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.favorite-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: white;
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.favorite-btn:hover {
    transform: scale(1.1);
    color: #ef4444;
    border-color: #ef4444;
}

.favorite-btn.active {
    color: #ef4444;
    fill: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}

.card-header {
    margin-bottom: 1rem;
    padding-right: 3rem;
}

.ai-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-weight: 700;
}

.tag-category {
    background: #e0e7ff;
    color: #4338ca;
}

.tag-pricing {
    background: #dcfce7;
    color: #15803d;
}

.tag-pricing.paid {
    background: #fee2e2;
    color: #b91c1c;
}

.ai-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 1rem;
}

.ai-utility {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.utility-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.utility-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.visit-btn,
.tutorial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    text-align: center;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    flex: 1;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.visit-btn {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.visit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.5);
}

.tutorial-btn {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.tutorial-btn:hover {
    background: #f8fafc;
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
    }
}