/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --primary: #465FF1;
    --primary-dark: #3548d4;
    --primary-light: #6b82f6;
    --primary-gradient: linear-gradient(135deg, #465FF1 0%, #6b82f6 100%);
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

[data-theme="dark"] {
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e0;
    
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-tertiary: #4a5568;
    
    --border-color: #4a5568;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.5rem;
}

.desktop-nav {
    display: none;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(15deg);
}

.mobile-menu-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

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

/* ===========================
   Mobile Menu
   =========================== */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    max-height: 400px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
}

.mobile-nav-link {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    margin-top: 70px;
    padding: 5rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, #465FF1 0%, #6b82f6 50%, #8b9ff8 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.6s ease 0.2s both;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1rem;
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ===========================
   Main Layout
   =========================== */
.main-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
}

/* ===========================
   Sidebar
   =========================== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
}

.sidebar-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.sidebar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(70, 95, 241, 0.1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    position: relative;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary);
    color: white;
}

/* ===========================
   Content
   =========================== */
.content {
    flex: 1;
    min-width: 0;
}

.doc-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.6s ease;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.section-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.subsection {
    margin-bottom: 2rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* ===========================
   Info Cards
   =========================== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.info-card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   Lists
   =========================== */
.list {
    list-style: none;
    margin: 1rem 0;
}

.list li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    color: var(--text-secondary);
}

.list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ===========================
   Endpoint Cards
   =========================== */
.endpoint-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.endpoint-header {
    margin-bottom: 0.5rem;
}

.endpoint-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.endpoint-url {
    display: block;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary);
}

/* ===========================
   API Endpoint
   =========================== */
.api-endpoint {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
}

.endpoint-method {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.endpoint-method.post {
    background: #10b981;
    color: white;
}

.endpoint-method.get {
    background: #3b82f6;
    color: white;
}

.endpoint-method.put {
    background: #f59e0b;
    color: white;
}

.endpoint-method.delete {
    background: #ef4444;
    color: white;
}

.endpoint-path {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ===========================
   Steps
   =========================== */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
}

/* ===========================
   Badges
   =========================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-auth {
    background: #8b5cf6;
    color: white;
}

.badge-permission {
    background: #10b981;
    color: white;
}

.badge-required {
    background: #ef4444;
    color: white;
}

.badge-optional {
    background: #6b7280;
    color: white;
}

/* ===========================
   Parameters Section
   =========================== */
.param-section {
    margin: 1.5rem 0;
}

.param-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.params-table thead {
    background: var(--bg-tertiary);
}

.params-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.params-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.params-table tbody tr:last-child td {
    border-bottom: none;
}

.params-table tbody tr:hover {
    background: var(--bg-primary);
}

.params-table code {
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary);
}

/* ===========================
   Permissions Grid
   =========================== */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.permission-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.permission-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.permission-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

.permission-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.permission-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===========================
   Alerts
   =========================== */
