@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(30, 41, 59, 0.8);
    
    --glow-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Background Effects */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(2,6,23,0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    border-radius: 50%;
}

.bg-glow.right {
    top: 20%;
    left: auto;
    right: -200px;
    background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, rgba(2,6,23,0) 70%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-indigo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-shadow);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.4);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Products Grid Section */
.products-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.product-card:hover::before {
    opacity: 1;
}

.product-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-indigo);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.product-card:hover .product-icon {
    background: var(--accent-indigo);
    color: white;
    transform: scale(1.1);
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: white;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s;
}

.product-card:hover .product-link {
    gap: 0.75rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
}

.hero {
    padding-top: 12rem !important;
}

.product-hero {
    padding-top: 12rem !important;
}

.back-link {
    top: 9.5rem !important;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        padding-top: 14rem !important;
    }
    .product-hero {
        padding-top: 14rem !important;
    }
    .promo-bar-top {
        font-size: 0.8rem;
    }
    .promo-bar-top a {
        flex-wrap: wrap;
        text-align: center;
        line-height: 1.4;
    }
    .back-link {
        top: 11.5rem !important;
        left: 1rem !important;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-actions {
        flex-direction: column;
    }
}
/* Markdown Content Styles */
.markdown-body {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    font-size: 1.05rem;
    line-height: 1.7;
    color: #e2e8f0;
}
.markdown-body h1 { font-size: 2.5rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; color: white; }
.markdown-body h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--accent-cyan); }
.markdown-body h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 1rem; color: white; }
.markdown-body p { margin-bottom: 1.5rem; }
.markdown-body ul, .markdown-body ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.markdown-body li { margin-bottom: 0.5rem; }
.markdown-body code { background: rgba(0,0,0,0.5); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: monospace; color: var(--accent-indigo); }
.markdown-body pre { background: #020617; padding: 1.5rem; border-radius: 8px; overflow-x: auto; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.05); }
.markdown-body pre code { background: transparent; padding: 0; color: #a5b4fc; }
.markdown-body blockquote { border-left: 4px solid var(--accent-indigo); padding-left: 1rem; color: var(--text-secondary); margin-bottom: 1.5rem; background: rgba(99,102,241,0.05); padding: 1rem; border-radius: 0 8px 8px 0; }

:root {
    --header-bg: rgba(2, 6, 23, 0.8);
    --header-scrolled: rgba(2, 6, 23, 0.95);
    --box-shadow-scrolled: 0 4px 20px rgba(0,0,0,0.5);
    --border-light: rgba(255,255,255,0.1);
}


/* Mega Menu Styles */
.nav-dropdown { position: relative; }
.dropdown-content {
    position: absolute; top: calc(100% + 25px); left: 50%; transform: translateX(-50%) translateY(15px);
    background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 1.5rem;
    width: 750px; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5); z-index: 1000;
}
.nav-dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.mega-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; border-radius: 12px; text-decoration: none; transition: background 0.2s; border: 1px solid transparent; }
.mega-item:hover { background: rgba(99,102,241,0.05); border-color: rgba(99,102,241,0.2); }
.mega-item i { font-size: 1.5rem; color: var(--accent-cyan); background: rgba(6,182,212,0.1); padding: 0.5rem; border-radius: 8px; }
.mega-item h4 { font-size: 0.95rem; margin-bottom: 0.2rem; color: white; }
.mega-item p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; margin: 0; }
.mega-item:hover h4 { color: var(--accent-cyan); }
/* Invisible bridge to prevent hover gap issues */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 0;
    width: 100%;
    height: 35px;
}
@keyframes promoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Promo Bar */
.promo-bar-top {
    background: linear-gradient(270deg, #168ef0, #09a1bc, #8b5cf6, #168ef0);
    background-size: 300% 300%;
    animation: promoGradient 5s ease infinite;
    padding: 8px 15px;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.promo-badge {
    background: #F5C42E;
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.75rem;
    box-shadow: 0 2px 10px rgba(16,185,129,0.3);
}


/* Navbar Responsive Fixes */
.hamburger {
    display: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001; /* Keep above drawer */
}
.hamburger:hover {
    color: var(--accent-cyan);
}

@media (max-width: 992px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    .hamburger {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: rgba(11, 14, 20, 0.98);
        backdrop-filter: blur(12px);
        border-left: 1px solid rgba(255,255,255,0.05);
        padding: 9rem 2rem 8rem;
        text-align: left;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        overflow-y: auto;
        display: block; /* Use block to fix flex scrolling bugs on mobile */
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.active {
        right: 0;
        animation: none;
    }
    .nav-links > li {
        margin-bottom: 1.5rem;
        display: block;
    }
    
    .nav-container > .btn-primary {
        position: absolute;
        top: calc(100vh - 5rem);
        top: calc(100dvh - 5rem);
        right: -100%;
        width: calc(320px - 4rem);
        max-width: calc(85vw - 4rem);
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001; /* Above the scrolling menu */
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }
    .nav-container > .btn-primary.active {
        right: 2rem;
        animation: none;
    }
    
    /* Mega menu collapsible on mobile */
    .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.03);
        padding: 1.5rem 1rem;
        margin-top: 1rem;
        border-radius: 12px;
    }
    .dropdown-content::before {
        display: none;
    }
    .nav-dropdown.mobile-open .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    .nav-dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-dropdown.mobile-open > a i {
        transform: rotate(180deg);
        transition: transform 0.3s;
    }
    .mega-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        font-size: 1.1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Perfect Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    display: none;
}

@media (max-width: 992px) {
    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: sticky;
        top: 0;
        background: rgba(11, 14, 20, 0.98);
        z-index: 100;
        padding-top: 2rem;
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
    }
    .mobile-menu-close i {
        background: rgba(255,255,255,0.05);
        padding: 0.5rem;
        border-radius: 50%;
        transition: background 0.3s;
    }
    .mobile-menu-close i:hover {
        background: rgba(255,255,255,0.1);
    }
    /* Lock body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}
