:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #818cf8;
    --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --border: #334155;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

/* Sidebar */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding-top: 70px;
    min-height: 100vh;
}

.sidebar {
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    padding: 2rem 0;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0 50px 50px 0;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: var(--surface);
    color: var(--text-main);
}

.sidebar-nav a.active {
    background: var(--gradient);
    color: white;
}

.sidebar-section-title {
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-weight: 700;
}

/* Main Content */
main {
    padding: 3rem 0;
    max-width: 900px;
}

.content-section {
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    color: var(--accent);
}

h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Code Blocks */
pre {
    background: #011627;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
}

.inline-code {
    background: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--accent);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: var(--surface-hover);
}

.card h3 {
    margin-top: 0;
    color: var(--text-main);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

th {
    background: rgba(99, 102, 241, 0.1);
    text-align: left;
    padding: 1rem;
    color: var(--primary);
    font-weight: 700;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 8rem 0;
    background: radial-gradient(circle at top center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}
