/* ==========================================
   SSLens Documentation - Professional Bootstrap 5 Design
   Modern, Clean, Light/Dark Mode Support
   ========================================== */

/* ==========================================
   CSS Custom Properties (Theme Variables)
   ========================================== */

:root {
    /* Brand Colors */
    --sslens-purple: #6750A4;
    --sslens-purple-light: #a78bfa;
    --sslens-purple-dark: #4f378b;
    --sslens-teal: #14b8a6;
    --sslens-pink: #ec4899;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --nav-height: 72px;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ==========================================
   Light Theme (Default)
   ========================================== */

[data-bs-theme="light"],
:root {
    /* Backgrounds */
    --bg-body: #f8f9fc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f3f4f8;
    --bg-elevated: #ffffff;
    --bg-muted: #f1f3f9;

    /* Text Colors */
    --text-primary: #1a1d29;
    --text-secondary: #5b6178;
    --text-muted: #8b92a8;
    --text-inverse: #ffffff;

    /* Accent Colors */
    --accent-primary: #6750A4;
    --accent-primary-hover: #5a4593;
    --accent-primary-light: rgba(103, 80, 164, 0.1);
    --accent-gradient: linear-gradient(135deg, #6750A4 0%, #9333ea 100%);

    /* Status Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Borders */
    --border-color: rgba(107, 80, 164, 0.12);
    --border-hover: rgba(107, 80, 164, 0.25);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(103, 80, 164, 0.15);

    /* Navbar */
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --navbar-border: rgba(0, 0, 0, 0.08);

    /* Code Blocks */
    --code-bg: #1e1e2e;
    --code-text: #e2e8f0;
    --inline-code-bg: rgba(103, 80, 164, 0.08);
    --inline-code-text: #6750A4;
}

/* ==========================================
   Dark Theme
   ========================================== */

[data-bs-theme="dark"] {
    /* Backgrounds */
    --bg-body: #0f1117;
    --bg-surface: #1a1d29;
    --bg-surface-hover: #252836;
    --bg-elevated: #1f2231;
    --bg-muted: #252836;

    /* Text Colors */
    --text-primary: #f0f2f5;
    --text-secondary: #a0a8c0;
    --text-muted: #6b7394;
    --text-inverse: #0f1117;

    /* Accent Colors */
    --accent-primary: #a78bfa;
    --accent-primary-hover: #b8a0fb;
    --accent-primary-light: rgba(167, 139, 250, 0.12);
    --accent-gradient: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);

    /* Borders */
    --border-color: rgba(167, 139, 250, 0.12);
    --border-hover: rgba(167, 139, 250, 0.25);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 50px rgba(167, 139, 250, 0.2);

    /* Navbar */
    --navbar-bg: rgba(15, 17, 23, 0.9);
    --navbar-border: rgba(255, 255, 255, 0.08);

    /* Code Blocks */
    --code-bg: #0d1117;
    --code-text: #e2e8f0;
    --inline-code-bg: rgba(167, 139, 250, 0.15);
    --inline-code-text: #a78bfa;
}

/* ==========================================
   Base Styles & Resets
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

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

/* ==========================================
   Typography
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Gradient Text */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   Code & Pre Blocks
   ========================================== */

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

pre {
    font-family: var(--font-mono);
    background: var(--code-bg) !important;
    color: var(--code-text);
    padding: 1.25rem !important;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Code Block with Header */
.code-block {
    background: var(--code-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block-lang {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    color: var(--color-success);
    border-color: var(--color-success);
}

.code-block pre {
    margin: 0;
    border-radius: 0;
    border: none;
}

/* ==========================================
   Navigation - Professional Floating Design
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1030;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--navbar-border);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

/* Desktop Floating Style */
@media (min-width: 992px) {
    .navbar {
        top: 16px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 48px);
        max-width: 1280px;
        height: 64px;
        border-radius: var(--radius-lg);
        border: 1px solid var(--navbar-border);
    }

    .navbar.scrolled {
        top: 8px;
        box-shadow: var(--shadow-lg);
    }
}

.navbar .container-fluid {
    height: 100%;
    padding: 0 1.5rem;
}

/* Brand */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.375rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.navbar-brand .logo-icon {
    font-size: 1.625rem;
    filter: drop-shadow(0 2px 4px rgba(103, 80, 164, 0.3));
}

.navbar-brand .logo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border-radius: var(--radius-sm);
    margin-left: 0.25rem;
}

/* Nav Links */
.navbar-nav {
    gap: 0.25rem;
}

.navbar-nav .nav-link {
    padding: 0.625rem 1rem !important;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-primary-light);
}

.navbar-nav .nav-link.active {
    color: var(--text-inverse) !important;
    background: var(--accent-gradient) !important;
    font-weight: 600;
}

/* Theme Toggle & GitHub Button */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle,
.nav-github {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--text-secondary);
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover,
.nav-github:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

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

/* Mobile Navbar */
.navbar-toggler {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition-fast);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.navbar-toggler-icon::before {
    top: -7px;
}

.navbar-toggler-icon::after {
    bottom: -7px;
}

/* Mobile Menu */
@media (max-width: 991.98px) {
    .navbar {
        height: auto;
        min-height: var(--nav-height);
    }

    .navbar-collapse {
        background: var(--bg-surface);
        margin: 0.75rem -1.5rem -0.75rem;
        padding: 1rem 1.5rem 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .navbar-nav {
        gap: 0.375rem;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 1rem !important;
        border-radius: var(--radius-md);
    }

    .nav-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    padding: calc(var(--nav-height) + 80px) 0 80px;
    background: var(--bg-body);
    overflow: hidden;
}

@media (min-width: 992px) {
    .hero {
        padding: calc(var(--nav-height) + 120px) 0 100px;
        min-height: 90vh;
        display: flex;
        align-items: center;
    }
}

/* Animated Background */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 20%, rgba(103, 80, 164, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(147, 51, 234, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.04) 0%, transparent 55%);
    animation: heroFloat 20s ease-in-out infinite;
}

[data-bs-theme="dark"] .hero-bg::before {
    background: radial-gradient(circle at 30% 20%, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.06) 0%, transparent 55%);
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(2%, 1%) rotate(1deg);
    }

    66% {
        transform: translate(-1%, 2%) rotate(-1deg);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge .badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    background: var(--accent-primary-light);
    border-radius: var(--radius-md);
}

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

