:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #38BDF8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --bg-dark: #020617;
    --bg-card: #0F172A;
    --border: #1E293B;
    --font-sans: 'Inter', sans-serif;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dot {
    color: var(--accent);
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: #0EA5E9;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background-color: rgba(56, 189, 248, 0.1);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background-color: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not([class^="btn"]) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:not([class^="btn"]):hover {
    color: var(--text-main);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

.hero {
    padding: 10rem 0 5rem;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero-sub {
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.trust-badges {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.trust-badges span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-window {
    background: #1E1E1E;
    border-radius: 12px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease;
    max-width: 100%;
    width: 100%;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.window-header {
    background: #252526;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #FF5F56;
}

.yellow {
    background: #FFBD2E;
}

.green {
    background: #27C93F;
}

.window-header .title {
    font-family: monospace;
    font-size: 0.8rem;
    color: #888;
}

.window-body {
    padding: 1.5rem;
}

pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
}

.features {
    padding: 6rem 0;
    background-color: #0B1120;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.developers {
    padding: 6rem 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge-sm {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.feature-list {
    margin: 2rem 0;
}

.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.btn-text {
    color: var(--accent);
    font-weight: 600;
}

.api-version {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.api-version:hover {
    border-color: var(--accent);
}

.api-version h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.api-version p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.api-version code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
    color: #e2e8f0;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.step-icon {
    font-size: 2rem;
    background: rgba(56, 189, 248, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.step span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 300;
}

.pricing {
    padding: 6rem 0;
    background-color: #0B1120;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: flex-start;
}

.price-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    width: 100%;
}

.price-card.popular {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg-dark);
    padding: 0.25rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 700;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 1.5rem 0 0.5rem;
}

.currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.period {
    color: var(--text-muted);
    font-size: 1rem;
}

.price-features {
    margin: 2rem 0;
    text-align: left;
}

.price-features li {
    margin-bottom: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price-features li.active {
    color: var(--text-main);
}

.check {
    color: var(--accent);
}

.width-full {
    width: 100%;
}

.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============ DOCUMENTATION PAGE STYLES ============ */

.docs-container {
    display: flex;
    margin-top: 80px;
    width: 100%;
    min-height: calc(100vh - 80px);
}

.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border);
    background: var(--bg-dark);
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-group {
    margin-bottom: 2rem;
}

.sidebar-group h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.sidebar-group a {
    display: block;
    padding: 0.625rem 1rem;
    margin-left: -1rem;
    padding-left: 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    opacity: 0.6;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    word-break: break-word;
}

.sidebar-group a:hover,
.sidebar-group a.active {
    color: var(--accent);
    opacity: 1;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.05) 0%, transparent 100%);
    border-left-color: var(--accent);
}

.docs-content {
    flex: 1;
    padding: 2.5rem 2rem;
    overflow-x: hidden;
}

.docs-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
}

.docs-content .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    word-break: break-word;
}

.docs-content h2 {
    font-size: 1.75rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    word-break: break-word;
}

.docs-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    word-break: break-word;
}

.docs-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #cbd5e1;
    word-break: break-word;
}

.docs-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

.endpoint {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    word-break: break-all;
    overflow-wrap: break-word;
}

.code-block {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    color: #94a3b8;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-sans);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
    word-break: break-word;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
    min-width: 100%;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 1rem 0;
}

.status-badge.success {
    background: rgba(39, 201, 63, 0.1);
    color: #27C93F;
    border: 1px solid rgba(39, 201, 63, 0.2);
}

.status-badge.error {
    background: rgba(255, 95, 86, 0.1);
    color: #FF5F56;
    border: 1px solid rgba(255, 95, 86, 0.2);
}

.process-flow-vertical {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    position: relative;
    max-width: 100%;
}

.process-step {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.process-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 50px;
    bottom: -30px;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.step-indicator {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    z-index: 1;
    background-color: var(--bg-card);
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-content h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    word-break: break-word;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
    word-break: break-word;
}

.step-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(39, 201, 63, 0.1);
    color: #27C93F;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.docs-menu-toggle {
    display: none;
}

.docs-overlay {
    display: none;
}

/* ============ MOBILE RESPONSIVE ============ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }


    h2 {
        font-size: 1.75rem;
    }

    /* Navbar Mobile */
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar .container {
        padding: 0 1rem;
        max-width: 100%;
        width: 100%;
    }

    .nav-links {
        display: none !important;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        width: 100vw;
        flex-direction: column;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(10px);
        padding: 1.5rem 1rem;
        gap: 1rem;
        z-index: 999;
        border-bottom: 1px solid var(--border);
        max-width: 100vw;
        box-sizing: border-box;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        /*padding: 0.75rem 0;*/
        font-size: 1rem;
    }

    .mobile-menu-btn {
        display: flex !important;
        padding: 0;
        width: auto;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        width: 20px;
        height: 2px;
    }

    /* Hero Section */
    .hero {
        padding: 6rem 0 3rem;
        margin-top: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }


    .hero-cta,
    .trust-badges {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .hero-sub {
        margin: 0;
        max-width: 100%;
    }

    /* Hero Visual - Mobile Fix */
    .hero .container>div:last-child {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    .code-window {
        transform: none;
        max-width: 100%;
        width: 100%;
        font-size: 0.75rem;
    }

    .code-window:hover {
        transform: none;
    }

    .window-header {
        padding: 0.5rem 0.75rem;
    }

    .window-body {
        padding: 1rem;
    }

    pre {
        font-size: 0.75rem;
    }

    .code-block {
        max-width: 100%;
    }

    /* General Container */
    .container {
        padding: 0 1rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    /* Layout Changes */
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
    }

    /* Docs Mobile */
    .docs-container {
        flex-direction: column;
        max-width: 100%;
        width: 100vw;
        margin: 80px 0 0 0;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .docs-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: none;
        padding: 0;
        display: none;
        overflow: hidden;
    }

    .docs-sidebar.active {
        display: block;
        position: fixed;
        top: 80px;
        left: 0;
        width: 75vw;
        max-width: 300px;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        padding: 1.5rem;
        z-index: 1051;
        overflow-y: auto;
        border-right: 1px solid var(--border);
        border-bottom: none;
        box-sizing: border-box;
        background: var(--bg-dark);
    }

    .docs-content {
        padding: 1.5rem 1rem;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .docs-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        position: fixed;
        top: 75px;
        right: 15px;
        background: var(--bg-card);
        color: var(--text-main);
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
        z-index: 1050;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.85rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border);
        transition: all 0.2s ease;
        min-width: 45px;
        height: 40px;
    }

    .docs-menu-toggle:active {
        transform: scale(0.95);
    }

    .docs-menu-toggle:hover {
        background: var(--accent);
        color: var(--bg-dark);
        border-color: var(--accent);
    }

    .docs-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .docs-overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Prevent horizontal scroll - Critical */
    html,
    body {
        width: 100%;
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }

    section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .code-block pre {
        overflow-x: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .navbar {
        max-width: 100vw;
        width: 100vw;
        left: 0;
        right: 0;
    }
}