/* ============================================================================
   DIGITAL RESISTANCE DOCUMENTATION STYLESHEET
   ============================================================================

   Professional CSS for docs.resistance.dog matching the design system
   from resistance.dog with TON branding, glassmorphism, and animations.

   Design System:
   - Animated gradient background
   - TON blue colors (#0098EA, #1AC9FF)
   - Inter font family
   - Glassmorphism with backdrop-blur
   - Fixed header with blur effect
   - Professional typography and spacing

   ============================================================================ */

/* ============================================================================
   ANIMATIONS & KEYFRAMES
   ============================================================================ */

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

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

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

/* ============================================================================
   DESIGN SYSTEM VARIABLES
   ============================================================================ */

:root {
    /* TON Official Brand Colors */
    --ton-dark: #1E2337;
    --ton-blue: #0098EA;
    --ton-light-blue: #1AC9FF;
    --ton-gradient-start: #2D83EC;
    --ton-gradient-end: #1AC9FF;
    --ton-light-bg: #F7F9FB;
    --white: #FFFFFF;

    /* Background Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f35;
    --bg-tertiary: #0d1520;
    --bg-quaternary: #1e2640;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Border & Overlay Colors */
    --border-color: rgba(255, 255, 255, 0.1);
    --overlay-light: rgba(255, 255, 255, 0.05);
    --overlay-medium: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --header-height-mobile: 52px;
    --header-height-desktop: 56px;
    --sidebar-width: 280px;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   CSS RESET & BASE STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #0a0e1a, #1a1f35, #0d1520, #1e2640);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    padding-top: var(--header-height-mobile);
    min-height: 100vh;
}

/* ============================================================================
   HEADER STYLES
   ============================================================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--header-height-mobile);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    background-color: rgba(10, 14, 26, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.header-container,
.header-content {
    max-width: 1800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg) 0 0;
}

/* Brand/Logo */
.header-brand,
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
    flex: 1;
}

.header-brand:hover,
.logo:hover {
    opacity: 0.8;
}

.logo svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.brand-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

/* Navigation */
.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.nav-btn {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .nav-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }
}

.nav-btn:active {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-btn.active {
    color: var(--ton-blue);
    background-color: rgba(0, 152, 234, 0.1);
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 32px;
    cursor: pointer;
    padding: 12px;
}

/* ============================================================================
   LAYOUT CONTAINER
   ============================================================================ */

.layout {
    display: flex;
    margin-top: 0;
    min-height: calc(100vh - var(--header-height-mobile));
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ============================================================================ */

.sidebar {
    width: var(--sidebar-width);
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: var(--spacing-lg) 0;
    transition: transform 0.3s ease;
    z-index: 100;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navigation Sections */
.nav-section {
    margin-bottom: var(--spacing-xl);
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

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

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px var(--spacing-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--ton-blue);
    background: rgba(0, 152, 234, 0.1);
    border-left: 3px solid var(--ton-blue);
    padding-left: 21px;
}

/* Navigation Icons */
.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* ============================================================================
   FLOATING NAVIGATION (MOBILE ONLY)
   ============================================================================ */

/* Hide floating nav by default (desktop) - shown only on mobile via media query */
.floating-nav {
    display: none;
}

/* ============================================================================
   MAIN CONTENT AREA
   ============================================================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-2xl);
    max-width: 1400px;
    width: 100%;
}

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

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--ton-blue);
}

.breadcrumb-separator {
    color: var(--text-muted);
    margin: 0 4px;
}

.breadcrumb-separator::after {
    content: '›';
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.2;
}

h2 {
    font-size: 36px;
    font-weight: 600;
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    line-height: 1.3;
    position: relative;
}

h3 {
    font-size: 28px;
    font-weight: 600;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.4;
    position: relative;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    line-height: 1.5;
}

h5 {
    font-size: 16px;
    font-weight: 600;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h6 {
    font-size: 14px;
    font-weight: 600;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 16px;
}

strong, b {
    font-weight: 600;
    color: var(--text-primary);
}

em, i {
    font-style: italic;
}

/* Lists */
ul, ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-lg);
    color: var(--text-secondary);
}

li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.7;
}

li > ul,
li > ol {
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

/* Links */
a {
    color: var(--ton-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Anchor Links (Heading Links) */
.anchor-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    opacity: 0.5;
    color: var(--ton-blue);
    transition: all 0.2s ease;
    text-decoration: none;
    vertical-align: middle;
}

h2:hover .anchor-link,
h3:hover .anchor-link,
.anchor-link:hover {
    opacity: 1;
    color: var(--ton-light-blue);
}

.anchor-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 152, 234, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Code */
code {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    color: var(--ton-light-blue);
}

pre {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--ton-blue);
    padding: var(--spacing-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

/* Copy Button for Code Blocks */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--ton-blue);
    color: var(--ton-blue);
}

.copy-button.copied {
    background: rgba(0, 152, 234, 0.2);
    border-color: var(--ton-blue);
    color: var(--ton-blue);
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Table Wrapper - Responsive tables */
.table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--ton-blue);
}

