/* ===== CSS Variables ===== */
:root {
    /* Colors - Light Theme */
    --color-primary: #1a73e8;
    --color-primary-dark: #1557b0;
    --color-primary-light: #e8f0fe;
    --color-secondary: #5f6368;
    --color-success: #34a853;
    --color-warning: #fbbc04;
    --color-error: #ea4335;

    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-tertiary: #f1f3f4;
    --color-surface: #ffffff;
    --color-surface-hover: #f8f9fa;

    --color-text: #202124;
    --color-text-secondary: #5f6368;
    --color-text-tertiary: #80868b;
    --color-text-inverse: #ffffff;

    --color-border: #dadce0;
    --color-border-light: #e8eaed;

    --color-code-bg: #f8f9fa;
    --color-code-text: #37474f;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #8ab4f8 100%);
    --gradient-hero: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.1);
    --shadow-md: 0 1px 3px 0 rgba(60, 64, 67, 0.15), 0 4px 8px 3px rgba(60, 64, 67, 0.1);
    --shadow-lg: 0 1px 3px 0 rgba(60, 64, 67, 0.15), 0 8px 16px 4px rgba(60, 64, 67, 0.1);
    --shadow-xl: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 16px 24px 8px rgba(60, 64, 67, 0.1);

    /* Typography */
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Roboto Mono', 'SF Mono', 'Consolas', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 280px;
    --toc-width: 240px;
    --max-content-width: 1400px;
    --max-doc-width: 900px;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-primary: #8ab4f8;
    --color-primary-dark: #aecbfa;
    --color-primary-light: #1f3a5f;

    --color-bg: #1f1f1f;
    --color-bg-secondary: #292929;
    --color-bg-tertiary: #333333;
    --color-surface: #292929;
    --color-surface-hover: #333333;

    --color-text: #e8eaed;
    --color-text-secondary: #9aa0a6;
    --color-text-tertiary: #80868b;

    --color-border: #3c4043;
    --color-border-light: #5f6368;

    --color-code-bg: #292929;
    --color-code-text: #e8eaed;

    --gradient-hero: linear-gradient(180deg, #1f1f1f 0%, #292929 100%);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 4px 8px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 8px 16px 4px rgba(0, 0, 0, 0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* ===== Container ===== */
.container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .header {
    background: rgba(31, 31, 31, 0.95);
}

.header-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text);
}

.logo:hover {
    color: var(--color-text);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    padding: 4px 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

/* ===== User Menu ===== */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    color: var(--color-text);
}

