/*
 * CoinTrail Documentation Stylesheet
 * Professional documentation design for Envato CodeCanyon
 * Version: 1.0.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;

    /* Secondary Colors */
    --secondary: #0ea5e9;
    --secondary-dark: #0284c7;
    --secondary-light: #38bdf8;

    /* Accent Colors */
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Backgrounds */
    --bg-main: #ffffff;
    --bg-sidebar: #f8fafc;
    --bg-code: #1e293b;
    --bg-highlight: #fef3c7;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

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

    /* Sizing */
    --sidebar-width: 300px;
    --header-height: 70px;
    --content-max-width: 900px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem;
    letter-spacing: -0.02em;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    color: var(--gray-800);
}

h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    color: var(--gray-800);
}

h5 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
}

h6 {
    font-size: 1rem;
    margin-top: 1.5rem;
    color: var(--gray-600);
}

p {
    margin-bottom: 1.25rem;
}

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

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

strong, b {
    font-weight: 600;
    color: var(--gray-900);
}

em, i {
    font-style: italic;
}

small {
    font-size: 0.875rem;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.docs-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Header */
.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
}

.docs-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.docs-header .logo img {
    height: 40px;
    width: auto;
}

.docs-header .logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-header .version {
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-left: 12px;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: var(--gray-50);
    transition: all var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.header-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.btn-purchase {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
    color: white;
    text-decoration: none;
}

/* Sidebar */
.docs-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 2rem 0;
    z-index: 900;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.sidebar-nav {
    padding: 0 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

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

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

.nav-section li {
    margin-bottom: 2px;
}

.nav-section a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 1rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-section a:hover {
    background: white;
    color: var(--gray-900);
    text-decoration: none;
}

.nav-section a.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.nav-section a .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-section a.active .nav-icon {
    opacity: 1;
}

/* Submenu */
.nav-submenu {
    margin-left: 30px;
    padding-left: 1rem;
    border-left: 2px solid var(--gray-200);
    margin-top: 0.5rem;
}

.nav-submenu a {
    padding: 8px 1rem;
    font-size: 0.875rem;
}

/* Main Content */
.docs-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.docs-main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--gray-500);
}

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

.breadcrumb .separator {
    color: var(--gray-300);
}

/* Page Title */
.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    margin-bottom: 0.75rem;
}

.page-header .subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
}

/* ============================================
   CONTENT ELEMENTS
   ============================================ */

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.5rem;
}

li ul, li ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--gray-100);
    color: var(--accent-pink);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

pre {
    background: var(--bg-code);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    position: relative;
}

pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #334155;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: -1px;
}

.code-header + pre {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.code-header .language {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-400);
}

.code-header .copy-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}

.code-header .copy-btn:hover {
    color: white;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

thead {
    background: var(--gray-50);
}

th {
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

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

tr:hover {
    background: var(--gray-50);
}

/* Images */
.docs-image {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
}

.image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

figure {
    margin: 2rem 0;
}

figure img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

/* ============================================
   ALERT BOXES
   ============================================ */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-text {
    font-size: 0.9375rem;
    margin: 0;
}

.alert-info {
    background: #eff6ff;
    border-left: 4px solid var(--secondary);
    color: #1e40af;
}

.alert-info .alert-icon {
    color: var(--secondary);
}

.alert-success {
    background: #ecfdf5;
    border-left: 4px solid var(--accent-green);
    color: #065f46;
}

.alert-success .alert-icon {
    color: var(--accent-green);
}

.alert-warning {
    background: #fffbeb;
    border-left: 4px solid var(--accent-yellow);
    color: #92400e;
}

.alert-warning .alert-icon {
    color: var(--accent-yellow);
}

.alert-danger {
    background: #fef2f2;
    border-left: 4px solid var(--accent-red);
    color: #991b1b;
}

.alert-danger .alert-icon {
    color: var(--accent-red);
}

.alert-tip {
    background: #faf5ff;
    border-left: 4px solid var(--accent-purple);
    color: #6b21a8;
}

.alert-tip .alert-icon {
    color: var(--accent-purple);
}

/* ============================================
   CARDS & BOXES
   ============================================ */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-text {
    color: var(--gray-600);
    margin-bottom: 0;
}

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

.feature-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-fast);
}

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

