:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --bg-color: #020617;
    --sidebar-bg: #030712;
    --card-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --mono-font: 'JetBrains Mono', monospace;
    --main-font: 'Inter', sans-serif;
}

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

body {
    font-family: var(--main-font);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Navigation */
.navbar {
    height: 72px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo img {
    height: 44px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo span {
    color: #ffffff;
    font-weight: 900;
    font-size: 1.75rem;
    letter-spacing: -0.03em;
}

.logo:hover {
    transform: scale(1.02);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
}

.nav-cta {
    background: var(--primary);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.2s ease !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Landing Page Hero */
.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(to bottom right, #ffffff 50%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* Home Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top left, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: #1e293b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.card h3 {
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* Documentation Sidebar Layout */
.docs-wrapper {
    display: flex;
    gap: 64px;
    margin-top: 48px;
}

.docs-sidebar {
    width: 260px;
    position: sticky;
    top: 120px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-group h4 {
    color: #ffffff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    font-weight: 700;
}

.sidebar-links {
    list-style: none;
}

.sidebar-links a {
    display: block;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.docs-main {
    flex: 1;
    max-width: 800px;
    padding-bottom: 100px;
}

/* Typography & Content */
.doc-section {
    margin-bottom: 80px;
}

.doc-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.doc-section h3 {
    font-size: 1.5rem;
    margin: 40px 0 16px;
    color: #e2e8f0;
}

.doc-section p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 24px;
}

code {
    font-family: var(--mono-font);
    background: #1e293b;
    color: #93c5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: #030712;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 24px 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

th {
    background: #0f172a;
    padding: 16px;
    text-align: left;
    font-size: 0.9rem;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: #cbd5e1;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.3);
    border-style: dashed;
}

.card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.card.disabled::before {
    display: none;
}

.status-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

/* Tablet and below */
@media (max-width: 1024px) {
    .docs-sidebar { display: none; }
    .docs-wrapper { gap: 32px; }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.2rem; }
    .container { padding: 0 24px; }
}

/* Mobile devices */
@media (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
    }
    
    .nav-cta {
        text-align: center;
    }
    
    /* Container and spacing */
    .container {
        padding: 0 20px;
    }
    
    /* Hero section */
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero img {
        height: 120px !important;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 32px;
    }
    
    /* Cards */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .card {
        padding: 32px 24px;
    }
    
    .card h3 {
        font-size: 1.5rem;
    }
    
    .card p {
        font-size: 1rem;
    }
    
    /* Documentation */
    .doc-section h2 {
        font-size: 2rem;
    }
    
    .doc-section h3 {
        font-size: 1.3rem;
    }
    
    .doc-section p,
    .doc-section li {
        font-size: 1rem;
    }
    
    /* Tables - make them scrollable */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    th, td {
        padding: 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Code blocks */
    pre {
        padding: 16px;
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer {
        padding: 60px 0;
    }
    
    /* Logo */
    .logo span {
        font-size: 1.5rem;
    }
    
    .logo img {
        height: 36px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .navbar {
        height: 64px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero img {
        height: 100px !important;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cards-grid {
        gap: 20px;
    }
    
    .card {
        padding: 24px 20px;
    }
    
    .card h3 {
        font-size: 1.3rem;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }
    
    .doc-section h2 {
        font-size: 1.75rem;
    }
    
    .doc-section h3 {
        font-size: 1.2rem;
    }
    
    .logo span {
        font-size: 1.3rem;
    }
    
    .logo img {
        height: 32px;
    }
    
    .nav-links {
        top: 64px;
    }
}