/**
 * Electricks Developer Portal - Apple-Style Design
 */

/* ===== SF Pro Display Font ===== */
@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --color-primary: #007AFF;
    --color-primary-dark: #0051D5;
    --color-primary-light: #5AC8FA;

    --color-secondary: #5856D6;
    --color-success: #34C759;
    --color-warning: #FF9500;
    --color-error: #FF3B30;

    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F5F5F7;
    --color-bg-tertiary: #E8E8ED;

    --color-text-primary: #1D1D1F;
    --color-text-secondary: #6E6E73;
    --color-text-tertiary: #86868B;

    --color-border: #D2D2D7;
    --color-border-light: #E5E5EA;

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

    /* Typography */
    --font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;

    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;

    /* Effects */
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 14px;
    --border-radius-xl: 20px;

    --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 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --header-height: 72px;
    --sidebar-width: 260px;
    --toc-width: 260px;
    --max-content-width: 1400px;
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-primary: #000000;
        --color-bg-secondary: #1C1C1E;
        --color-bg-tertiary: #2C2C2E;

        --color-text-primary: #F5F5F7;
        --color-text-secondary: #98989D;
        --color-text-tertiary: #6E6E73;

        --color-border: #38383A;
        --color-border-light: #2C2C2E;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: #ffffff;
    background-color: #0f0f11;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    font-style: normal;
}

h1 { font-size: var(--font-size-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--font-size-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--font-size-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--font-size-lg); letter-spacing: -0.005em; }
h5 { font-size: var(--font-size-base); letter-spacing: 0; }
h6 { font-size: var(--font-size-sm); letter-spacing: 0; }

p {
    margin-bottom: var(--spacing-md);
}

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

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

code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ff6b35;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

