:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --success: #4caf50;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html {
    scroll-behavior: smooth;
}

body {
    background-color: #f4f6fa;
    color: var(--dark);
    line-height: 1.6;
}



.navbar-container {

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 4rem 0;



}

header {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: auto;
}
.logo .logo-byline {
         
    margin-left: 8px;     
    vertical-align: middle; 
}

.logo-icon {
    margin-right: 0.5rem;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.cta-button {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(245, 158, 11, 0.05));
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem 0 0 0.25rem;
    font-size: 1rem;
}

.search-bar button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0 0.25rem 0.25rem 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: var(--primary-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    display: inline-block;
    background-color: #f5f7fb;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.section-title::after {
    content: '';
    position: absolute;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    top: 50%;
    left: 0;
    z-index: 0;
}

.animation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.animation-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer; /* Make card look clickable */
}

.animation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.preview-area {
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.animation-info {
    padding: 1.5rem;
}

.animation-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.animation-info p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.animation-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background-color: #e0e7ff;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.animation-actions {
    display: flex;
    justify-content: space-between;
}

.view-code {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.download-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: var(--primary-dark);
}

.categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category {
    background-color: white;
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--border);
}

.category.active, .category:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 900px;
    border-radius: 0.5rem;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.25rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    display: flex;
    overflow: hidden;
    flex: 1;
}

.preview-section {
    width: 50%;
    padding: 1.5rem;
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.code-section {
    width: 50%;
    overflow-y: auto;
    padding: 1.5rem;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.code-tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.code-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.code-content {
    font-family: monospace;
    background-color: #f8fafc;
    border-radius: 0.25rem;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
    color: #334155;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.modal-footer button {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-code {
    background-color: #f1f5f9;
    color: var(--dark);
    border: 1px solid var(--border);
}

.copy-code:hover {
    background-color: #e2e8f0;
}

.download-code {
    background-color: var(--primary);
    color: white;
    border: none;
}

.download-code:hover {
    background-color: var(--primary-dark);
}



footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: #cbd5e1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem 0;
}


@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 2rem;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section ul li a:hover {
        padding-left: 0;
    }
}

/* Animation examples for the preview area */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--dark);
    padding: 0;
    margin-bottom: -1rem;
    
}

.nav-category-link {
    display: none; /* Hide category links by default */
}


@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .preview-section, .code-section {
        width: 100%;
        height: 50%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .mobile-menu-btn {
        display: block; /* Show hamburger icon on mobile */
    }

    .nav-links {
        display: none; /* Hide nav links by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        gap: 0;
        margin-top: 0.25rem; /* Adjust margin for mobile */
        margin-bottom: -0.25rem; /* Adjust margin for mobile */
    }

    .nav-links.active {
        display: flex; /* Show dropdown when active */
    }

    .nav-links a {
        padding: 0.75rem 1rem;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }
    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-category-link {
        display: block; /* Show category links in mobile nav */
    }
}