.alert {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* ===========================
   Code Blocks
   =========================== */
.code-block-wrapper {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #2d3748;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #1a202c;
    border-bottom: 1px solid #4a5568;
}

.code-block-header span {
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: var(--primary);
}

.copy-btn.copied {
    background: #10b981;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block-wrapper code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===========================
   Code Examples
   =========================== */
.code-examples {
    margin: 2rem 0;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.code-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.code-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.code-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.code-content {
    display: none;
}

.code-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===========================
   Status Codes
   =========================== */
.status-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.status-code {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.status-code:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.status-code.success {
    border-left: 4px solid #10b981;
}

.status-code.error {
    border-left: 4px solid #ef4444;
}

.status-code .code {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Monaco', 'Courier New', monospace;
}

.status-code.success .code {
    color: #10b981;
}

.status-code.error .code {
    color: #ef4444;
}

.status-code .description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===========================
   Best Practices
   =========================== */
.best-practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.practice-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.practice-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.practice-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.support-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.support-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.support-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.support-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.support-card p {
    color: var(--text-secondary);
}

/* ===========================
   Scroll to Top
   =========================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

/* ===========================
   Enhanced Element Animations
   =========================== */

/* Staggered animations for info cards */
.info-card:nth-child(1) {
    animation: fadeInUp 0.6s ease 0.1s both;
}

.info-card:nth-child(2) {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.info-card:nth-child(3) {
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Staggered animations for practice cards */
.practice-card:nth-child(1) {
    animation: slideInLeft 0.6s ease 0.1s both;
}

.practice-card:nth-child(2) {
    animation: scaleIn 0.6s ease 0.2s both;
}

.practice-card:nth-child(3) {
    animation: slideInRight 0.6s ease 0.3s both;
}

/* Support cards animation */
.support-card {
    animation: fadeInUp 0.6s ease both;
}

.support-card:nth-child(1) {
    animation-delay: 0.1s;
}

.support-card:nth-child(2) {
    animation-delay: 0.2s;
}

.support-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Status codes animation */
.status-code {
    animation: scaleIn 0.4s ease both;
}

.status-code:nth-child(1) { animation-delay: 0.05s; }
.status-code:nth-child(2) { animation-delay: 0.1s; }
.status-code:nth-child(3) { animation-delay: 0.15s; }
.status-code:nth-child(4) { animation-delay: 0.2s; }
.status-code:nth-child(5) { animation-delay: 0.25s; }
.status-code:nth-child(6) { animation-delay: 0.3s; }
.status-code:nth-child(7) { animation-delay: 0.35s; }
.status-code:nth-child(8) { animation-delay: 0.4s; }
.status-code:nth-child(9) { animation-delay: 0.45s; }

/* Permission items animation */
.permission-item {
    animation: fadeInUp 0.5s ease both;
}

.permission-item:nth-child(1) { animation-delay: 0.1s; }
.permission-item:nth-child(2) { animation-delay: 0.15s; }
.permission-item:nth-child(3) { animation-delay: 0.2s; }
.permission-item:nth-child(4) { animation-delay: 0.25s; }

/* Code tabs animation */
.code-tab {
    animation: fadeInDown 0.4s ease both;
}

.code-tab:nth-child(1) { animation-delay: 0.1s; }
.code-tab:nth-child(2) { animation-delay: 0.15s; }
.code-tab:nth-child(3) { animation-delay: 0.2s; }
.code-tab:nth-child(4) { animation-delay: 0.25s; }

/* Sidebar links animation */
.sidebar-link {
    animation: fadeIn 0.3s ease both;
}

/* Steps animation */
.step {
    animation: slideInLeft 0.5s ease both;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }

/* Endpoint cards animation */
.endpoint-card {
    animation: fadeInUp 0.5s ease both;
}

/* API endpoint animation */
.api-endpoint {
    animation: slideInLeft 0.5s ease both;
}

/* Alert animations */
.alert {
    animation: fadeInUp 0.5s ease both;
}

/* Table rows animation */
.params-table tbody tr {
    animation: fadeIn 0.4s ease both;
}

.params-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.params-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.params-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.params-table tbody tr:nth-child(4) { animation-delay: 0.2s; }

/* Hover pulse effect for interactive elements */
.btn:hover {
    animation: pulse 0.6s ease infinite;
}

.copy-btn:hover {
    animation: pulse 0.6s ease infinite;
}

/* Float animation for hero badge */
.hero-badge {
    animation: float 3s ease-in-out infinite;
}

/* Glow effect for primary buttons on hover */
.btn-primary:hover {
    animation: glow 1.5s ease-in-out infinite;
}

/* Loading shimmer effect for code blocks */
.code-block-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
    pointer-events: none;
}

.code-block-wrapper {
    position: relative;
    overflow: hidden;
}

/* Smooth page transitions */
.doc-section {
    animation: fadeInUp 0.6s ease both;
}

/* Icon rotation on hover */
.info-card-icon:hover i,
.practice-icon:hover i {
    animation: pulse 0.6s ease;
}

.support-card:hover i {
    animation: pulse 0.6s ease;
}

/* Badge pulse on hover */
.badge:hover {
    animation: pulse 0.4s ease;
}

/* Enhanced scroll-to-top animation */
.scroll-top {
    animation: scaleIn 0.3s ease;
}

.scroll-top:hover {
    animation: pulse 0.6s ease infinite;
}

/* Nav link underline animation */
.nav-link::after {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu slide animation */
.mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar smooth scroll */
.sidebar {
    scroll-behavior: smooth;
}

/* Code content fade transition */
.code-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.code-content:not(.active) {
    opacity: 0;
    transform: translateY(10px);
}

/* ===========================
   Production Enhancements
   =========================== */

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .header,
    .mobile-menu,
    .sidebar,
    .scroll-top,
    .theme-toggle,
    .mobile-menu-toggle,
    .copy-btn,
    .footer {
        display: none !important;
    }
    
    .content {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .doc-section {
        page-break-inside: avoid;
    }
    
    .code-block-wrapper {
        page-break-inside: avoid;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection styling */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* Smooth transitions for theme switching */
body,
.header,
.sidebar-content,
.info-card,
.practice-card,
.support-card,
.code-block-wrapper,
.endpoint-card,
.status-code,
.permission-item {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Loading state for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Responsive
   =========================== */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .main-layout {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .subsection-title {
        font-size: 1.25rem;
    }
    
    .api-endpoint {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .params-table {
        font-size: 0.875rem;
    }
    
    .params-table th,
    .params-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    /* Reduce animation complexity on mobile */
    .info-card,
    .practice-card,
    .support-card,
    .status-code,
    .permission-item {
        animation-duration: 0.4s;
    }
}