pre {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    background-color: var(--color-bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
}

pre code {
    background: none;
    padding: 0;
}

/* Enhanced code block styling for better syntax highlighting */
.article-body pre[class*="language-"],
.article-body pre {
    background-color: #1C2023 !important;
    border: none !important;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 24px rgba(28, 32, 35, 0.6) !important;
    padding: 1.5em !important;
    overflow-x: auto;
    margin: 1.5em 0;
    white-space: pre !important;
}

.article-body pre[class*="language-"] code,
.article-body pre code {
    background-color: transparent !important;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    white-space: pre !important;
}

/* ===== Layout ===== */
.container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.site-main {
    min-height: calc(100vh - var(--header-height));
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Performance optimizations to prevent flickering */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 48px;
}

.logo {
    justify-self: start;
}

.main-nav {
    justify-self: center;
}

.header-actions {
    justify-self: end;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 24px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(1);
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.header-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
}

.header-btn-primary:hover {
    background: linear-gradient(135deg, #ff8557 0%, #ff5722 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Adjust main content for fixed header */
.site-main {
    padding-top: 60px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-small {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

.btn-large {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

/* ===== Hero Section ===== */
.hero {
    padding: 80px 0 var(--spacing-2xl);
    text-align: left;
    background: #2a2420;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: overlay;
}

/* Animated gradient clouds using SVG cloud shapes - optimized */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-image:
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3CradialGradient id='cloud1'%3E%3Cstop offset='0%25' stop-color='%238a2be2' stop-opacity='0.2'/%3E%3Cstop offset='100%25' stop-color='%238a2be2' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='150' cy='120' rx='180' ry='100' fill='url(%23cloud1)' filter='blur(40px)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3CradialGradient id='cloud2'%3E%3Cstop offset='0%25' stop-color='%23007aff' stop-opacity='0.25'/%3E%3Cstop offset='100%25' stop-color='%23007aff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='650' cy='100' rx='200' ry='120' fill='url(%23cloud2)' filter='blur(40px)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3CradialGradient id='cloud3'%3E%3Cstop offset='0%25' stop-color='%23ff6b35' stop-opacity='0.18'/%3E%3Cstop offset='100%25' stop-color='%23ff6b35' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='350' cy='450' rx='220' ry='110' fill='url(%23cloud3)' filter='blur(40px)'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    animation: cloudZoom 40s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    will-change: transform;
}

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

#meshGradientCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
}


@keyframes text-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8557 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: #ffffff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    margin: 0 0 var(--spacing-xl) 0;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Hero Product Showcase */
.hero-products {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.product-showcase {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    position: absolute;
    width: 115%;
    height: 115%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    animation: float-product 12s ease-in-out infinite;
    /* Performance */
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Edge fade ONLY for SB Watch 2 - larger transparent area with smooth fade */
.product-image[alt="SB Watch 2"] {
    -webkit-mask-image: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 0) 65%
    );
    mask-image: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 0) 65%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Rotate SB Watch 2 anti-clockwise by 20 degrees */
.product-image[alt="SB Watch 2"] {
    animation: float-product-watch 12s ease-in-out infinite;
}

.product-image.active {
    opacity: 1;
    z-index: 1;
}

@keyframes float-product {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg) scale(1.02);
    }
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
}

@keyframes float-product-watch {
    0% {
        transform: translateY(0px) rotate(-20deg) scale(1);
    }
    50% {
        transform: translateY(-5px) rotate(-21deg) scale(1.02);
    }
    100% {
        transform: translateY(0px) rotate(-20deg) scale(1);
    }
}

/* ===== Stats Section ===== */
.stats {
    padding: var(--spacing-2xl) 0;
    background: rgba(20, 20, 22, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.stat-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(
        135deg,
        rgba(20, 20, 22, 0.8) 0%,
        rgba(10, 10, 10, 0.6) 100%
    );
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(255, 107, 53, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ===== Developer Paths Section ===== */
.developer-paths {
    padding: var(--spacing-3xl) 0;
    background: #0f0f11;
}

.section-header {
    text-align: left;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.path-card {
    position: relative;
    padding: var(--spacing-xl);
    background: linear-gradient(
        135deg,
        rgba(20, 20, 22, 0.8) 0%,
        rgba(10, 10, 10, 0.6) 100%
    );
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.path-card-disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.path-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 60px rgba(255, 107, 53, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
}

.path-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.path-card-header .liquid-glass-icon {
    flex-shrink: 0;
    margin: 0;
}

.path-card-title-wrapper {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.path-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
    line-height: 1.2;
}

.path-audience {
    font-size: 0.75rem;
    color: #ff6b35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.path-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
}

.path-card .btn {
    align-self: flex-start;
    margin-top: auto;
    pointer-events: none;
}

.path-card-disabled:hover {
    transform: none;
}

/* Accent colors for different paths */
.path-bluetooth:hover {
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow:
        0 20px 60px rgba(0, 122, 255, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.path-magiscript:hover {
    border-color: rgba(175, 82, 222, 0.4);
    box-shadow:
        0 20px 60px rgba(175, 82, 222, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.path-services:hover {
    border-color: rgba(90, 200, 250, 0.4);
    box-shadow:
        0 20px 60px rgba(90, 200, 250, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.path-services .btn-secondary {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== Features Grid ===== */
.features {
    padding: var(--spacing-3xl) 0;
    position: relative;
    background: linear-gradient(180deg, #0f0f11 0%, #1a1a1c 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    perspective: 1500px;
}

.feature-card {
    position: relative;
    padding: var(--spacing-lg);
    background: linear-gradient(
        135deg,
        rgba(20, 20, 22, 0.7) 0%,
        rgba(10, 10, 10, 0.5) 100%
    );
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(255, 107, 53, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 53, 0.2);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.feature-card-header .liquid-glass-icon {
    flex-shrink: 0;
    margin: 0;
}

.feature-card-content {
    flex: 1;
    min-width: 0;
}

.feature-card-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
    line-height: 1.3;
}

.feature-card-content p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

/* ===== Code Example Section ===== */
.code-example {
    padding: var(--spacing-3xl) 0;
    background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.05) 0%, transparent 70%), #0f0f11;
}

.example-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.example-features {
    list-style: none;
    margin-top: var(--spacing-lg);
}

.example-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
}

.example-features svg {
    color: var(--color-success);
    flex-shrink: 0;
}

.example-code {
    background-color: #1E1E1E;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #2D2D2D;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: opacity 0.3s;
}

.window-control.close {
    background: #ff5f56;
}

.window-control.minimize {
    background: #ffbd2e;
}

.window-control.maximize {
    background: #27c93f;
}

.window-control:hover {
    opacity: 0.8;
}

.code-lang {
    color: #00ffff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.example-code pre {
    margin: 0;
    padding: var(--spacing-lg);
    background-color: #1E1E1E;
    color: #D4D4D4;
}

/* Enhanced Code Syntax Highlighting */
.code-comment {
    color: #6A9955;
    font-style: italic;
}

.code-keyword {
    color: #569CD6;
    font-weight: 600;
}

.code-function {
    color: #DCDCAA;
}

.code-string {
    color: #CE9178;
}

.code-number {
    color: #B5CEA8;
}

/* ===== CTA Section ===== */
.cta {
    padding: var(--spacing-3xl) 0;
    text-align: left;
    background: #0f0f11;
}

.cta-content h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

.cta-content p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
}

.cta-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* ===== Search Modal ===== */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: var(--spacing-2xl);
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.search-modal-content {
    width: 100%;
    max-width: 600px;
    background-color: var(--color-bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-top: 10vh;
    animation: slideDown 0.3s ease;
}

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

.search-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.search-box svg {
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--font-size-lg);
    background: none;
    color: var(--color-text-primary);
}

.search-close {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

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

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.search-result-item {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

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

.search-result-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.search-result-excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.search-result-excerpt mark {
    background-color: rgba(0, 122, 255, 0.2);
    color: var(--color-primary);
    padding: 2px 4px;
    border-radius: 2px;
}

/* ===== Documentation Layout ===== */
.docs-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
    gap: var(--spacing-2xl);
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Sidebar */
.doc-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
    height: fit-content;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 22, 0.8) 0%,
        rgba(10, 10, 10, 0.6) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.sidebar-content {
    padding: 0;
}

.nav-section {
    margin-bottom: var(--spacing-xl);
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-section-title .liquid-glass-icon {
    margin: 0;
}

.nav-items {
    list-style: none;
}

.nav-item {
    margin-bottom: var(--spacing-xs);
}

.nav-item a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item.active a {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Documentation Content */
.docs-content {
    max-width: 800px;
}

.doc-article {
    padding: var(--spacing-lg) 0;
}

.breadcrumbs {
    margin-bottom: var(--spacing-lg);
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    list-style: none;
    font-size: var(--font-size-sm);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.breadcrumbs a {
    color: var(--color-text-secondary);
}

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

.breadcrumb-separator {
    color: var(--color-text-tertiary);
}

.article-body {
    font-size: 1.125rem;
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.85);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    scroll-margin-top: calc(var(--header-height) + var(--spacing-lg));
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
}

.article-body h1 {
    font-size: var(--font-size-2xl);
    padding-bottom: var(--spacing-md);
}

.article-body h2 {
    font-size: var(--font-size-xl);
    padding-bottom: var(--spacing-sm);
}

.article-body h3 {
    font-size: var(--font-size-lg);
}

.article-body ul,
.article-body ol {
    margin-left: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.article-body li {
    margin-bottom: var(--spacing-sm);
}

.article-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    color: var(--color-text-secondary);
    font-style: italic;
}

.article-body hr {
    display: none;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
}

.article-body th,
.article-body td {
    padding: var(--spacing-md);
    text-align: left;
}

.article-body th {
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.03);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: var(--spacing-lg) 0;
}

/* Page Navigation (Prev/Next) */
.page-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--color-border-light);
}

.page-nav-link {
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.page-nav-link.prev {
    text-align: left;
}

.page-nav-link.next {
    text-align: right;
    align-items: flex-end;
}

.page-nav-link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.page-nav-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.page-nav-title {
    font-weight: 600;
    color: var(--color-text-primary);
}

.doc-meta {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Table of Contents (Right Sidebar) */
.docs-toc {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
    height: fit-content;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 22, 0.8) 0%,
        rgba(10, 10, 10, 0.6) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.table-of-contents h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: var(--spacing-xs);
}

.table-of-contents a {
    display: block;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.5;
}

.table-of-contents a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.table-of-contents a.active {
    color: #ff6b35;
    background-color: rgba(255, 107, 53, 0.15);
}

/* ===== Playground ===== */
.playground-container {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-secondary);
}

.playground-header {
    background-color: var(--color-bg-primary);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.playground-header h1 {
    margin-bottom: var(--spacing-sm);
}

.playground-header p {
    color: var(--color-text-secondary);
    margin: 0;
}

.playground-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    flex: 1;
}

.playground-editor,
.playground-output {
    background-color: var(--color-bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.editor-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
}

.editor-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.editor-wrapper {
    flex: 1;
    overflow: hidden;
}

#codeEditor {
    width: 100%;
    height: 100%;
    min-height: 500px;
    padding: var(--spacing-lg);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    border: none;
    outline: none;
    resize: vertical;
    background-color: #1E1E1E;
    color: #D4D4D4;
}

.output-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border-light);
    background-color: var(--color-bg-secondary);
}

.tab-button {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    background-color: var(--color-bg-tertiary);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: var(--color-bg-primary);
}

.tab-content {
    display: none;
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.led-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.led-strip {
    display: flex;
    gap: 8px;
    padding: var(--spacing-lg);
    background-color: #1A1A1A;
    border-radius: var(--border-radius-md);
    flex-wrap: wrap;
    justify-content: center;
}

.led {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #333;
    transition: background-color 100ms ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.led.active {
    box-shadow: 0 0 10px currentColor;
}

.preview-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.console-output,
.error-output {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    padding: var(--spacing-md);
    background-color: #1E1E1E;
    color: #D4D4D4;
    border-radius: var(--border-radius-md);
    min-height: 400px;
    overflow-y: auto;
}

.console-empty {
    color: var(--color-text-tertiary);
    font-style: italic;
}

.console-output .log-entry {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.error-output .error-entry {
    padding: var(--spacing-sm);
    background-color: rgba(255, 59, 48, 0.1);
    border-left: 3px solid var(--color-error);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
}

/* Examples Modal */
.examples-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: var(--spacing-2xl);
    align-items: center;
    justify-content: center;
}

.examples-modal.active {
    display: flex;
}

.examples-modal .modal-content {
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    background-color: var(--color-bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-bg-secondary);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.example-card {
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.example-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.example-card h4 {
    margin-bottom: var(--spacing-sm);
}

.example-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* ===== Footer ===== */
.site-footer {
    background-color: #0f0f11;
    padding: var(--spacing-2xl) 0;
    margin-top: var(--spacing-3xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-section h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff6b35;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--spacing-xs);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: var(--sidebar-width) 1fr;
    }

    .docs-toc {
        display: none;
    }
}

@media (max-width: 968px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .doc-sidebar {
        display: none;
    }

    .playground-layout {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 968px) {
    .hero {
        padding: 60px 0 var(--spacing-xl);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .hero-products {
        order: -1;
    }

    .product-showcase {
        max-width: 320px;
    }
}

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

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

    .hero {
        padding: 40px 0 var(--spacing-lg);
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .product-showcase {
        max-width: 260px;
    }

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

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

    .page-navigation {
        grid-template-columns: 1fr;
    }

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

/* ===== Utility Classes ===== */
.error-page {
    text-align: center;
    padding: var(--spacing-3xl) 0;
}

.error-page h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-lg);
}

.error-page p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

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

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

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

.slide-up {
    animation: slideUp 0.4s ease;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

.float {
    animation: float 3s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.scale-in {
    animation: scale-in 0.3s ease;
}

/* ===== Apple Liquid Glass Effects ===== */
/* Based on iOS 18 / macOS Sequoia design language */

.glass {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
    .glass {
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.04) 100%
        );
        border: 0.5px solid rgba(255, 255, 255, 0.12);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 1px 1px rgba(0, 0, 0, 0.3),
            inset 0 1px 1px rgba(255, 255, 255, 0.08);
    }
}

.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.75) 100%
    );
    backdrop-filter: blur(60px) saturate(200%) brightness(105%);
    -webkit-backdrop-filter: blur(60px) saturate(200%) brightness(105%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
    .glass-card {
        background: linear-gradient(
            135deg,
            rgba(40, 40, 42, 0.85) 0%,
            rgba(28, 28, 30, 0.75) 100%
        );
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.1),
            inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    }
}

/* Glass effect for feature cards */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

/* Enhanced Liquid Glass for search modal */
.search-modal-content {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.88) 100%
    );
    backdrop-filter: blur(80px) saturate(200%) brightness(105%);
    -webkit-backdrop-filter: blur(80px) saturate(200%) brightness(105%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
    .search-modal-content {
        background: linear-gradient(
            135deg,
            rgba(40, 40, 42, 0.92) 0%,
            rgba(28, 28, 30, 0.88) 100%
        );
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow:
            0 30px 90px rgba(0, 0, 0, 0.6),
            0 8px 24px rgba(0, 0, 0, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.12);
    }
}

/* Animated gradient backgrounds */
.gradient-bg {
    background: linear-gradient(-45deg, var(--color-primary), var(--color-secondary), var(--color-primary-light), var(--color-secondary));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Smooth hover lift effect */
.lift-on-hover {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.lift-on-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Interactive button effects */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

/* Glowing border effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--color-primary),
                    0 0 10px var(--color-primary),
                    0 0 15px var(--color-primary);
    }
    50% {
        box-shadow: 0 0 10px var(--color-primary),
                    0 0 20px var(--color-primary),
                    0 0 30px var(--color-primary);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Smooth page transitions */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* Icon animations */
.icon-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.icon-bounce {
    animation: bounce 1s ease infinite;
}

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

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Smooth scroll indicator */
.scroll-indicator {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.2s;
    z-index: 999;
}

/* Enhanced hero section with glass effect */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

/* Stagger animation for lists */
.stagger-item {
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== iOS 26 Liquid Glass Icon System - Pure CSS ===== */
/* Authentic squircle shapes with multi-layer glass effects */

.liquid-glass-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 22.5%;
    background: linear-gradient(135deg, var(--glass-color-1, #007AFF) 0%, var(--glass-color-2, #0051D5) 100%);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Glass overlay effects */
.liquid-glass-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    pointer-events: none;
}

.liquid-glass-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Icon content */
.liquid-glass-icon i {
    position: relative;
    z-index: 10;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Color presets */
.liquid-glass-icon.blue {
    --glass-color-1: #007AFF;
    --glass-color-2: #0051D5;
}

.liquid-glass-icon.purple {
    --glass-color-1: #AF52DE;
    --glass-color-2: #7C3AAE;
}

.liquid-glass-icon.teal {
    --glass-color-1: #5AC8FA;
    --glass-color-2: #0099CC;
}

.liquid-glass-icon.yellow {
    --glass-color-1: #FFCC00;
    --glass-color-2: #FF9500;
}

.liquid-glass-icon.indigo {
    --glass-color-1: #5856D6;
    --glass-color-2: #3634A3;
}

.liquid-glass-icon.pink {
    --glass-color-1: #FF2D55;
    --glass-color-2: #C7001E;
}

.liquid-glass-icon.orange {
    --glass-color-1: #FF9500;
    --glass-color-2: #FF6B00;
}

/* Size variants */
.liquid-glass-icon.size-18 {
    width: 18px;
    height: 18px;
    border-radius: 20%;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 0.5px 1px rgba(255, 255, 255, 0.4);
}

.liquid-glass-icon.size-18 i {
    font-size: 11px;
}

.liquid-glass-icon.size-18::after {
    border-width: 0.5px;
}

.liquid-glass-icon.size-56 {
    width: 56px;
    height: 56px;
    border-radius: 22%;
}

.liquid-glass-icon.size-56 i {
    font-size: 32px;
}

.liquid-glass-icon.size-60 {
    width: 60px;
    height: 60px;
    border-radius: 22%;
}

.liquid-glass-icon.size-60 i {
    font-size: 36px;
}

.liquid-glass-icon.size-80 {
    width: 80px;
    height: 80px;
    border-radius: 22.5%;
}

.liquid-glass-icon.size-80 i {
    font-size: 48px;
}

/* Hover effects */
.feature-card:hover .liquid-glass-icon,
.path-card:hover .liquid-glass-icon {
    transform: translateY(-2px) scale(1.03);
}

.feature-card:hover .liquid-glass-icon i,
.path-card:hover .liquid-glass-icon i {
    transform: scale(1.05);
}

/* Responsive sizing for smaller screens */
@media (max-width: 768px) {
    .liquid-glass-icon {
        width: 70px;
        height: 70px;
    }

    .liquid-glass-icon.size-60 {
        width: 55px;
        height: 55px;
    }

    .liquid-glass-icon.size-60 i {
        font-size: 32px;
    }
}

/* ===== Reusable Sidebar Styles ===== */

/* Related Products Section (brown header) */
.related-products-section {
    /* Styling removed - will be handled differently */
}

/* Section wrappers - all sections have same margin and left border */
.docs-toc > div {
    border-left: 3px solid rgba(49, 46, 129, 0.2);
    padding: var(--spacing-md);
}

/* Active Section Highlighting (darker left border) */
.docs-toc > div.active-section {
    border-left-color: rgba(49, 46, 129, 0.6);
}

.related-products-section .docs-group-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Section Headings */
.sidebar-section-heading {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    padding: 0;
}

.sidebar-section-heading:first-child {
    margin-top: 0;
}

.related-products-heading {
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 var(--spacing-sm) 0;
}

/* Sidebar Links List */
.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-links li {
    margin: 0;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.5;
}

.sidebar-links .link-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.sidebar-links .link-text {
    flex: 1;
}

.sidebar-links a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-links li.active a,
.sidebar-links a[aria-current="page"] {
    color: #000000;
    background-color: transparent;
    font-weight: 600;
}

.sidebar-links li.highlight a {
    background-color: rgba(255, 128, 0, 0.15);
    font-weight: 600;
}

/* Related products links styling */
.related-products-section .sidebar-links a {
    background-color: rgba(139, 90, 43, 0.1);
}

.related-products-section .sidebar-links a:hover {
    background-color: rgba(139, 90, 43, 0.25);
}

.related-products-section .sidebar-links li.active a {
    background-color: rgba(139, 90, 43, 0.35);
    color: #ffffff;
}