.table-wrapper table {
    min-width: 600px;
    margin: 0 !important;
}

/* Add scroll hint on mobile */
@media (max-width: 768px) {
    .table-wrapper {
        position: relative;
    }

    .table-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.3));
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .table-wrapper::-webkit-scrollbar {
        height: 8px;
    }

    .table-wrapper::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }

    .table-wrapper::-webkit-scrollbar-thumb {
        background: var(--ton-blue);
        border-radius: 4px;
    }

    .table-wrapper::-webkit-scrollbar-thumb:hover {
        background: var(--ton-blue-hover);
    }
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-2xl) 0;
}

/* ============================================================================
   BACK TO TOP BUTTON
   ============================================================================ */

#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--ton-blue);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 152, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--ton-blue-hover);
    box-shadow: 0 6px 20px rgba(0, 152, 234, 0.4);
    transform: translateY(-2px);
}

#back-to-top:active {
    transform: translateY(0);
}

#back-to-top svg {
    color: white;
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 24px;
        right: 24px;
        width: 44px;
        height: 44px;
    }

    #back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================================================
   FAQ ACCORDION
   ============================================================================ */

.accordion-question {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 32px;
    transition: color 0.2s ease;
    margin-top: 32px;
}

.accordion-question:hover {
    color: var(--ton-blue);
}

.accordion-question .accordion-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 24px;
    color: var(--ton-blue);
    transition: transform 0.3s ease;
    font-weight: 400;
    line-height: 1;
}

.accordion-question.expanded .accordion-chevron {
    transform: translateY(-50%) rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content > * {
    margin-top: 16px;
}

.accordion-content > *:first-child {
    margin-top: 8px;
}

.accordion-content > *:last-child {
    margin-bottom: 16px;
}

/* ============================================================================
   WELCOME & HERO SECTION
   ============================================================================ */

.welcome-section {
    margin-bottom: 64px;
    display: block;
}

.welcome-content {
    max-width: 800px;
}

.welcome-title,
.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, #ffffff 0%, var(--ton-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.welcome-description,
.hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
}

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
    font-style: italic;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    background: transparent;
    color: var(--ton-light-blue);
    border: none;
}

.badge.beta {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    border-color: rgba(255, 165, 0, 0.3);
}

.badge.new {
    background: rgba(0, 255, 0, 0.15);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.3);
}

/* ============================================================================
   BUTTONS & CALL-TO-ACTION
   ============================================================================ */

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
}

.btn,
.btn-primary,
.btn-secondary,
a.btn,
a.btn-primary,
a.btn-secondary {
    padding: 12px 24px !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
    font-family: var(--font-primary) !important;
    position: relative !important;
    overflow: hidden !important;
    letter-spacing: 0.01em !important;
    box-sizing: border-box !important;
}

a.btn-primary,
.btn-primary {
    background: linear-gradient(180deg, #0098EA 0%, #0088CC 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 152, 234, 0.25),
                0 8px 24px rgba(0, 152, 234, 0.15) !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    opacity: 1;
    transition: opacity 0.25s;
}

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

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: linear-gradient(180deg, #1AA3EF 0%, #0098EA 100%);
        box-shadow: 0 4px 12px rgba(0, 152, 234, 0.3),
                    0 12px 32px rgba(0, 152, 234, 0.2);
        transform: translateY(-1px);
    }

    .btn-primary:hover::before {
        opacity: 1;
    }
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 152, 234, 0.2);
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1.5px solid rgba(0, 152, 234, 0.4);
    backdrop-filter: blur(10px);
}

@media (hover: hover) and (pointer: fine) {
    .btn-secondary:hover {
        border-color: var(--ton-blue);
        background: rgba(0, 152, 234, 0.12);
        box-shadow: 0 2px 8px rgba(0, 152, 234, 0.2);
        transform: translateY(-1px);
    }
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

/* ============================================================================
   CARDS & GLASSMORPHISM COMPONENTS
   ============================================================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

/* Standard Card */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(0, 152, 234, 0.3);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

/* Glass Card (Alias) */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Doc Card */
.doc-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .doc-card:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: var(--ton-blue);
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }
}

/* Method Card */
.method-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.method-card h4 {
    color: var(--ton-blue);
    margin-top: 0;
}

/* Step Card */
.step-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: var(--ton-blue);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-card h4 {
    margin-top: 0;
    color: var(--text-primary);
}

/* Card Components */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 152, 234, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--ton-blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    line-height: 1.3;
}