.user-menu-trigger:hover {
    background: var(--color-bg-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.user-menu-trigger:hover .dropdown-arrow,
.user-menu-dropdown.active + .user-menu-trigger .dropdown-arrow {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.user-menu-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.user-menu-email {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.user-menu-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: var(--space-xs) 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    font-size: 14px;
    transition: background var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-menu-item:hover {
    background: var(--color-bg-secondary);
}

.user-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-secondary);
}

.user-menu-logout {
    color: var(--color-error);
}

.user-menu-logout svg {
    color: var(--color-error);
}

.user-menu-logout:hover {
    background: rgba(234, 67, 53, 0.1);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

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

.btn-white:hover {
    background: #f8f9fa;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-lg svg {
    width: 18px;
    height: 18px;
}

.btn-full {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    padding-top: calc(var(--header-height) + var(--space-4xl));
    padding-bottom: var(--space-4xl);
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.hero-stats {
    display: flex;
    gap: var(--space-3xl);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* Hero Visual / Network Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.network-animation {
    position: relative;
    width: 400px;
    height: 400px;
}

.node {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(26, 115, 232, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.node-center {
    width: 48px;
    height: 48px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gradient-primary);
    z-index: 2;
}

.node-1 { top: 50px; left: 60px; animation-delay: 0s; }
.node-2 { top: 50px; right: 60px; animation-delay: 0.3s; }
.node-3 { bottom: 50px; left: 60px; animation-delay: 0.6s; }
.node-4 { bottom: 50px; right: 60px; animation-delay: 0.9s; }
.node-5 { top: 10px; left: 50%; transform: translateX(-50%); animation-delay: 1.2s; }

.connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.connection {
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    opacity: 0.4;
    animation: dash 20s linear infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes dash {
    to { stroke-dashoffset: -100; }
}

/* ===== Features Section ===== */
.features {
    padding: var(--space-4xl) 0;
    background: var(--color-bg);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: 18px;
    color: var(--color-text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ===== Code Section ===== */
.code-section {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-secondary);
}

.code-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.code-text h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.code-text > p {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.code-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl);
}

.code-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 15px;
    color: var(--color-text-secondary);
}

.code-features svg {
    width: 20px;
    height: 20px;
    color: var(--color-success);
    flex-shrink: 0;
}

.code-block {
    background: #1e1e1e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.code-dots {
    display: flex;
    gap: var(--space-sm);
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27ca40; }

.code-lang {
    font-size: 12px;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block pre {
    padding: var(--space-lg);
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: #d4d4d4;
}

.code-block .keyword { color: #569cd6; }
.code-block .string { color: #ce9178; }
.code-block .comment { color: #6a9955; }

/* ===== Use Cases Section ===== */
.use-cases {
    padding: var(--space-4xl) 0;
    background: var(--color-bg);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.use-case-card {
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.use-case-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.use-case-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.use-case-icon svg {
    width: 24px;
    height: 24px;
}

.use-case-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.use-case-card > p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.use-case-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case-card li {
    font-size: 13px;
    color: var(--color-text-tertiary);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.use-case-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* ===== How It Works Section ===== */
.how-it-works {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.step-card {
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
}

.step-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.step-card > p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.step-card pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: left;
    overflow-x: auto;
}

.step-card code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #d4d4d4;
}

/* ===== Stats Section ===== */
.stats-section {
    padding: var(--space-4xl) 0;
    background: var(--gradient-primary);
}

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.stat-item .stat-label {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.stat-sublabel {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Trusted Section ===== */
.trusted {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
    text-align: center;
}

.trusted-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.trusted-subtitle {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.trusted-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xl);
    flex-wrap: wrap;
}

.logo-placeholder {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    padding: var(--space-md) var(--space-xl);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

/* ===== Pricing Preview Section ===== */
.pricing-preview {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-secondary);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 8px 40px rgba(26, 115, 232, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-header {
    text-align: center;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

.pricing-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.pricing-price .price {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--color-text);
}

.pricing-price .period {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

.pricing-header > p {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl);
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.pricing-features svg {
    width: 18px;
    height: 18px;
    color: var(--color-success);
    flex-shrink: 0;
}

/* ===== CTA Section ===== */
.cta {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.cta-content > p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* ===== Footer ===== */
.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-brand > p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* Newsletter Form */
.footer-newsletter {
    margin-top: var(--space-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--color-bg);
    color: var(--color-text);
    min-width: 0;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.newsletter-form input::placeholder {
    color: var(--color-text-tertiary);
}

.newsletter-form .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    white-space: nowrap;
}

.newsletter-success {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-success);
    font-size: 14px;
    margin-top: var(--space-sm);
}

.newsletter-success svg {
    width: 16px;
    height: 16px;
}

/* Search Styles */
.docs-search-wrapper {
    position: relative;
}

.docs-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.docs-search-input-wrapper .search-icon {
    position: absolute;
    left: var(--space-md);
    color: var(--color-text-tertiary);
    pointer-events: none;
}

.docs-search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md) var(--space-sm) 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--color-bg);
    color: var(--color-text);
}

.docs-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.search-shortcut {
    position: absolute;
    right: var(--space-sm);
    padding: 2px 6px;
    font-size: 12px;
    font-family: var(--font-mono);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
}

.docs-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--space-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result {
    display: block;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background: var(--color-bg-secondary);
}

.search-result-category {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-title {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.search-result-title mark {
    background: var(--color-warning);
    color: var(--color-text);
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-excerpt {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.search-result-excerpt mark {
    background: var(--color-warning);
    color: var(--color-text);
    padding: 0 2px;
    border-radius: 2px;
}

.search-no-results {
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-secondary);
}

.search-no-results svg {
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-bottom-links a {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.footer-bottom-links a:hover {
    color: var(--color-primary);
}

/* ===== Pricing Page ===== */
.pricing-hero {
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
    text-align: center;
    background: var(--color-bg);
}

.pricing-hero h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.pricing-hero > .container > p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.toggle-label {
    font-size: 14px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toggle-label.active {
    color: var(--color-text);
    font-weight: 500;
}

.save-badge {
    background: var(--color-success);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    margin-left: var(--space-xs);
}

.toggle-switch {
    width: 48px;
    height: 24px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    border: none;
    transition: background var(--transition-fast);
}

.toggle-switch.active {
    background: var(--color-primary);
}

.toggle-slider {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

/* Pricing Section */
.pricing-section {
    padding: var(--space-3xl) 0 var(--space-4xl);
    background: var(--color-bg);
}

.pricing-cards-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card-full {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pricing-card-full.featured {
    border-color: var(--color-primary);
    box-shadow: 0 8px 40px rgba(66, 133, 244, 0.15);
}

.featured-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-xs);
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card-full.featured .pricing-card-header {
    padding-top: calc(var(--space-xl) + 28px);
}

.pricing-card-header {
    padding: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.pricing-card-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.pricing-amount .amount {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--color-text);
}

.pricing-amount .period {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

.pricing-card-header > p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
}

.pricing-card-body {
    padding: var(--space-xl);
    flex: 1;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 13px;
}

.feature-list li.included {
    color: var(--color-text-secondary);
}

.feature-list li.excluded {
    color: var(--color-text-tertiary);
}

.feature-list svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.feature-list li.included svg {
    color: var(--color-success);
}

.feature-list li.excluded svg {
    color: var(--color-text-tertiary);
}

.pricing-card-footer {
    padding: var(--space-xl);
    padding-top: 0;
}

.trial-note {
    display: block;
    text-align: center;
    margin-top: var(--space-sm);
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* FAQ Section */
.faq-section {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-secondary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.faq-item h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.faq-item p {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ===== Error Page (404) ===== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: var(--space-2xl);
}

.error-content {
    text-align: center;
    max-width: 600px;
    padding: var(--space-2xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.error-visual {
    margin-bottom: var(--space-xl);
}

.error-visual svg {
    width: 200px;
    height: auto;
    margin: 0 auto;
}

.error-content h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 500;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.error-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.error-help {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

.error-help a {
    color: var(--color-primary);
    font-weight: 500;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-content {
        grid-template-columns: 1fr;
    }

    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stats-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-cards-full {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

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

@media (max-width: 900px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-actions .btn:not(.theme-toggle):not(:last-child) {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: calc(var(--header-height) + var(--space-2xl));
        padding-bottom: var(--space-2xl);
        min-height: auto;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }

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

    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-large {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 32px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .error-content {
        margin: var(--space-lg);
        padding: var(--space-xl);
    }

    .error-content h1 {
        font-size: 28px;
    }

    .error-description {
        font-size: 16px;
    }

    .error-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .error-actions .btn {
        width: 100%;
    }
}