.feature-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-bg), #e0e7ff);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.feature-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin: 0;
}

/* Step Cards */
.steps {
    counter-reset: step;
}

.step {
    position: relative;
    padding-left: 4rem;
    padding-bottom: 2rem;
    border-left: 2px solid var(--gray-200);
    margin-left: 1rem;
}

.step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -1.25rem;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.step-content {
    color: var(--gray-600);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    margin-bottom: 2rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

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

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

/* ============================================
   ACCORDION
   ============================================ */
.accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--gray-50);
}

.accordion-header .icon {
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 1.5rem 1.25rem;
}

.accordion-item.active .accordion-body {
    display: block;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-new {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: white;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc {
    position: fixed;
    right: 2rem;
    top: calc(var(--header-height) + 2rem);
    width: 220px;
    max-height: calc(100vh - var(--header-height) - 4rem);
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

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

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--gray-600);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all var(--transition-fast);
}

.toc a:hover,
.toc a.active {
    color: var(--primary);
    border-left-color: var(--primary);
}

.toc ul ul {
    margin-left: 12px;
    margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.docs-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
    max-width: 45%;
}

.footer-nav a:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.footer-nav .label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.footer-copyright {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.search-result-excerpt mark {
    background: var(--bg-highlight);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-600);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1400px) {
    .toc {
        display: none;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }

    .header-search {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        width: 100%;
        max-width: 320px;
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-content {
        margin-left: 0;
    }

    .header-search {
        display: none;
    }

    .btn-purchase {
        display: none;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .docs-main {
        padding: 2rem 1rem;
    }

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

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-nav a {
        max-width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .docs-sidebar,
    .docs-header,
    .toc,
    .footer-nav {
        display: none !important;
    }

    .docs-content {
        margin-left: 0;
        margin-top: 0;
    }

    .docs-main {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    pre {
        white-space: pre-wrap;
        border: 1px solid #ddd;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.animate-slide-left {
    animation: slideInLeft 0.5s ease;
}

.animate-slide-up {
    animation: slideInUp 0.5s ease;
}

/* ============================================
   SYNTAX HIGHLIGHTING (Basic)
   ============================================ */
.hljs-keyword { color: #c792ea; }
.hljs-string { color: #c3e88d; }
.hljs-number { color: #f78c6c; }
.hljs-comment { color: #546e7a; font-style: italic; }
.hljs-function { color: #82aaff; }
.hljs-class { color: #ffcb6b; }
.hljs-variable { color: #f07178; }
.hljs-tag { color: #f07178; }
.hljs-attr { color: #ffcb6b; }
.hljs-built_in { color: #82aaff; }

/* ============================================
   DOCUMENTATION IMAGES
   ============================================ */
.doc-image {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.6);
}

.doc-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px 12px 0 0;
}

.doc-image figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.doc-image.placeholder img {
    min-height: 200px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-image.placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* Image placeholder styling */
.image-placeholder {
    min-height: 250px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 2rem;
    text-align: center;
}

.image-placeholder .placeholder-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #6366f1;
}

.image-placeholder .placeholder-text {
    color: #64748b;
    font-size: 0.875rem;
    max-width: 300px;
}

.image-placeholder .placeholder-filename {
    color: #6366f1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

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

.screenshot-gallery .doc-image {
    margin: 0;
}

/* Inline image with text */
.image-with-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.image-with-text.reverse {
    direction: rtl;
}

.image-with-text.reverse > * {
    direction: ltr;
}

.image-with-text .doc-image {
    margin: 0;
}

@media (max-width: 768px) {
    .image-with-text {
        grid-template-columns: 1fr;
    }

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }
}

/* Step images */
.step-image {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
}