.card-subtitle {
    font-size: 13px;
    color: var(--ton-blue);
    margin-bottom: 0;
    font-weight: 500;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.card-link {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .card-link:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
}

.card-link::after {
    content: '→';
    font-size: 16px;
}

/* ============================================================================
   INFO BOXES & ALERTS
   ============================================================================ */

.info-box,
.warning-box,
.privacy-box,
.quote-box {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-box {
    background: rgba(0, 152, 234, 0.08);
    border-color: var(--ton-blue);
}

.info-box strong {
    color: var(--ton-light-blue);
}

.warning-box {
    background: rgba(255, 165, 0, 0.08);
    border-color: #ffa500;
}

.warning-box strong {
    color: #ffa500;
}

.privacy-box {
    background: rgba(0, 255, 0, 0.08);
    border-color: #00ff00;
}

.privacy-box strong {
    color: #00ff00;
}

.quote-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    font-style: italic;
}

.info-box p:last-child,
.warning-box p:last-child,
.privacy-box p:last-child,
.quote-box p:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   SPECIAL SECTIONS
   ============================================================================ */

/* Examples */
.examples,
.examples-list {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

.examples h4,
.examples-list h4 {
    margin-top: 0;
    color: var(--ton-blue);
}

/* Flow Diagram */
.flow-diagram {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.flow-diagram-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.flow-step {
    background: rgba(0, 152, 234, 0.1);
    padding: 12px var(--spacing-lg);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid rgba(0, 152, 234, 0.3);
}

.flow-arrow {
    color: var(--ton-blue);
    font-size: 24px;
    font-weight: 700;
}

/* See Also */
.see-also {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.see-also h3 {
    margin-top: 0;
}

/* ============================================================================
   PREVIOUS/NEXT NAVIGATION
   ============================================================================ */

.prev-next-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.prev-link,
.next-link {
    flex: 1;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.prev-link:not(.disabled):hover,
.next-link:not(.disabled):hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ton-blue);
    transform: translateY(-2px);
}

.prev-link.disabled,
.next-link.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.next-link {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.nav-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .prev-next-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .prev-link,
    .next-link {
        padding: var(--spacing-sm);
    }

    .next-link {
        text-align: left;
    }

    .nav-title {
        font-size: 15px;
    }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.docs-footer {
    margin-top: var(--spacing-2xl);
    margin-left: var(--sidebar-width);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-2xl);
    text-align: center;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .footer-links a:hover {
        color: var(--ton-blue);
    }
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

footer {
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-2xl);
    border-top: 1px solid var(--border-color);
}

.footer-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
}

.footer-item.link {
    transition: color 0.2s ease;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .footer-item.link:hover {
        color: var(--ton-blue);
    }
}

.footer-logo {
    width: 20px;
    height: 20px;
}

.footer-logo svg {
    width: 100%;
    height: 100%;
}

/* ============================================================================
   TABLES
   ============================================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    overflow: hidden;
}

thead {
    background: rgba(255, 255, 255, 0.05);
}

th {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   IMAGES & MEDIA
   ============================================================================ */

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

figure {
    margin: var(--spacing-lg) 0;
}

figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
    font-style: italic;
}

/* ============================================================================
   RESPONSIVE DESIGN - DESKTOP
   ============================================================================ */

@media (min-width: 768px) {
    body {
        padding-top: var(--header-height-desktop);
    }

    .header {
        height: var(--header-height-desktop);
    }

    .header-container {
        padding: 0 var(--spacing-xl);
    }

    .header-brand,
    .logo {
        font-size: 16px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .header-nav {
        gap: var(--spacing-sm);
    }

    .nav-btn {
        padding: 7px 14px;
        font-size: 14px;
    }

    .sidebar {
        top: var(--header-height-desktop);
    }

    .layout {
        min-height: calc(100vh - var(--header-height-desktop));
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET
   ============================================================================ */

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    /* Sidebar - Hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main Content */
    .main-content {
        margin-left: 0;
        padding: var(--spacing-lg);
    }

    /* Header Mobile */
    .header-container,
    .header-content {
        padding: 0 var(--spacing-md) 0 0;
    }

    .menu-toggle {
        display: block;
    }

    /* Floating Compact Tab - Mobile Only */
    .floating-nav {
        display: block;
        position: fixed;
        left: -190px;
        top: var(--header-height-mobile);
        bottom: 0;
        width: 180px;
        background: linear-gradient(135deg, rgba(13, 21, 32, 0.6), rgba(30, 35, 53, 0.7));
        backdrop-filter: blur(20px) saturate(150%);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 0 24px 0 0;
        border-left: none;
        border-bottom: none;
        padding: 16px 0;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .floating-nav.active {
        left: 0;
    }

    .floating-nav-item {
        display: block;
        padding: 12px 18px;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
        border-left: 2px solid transparent;
    }

    .floating-nav-item:hover,
    .floating-nav-item.active {
        color: #0098EA;
        background: rgba(0, 152, 234, 0.1);
        border-left-color: #0098EA;
    }

    .floating-nav-section {
        margin-bottom: 8px;
    }

    .floating-nav-title {
        padding: 10px 18px;
        font-size: 11px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.4);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .floating-nav-item-wrapper {
        position: relative;
    }

    .floating-nav-chevron {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.4);
        font-size: 16px;
        transition: all 0.3s ease;
        cursor: pointer;
        pointer-events: none;
    }

    .floating-nav-item-wrapper.expanded .floating-nav-chevron {
        transform: translateY(-50%) rotate(90deg);
        color: #0098EA;
    }

    .floating-subsections-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .floating-subsections-list.expanded {
        max-height: 1000px;
    }

    .floating-subsection-item {
        display: block;
        padding: 8px 16px 8px 32px;
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        font-size: 12px;
        font-weight: 400;
        transition: all 0.2s ease;
        border-left: 2px solid transparent;
    }

    .floating-subsection-item:hover,
    .floating-subsection-item.active {
        color: #1AC9FF;
        background: rgba(26, 201, 255, 0.08);
        border-left-color: #1AC9FF;
    }

    /* Hide regular sidebar in mobile */
    .sidebar {
        display: none;
    }

    /* Main content takes full width */
    .main-content {
        margin-left: 0;
        padding-top: var(--spacing-xl);
    }

    .header-nav .nav-btn:not(:last-child) {
        display: none;
    }

    /* Reduce text size by 15% in mobile (except header) */
    .main-content {
        font-size: 85%;
    }

    .main-content h1 {
        font-size: calc(2.5rem * 0.85);
    }

    .main-content h2 {
        font-size: calc(2rem * 0.85);
    }

    .main-content h3 {
        font-size: calc(1.5rem * 0.85);
    }

    .main-content h4 {
        font-size: calc(1.25rem * 0.85);
    }

    .main-content p,
    .main-content li,
    .main-content code,
    .main-content pre {
        font-size: inherit;
    }

    /* Typography Mobile */
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 22px;
    }

    h4 {
        font-size: 18px;
    }

    /* Welcome Section Mobile */
    .welcome-title,
    .hero-title {
        font-size: 32px;
    }

    .welcome-description,
    .hero-description {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Cards Grid Mobile */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Buttons Mobile */
    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Code Mobile */
    pre {
        font-size: 12px;
    }

    code {
        font-size: 12px;
    }

    /* Tables Mobile */
    table {
        font-size: 14px;
    }

    th, td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Footer Mobile */
    .docs-footer {
        padding: var(--spacing-lg) 0;
        margin-left: 0;
    }

    .footer-content {
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }

    .footer-links {
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    .footer-links a {
        font-size: 13px;
    }

    .footer-copyright {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 48px;
    }

    body {
        padding-top: 48px;
    }

    .header-brand,
    .logo {
        font-size: 13px;
        gap: 6px;
    }

    .brand-logo {
        width: 22px;
        height: 22px;
    }

    .sidebar {
        top: 48px;
    }

    .main-content {
        padding: var(--spacing-md);
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-description {
        font-size: 14px;
    }

    p {
        font-size: 14px;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--ton-blue);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--ton-blue);
    outline-offset: 2px;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .header,
    .sidebar,
    .menu-toggle,
    footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    a {
        text-decoration: underline;
    }

    .card,
    .glass-card,
    .doc-card,
    .method-card,
    .step-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ============================================================================
   SUBSECTION NAVIGATION (DROPDOWNS)
   ============================================================================ */

/* Chevron icon for expandable sections */
.nav-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-chevron.rotated {
    transform: rotate(90deg);
}

.nav-chevron:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Subsections list */
.subsections-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.subsections-list.expanded {
    max-height: 1000px;
    opacity: 1;
}

.subsection-item {
    margin-bottom: 0;
}

.subsection-link {
    display: block;
    padding: 8px var(--spacing-lg) 8px 52px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    border-left: 2px solid transparent;
}

.subsection-link::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.5;
}

.subsection-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.subsection-link.active {
    color: var(--ton-blue);
    background: rgba(0, 152, 234, 0.08);
    border-left-color: var(--ton-blue);
}

.subsection-link.active::before {
    background: var(--ton-blue);
    opacity: 1;
}

/* Adjust nav-link to accommodate chevron */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Mobile subsections */
@media (max-width: 768px) {
    .subsection-link {
        padding: 8px var(--spacing-md) 8px 44px;
        font-size: 13px;
    }

    .subsection-link::before {
        left: 28px;
    }
}

/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */
