:root {
    --primary: #3f51b5;
    --primary-dark: #303f9f;
    --secondary: #f50057;
    --bg-light: #f3f4f6;
    --text-light: #1f2937;
    --card-light: #ffffff;
    --bg-dark: #121212;
    --text-dark: #e0e0e0;
    --card-dark: #1e1e1e;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --card: var(--card-dark);
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --text: var(--text-light);
    --card: var(--card-light);
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

[data-theme="light"] {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    background-attachment: fixed;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

/* Background Decorations */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(63, 81, 181, 0.08) 0%, rgba(63, 81, 181, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: move 20s infinite alternate;
}

.blob-1 { top: -100px; right: -100px; background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%); }
.blob-2 { bottom: -150px; left: -150px; background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0) 70%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 10%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(63, 81, 181, 0.05) 0%, rgba(63, 81, 181, 0) 70%); animation-delay: -10s; }

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 100px) scale(1.1); }
}

header {
    margin: 1.5rem auto;
    width: 90%;
    max-width: 1000px;
    padding: 0.7rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.7);
    position: sticky;
    top: 1.5rem;
    z-index: 1000;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

[data-theme="dark"] header {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card);
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 15px;
    padding: 0.8rem 0;
    z-index: 1001;
    border: 1px solid rgba(128,128,128,0.1);
    opacity: 0;
    transition: var(--transition);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: var(--text);
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.dropdown-content a i {
    width: 20px;
    color: var(--primary);
    opacity: 0.8;
}

.dropdown-content a:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
}

.menu-toggle, .hamburger {
    display: none;
    z-index: 200;
}

[data-theme="light"] .hamburger span { background: #121212; }
[data-theme="dark"] .hamburger span { background: #ffffff; }

.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--primary);
}

[data-theme="dark"] .card:hover {
    background: rgba(30, 41, 59, 0.7);
}

.card .icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
}

.card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    transform: rotate(-5deg);
}

.card .icon {
    font-size: 2.5rem;
    margin: 0;
    color: var(--primary);
    transition: all 0.4s ease;
}

.card:hover .icon {
    color: white;
}

.card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.card p {
    font-size: 0.9rem;
    opacity: 0.65;
    line-height: 1.6;
}

.tool-tag {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(63, 81, 181, 0.1);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-area {
    border: 2px dashed var(--primary);
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    background: rgba(92, 107, 192, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    background: rgba(92, 107, 192, 0.1);
}

/* Features Banner Section */
.features-banner {
    margin: 6rem auto 4rem;
    text-align: center;
    max-width: 1000px;
    padding: 0 1rem;
}

.features-banner h2 {
    font-size: 2.2rem;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.features-horizontal-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.feature-hz {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    min-width: 250px;
}

.feature-icon {
    background: #cc3333;
    color: white;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.feature-hz h4 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.feature-hz p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .features-horizontal-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        max-width: 300px;
        margin: 0 auto;
    }
}
#theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Footer Styling */
.main-footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6rem 0 3rem;
    margin-top: 8rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 6rem;
    padding-top: 3rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-col h4 {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text);
    opacity: 0.7;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
    opacity: 1;
}

.social-links a {
    color: var(--text);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    opacity: 1;
}

@media (max-width: 768px) {
    header {
        width: 95%;
        margin: 1rem auto;
        padding: 0.6rem 1.2rem;
        top: 1rem;
        height: auto;
    }

    .social-links {
        justify-content: flex-start;
        display: flex;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 30px;
        height: 30px;
        cursor: pointer;
        z-index: 210;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        border-radius: 2px;
        transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 200;
        clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
        visibility: hidden;
        opacity: 0;
        transition: clip-path 0.7s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.4s ease;
        padding: 0;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(18, 18, 18, 0.98);
    }

    .nav-links a {
        font-size: 2rem;
        font-weight: 800;
        letter-spacing: -1px;
        filter: blur(10px);
        transform: scale(1.2) translateY(20px);
        opacity: 0;
        transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nav-actions {
        flex-direction: row;
        width: auto;
        gap: 2rem;
        margin-top: 1rem;
        filter: blur(10px);
        transform: scale(0.9);
        opacity: 0;
        transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .menu-toggle:checked ~ .nav-links {
        opacity: 1;
        visibility: visible;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .menu-toggle:checked ~ .nav-links a,
    .menu-toggle:checked ~ .nav-links .nav-actions {
        transform: scale(1) translateY(0);
        filter: blur(0);
        opacity: 1;
    }

    /* Mobile Dropdown Adjustments */
    .nav-dropdown {
        width: 100%;
        text-align: center;
    }

    .dropdown-trigger {
        font-size: 2rem;
        font-weight: 800;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .dropdown-content {
        position: static;
        display: none;
        background: none;
        box-shadow: none;
        border: none;
        padding: 0;
        opacity: 1;
        transform: none;
        width: 100%;
        margin-top: 0.5rem;
    }

    .menu-toggle:checked ~ .nav-links .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        justify-content: center;
        padding: 0.5rem 0 !important;
        opacity: 0.8;
    }

    .dropdown-content a i {
        display: none;
    }

    /* Staggered entry */
    .menu-toggle:checked ~ .nav-links a:nth-child(1) { transition-delay: 0.3s; }
    .menu-toggle:checked ~ .nav-links a:nth-child(2) { transition-delay: 0.35s; }
    .menu-toggle:checked ~ .nav-links a:nth-child(3) { transition-delay: 0.4s; }
    .menu-toggle:checked ~ .nav-links .nav-actions { transition-delay: 0.45s; }

    .menu-toggle:checked ~ .hamburger span:nth-child(1) { 
        transform: translateY(8px) rotate(45deg); 
    }
    .menu-toggle:checked ~ .hamburger span:nth-child(2) { 
        opacity: 0; 
    }
    .menu-toggle:checked ~ .hamburger span:nth-child(3) { 
        transform: translateY(-8px) rotate(-45deg); 
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }

    @media (max-width: 480px) {
        .grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 0.8rem;
            padding: 0 0.2rem;
        }
        .card {
            padding: 1.2rem 0.8rem;
        }
        .card .icon-wrapper {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            margin-bottom: 1rem;
        }
        .card .icon {
            font-size: 1.5rem;
        }
        .card h3 {
            font-size: 0.9rem;
            margin-bottom: 0.3rem;
        }
        .card p {
            font-size: 0.75rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .tool-tag {
            top: 0.5rem;
            right: 0.5rem;
            font-size: 0.6rem;
            padding: 0.1rem 0.4rem;
        }
    }

    .card {
        padding: 1rem;
    }

    .card .icon {
        font-size: 1.8rem;
    }

    .card h3 {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.8rem !important;
        padding: 0 1rem;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    .container {
        margin: 2rem auto;
        padding: 0 1.5rem;
    }

    .upload-area {
        padding: 3rem 1.5rem;
        margin: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
        gap: 1rem;
        margin-top: 3rem;
    }

    @media (max-width: 400px) {
        .grid, .innovation-grid, .footer-grid {
            gap: 0.6rem;
            padding: 0 0.4rem;
        }
        .card, .innovation-card {
            padding: 1rem 0.5rem;
        }
        h1 { font-size: 1.6rem !important; }
        h2 { font-size: 1.4rem !important; }
    }
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
}

.breadcrumbs span {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* Image Thumbnails */
.thumbnail {
    width: 100%;
    height: 200px; /* Increased from 120px */
    border-radius: 16px;
    overflow: hidden;
    background: rgba(var(--primary), 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to show full image */
    background: #f8fafc; /* Light background for 'contain' photos */
    transition: transform 0.3s ease;
}

.preview-card:hover .thumbnail img {
    transform: scale(1.05);
}

.preview-card {
    padding: 1.2rem !important;
    background: var(--card);
}