.hero-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Hero Code Window */
.hero-code-window {
    position: relative;
    background: var(--code-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out 0.3s both;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-window-dot.red {
    background: #ff5f57;
}

.code-window-dot.yellow {
    background: #febc2e;
}

.code-window-dot.green {
    background: #28c840;
}

.code-window-title {
    margin-left: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.code-window-content {
    padding: 1.25rem;
}

.code-window-content pre {
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    font-size: 0.8125rem;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Primary Button */
.btn-primary {
    color: #fff !important;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(103, 80, 164, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(103, 80, 164, 0.4);
}

/* Secondary/Outline Button */
.btn-outline-secondary {
    color: var(--text-primary);
    background: var(--bg-surface);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ==========================================
   Cards - Modern Design
   ========================================== */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

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

.card-body {
    padding: 1.5rem;
}

/* Feature Cards */
.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

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

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    background: var(--accent-primary-light);
    border-radius: var(--radius-md);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.feature-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.feature-card-link:hover {
    gap: 0.625rem;
}

/* Platform Cards */
.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

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

.platform-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.platform-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.platform-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* Doc Cards (Navigation Cards) */
.doc-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
}

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

.doc-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.doc-card p {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.doc-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* ==========================================
   Sections
   ========================================== */

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border-radius: var(--radius-full);
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Alternating Section Backgrounds */
.section-alt {
    background: var(--bg-muted);
}

/* ==========================================
   Quick Start Steps
   ========================================== */

.quickstart-step {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quickstart-step:last-child {
    border-bottom: none;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-inverse);
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.step-code {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--inline-code-text);
    background: var(--inline-code-bg);
    border-radius: var(--radius-sm);
}

/* ==========================================
   Security Section
   ========================================== */

.security-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
    background: var(--accent-primary-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}

@media (min-width: 768px) {
    .security-card {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
}

.security-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .security-icon {
        margin-bottom: 0;
    }
}

.security-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.security-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-full);
}

/* ==========================================
   Page Header (Sub Pages)
   ========================================== */

.page-header {
    padding: calc(var(--nav-height) + 60px) 0 40px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 992px) {
    .page-header {
        padding: calc(var(--nav-height) + 80px) 0 60px;
    }
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0;
}

/* ==========================================
   Content Layout (Docs Pages)
   ========================================== */

.content-layout {
    display: grid;
    gap: 3rem;
    padding: 3rem 0;
}

@media (min-width: 992px) {
    .content-layout {
        grid-template-columns: 240px 1fr;
        gap: 4rem;
    }
}

/* Sidebar */
.content-sidebar {
    position: relative;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .content-sidebar {
        position: sticky;
        top: calc(var(--nav-height) + 24px);
        align-self: start;
        margin-bottom: 0;
    }
}

.sidebar-nav h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

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

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.sidebar-nav a.active {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

/* Main Content */
.content-main {
    max-width: 100%;
    overflow-x: hidden;
}

.content-main h2 {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.content-main h2:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

.content-main h3 {
    margin-top: 1.5rem;
}

.content-main ul,
.content-main ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-main li {
    margin-bottom: 0.5rem;
}

/* ==========================================
   Tables
   ========================================== */

.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.table th {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

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

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

.table tbody tr:hover {
    background: var(--accent-primary-light);
}

/* ==========================================
   Callouts / Alerts
   ========================================== */

.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.callout-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.callout-content h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.callout-content p {
    font-size: 0.875rem;
    margin: 0;
}

.callout-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.callout-info .callout-content h4 {
    color: var(--color-info);
}

.callout-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.callout-success .callout-content h4 {
    color: var(--color-success);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.callout-warning .callout-content h4 {
    color: var(--color-warning);
}

.callout-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.callout-error .callout-content h4 {
    color: var(--color-error);
}

/* ==========================================
   Tabs (Pinning Page)
   ========================================== */

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-tabs .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 0;
    transition: all var(--transition-fast);
}

.nav-tabs .nav-link:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.nav-tabs .nav-link.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: transparent;
}

.tab-content {
    padding: 1.5rem 0;
}

/* ==========================================
   Accordion (FAQ)
   ========================================== */

.accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-button {
    padding: 1.125rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-surface);
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236750A4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.25rem;
    color: var(--text-secondary);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand .footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-brand .logo-icon {
    font-size: 1.5rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    transform: translateY(-2px);
}

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

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

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

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Reveal */
.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Children */
.stagger-children>* {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.3s;
}

/* ==========================================
   Utilities
   ========================================== */

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

.bg-gradient-primary {
    background: var(--accent-gradient);
}

.border-gradient {
    border-image: var(--accent-gradient);
    border-image-slice: 1;
}

/* ==========================================
   Responsive Utilities
   ========================================== */

@media (max-width: 575.98px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .hide-tablet {
        display: none !important;
    }

    section {
        padding: 3rem 0;
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {

    .navbar,
    .footer,
    .theme-toggle,
    .nav-github {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .hero {
        padding-top: 2rem;
        min-height: auto;
    }
}