/* ============================================
   EdgeRun.Ai Documentation Styles
   Theme: "Illumination Palette" (Cyber Gold)
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

/* CSS Variables - Illumination Palette */
:root {
    /* Backgrounds */
    --bg-primary: #0F0F0F;
    --bg-secondary: #161616;
    --bg-tertiary: #1C1C1C;
    --code-bg: #1A1A1A;
    
    /* Accents (Gold) */
    --accent: #FFD700;
    --accent-hover: #FFDF33;
    --accent-subtle: rgba(255, 215, 0, 0.08);
    --accent-glow: rgba(255, 215, 0, 0.15);
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    
    /* Borders */
    --border: #2A2A2A;
    --border-accent: rgba(255, 215, 0, 0.3);
    
    /* Status Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    --discord: #5865F2;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 20px rgba(255, 215, 0, 0.15);
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
    
    /* Spacing */
    --sidebar-width: 280px;
    --content-max-width: 880px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

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

/* Layout Structure */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Logo */
.logo {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo h1 .accent {
    color: var(--accent);
}

/* Navigation Sections */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h2 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

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

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

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

.nav-link.active {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--border-accent);
}

.nav-link .icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.nav-link div {
    flex: 1;
    min-width: 0;
}

.nav-link strong {
    display: block;
    font-weight: 500;
    color: inherit;
    font-size: 0.875rem;
}

.nav-link small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Download Section */
.download-section {
    margin-bottom: 1.5rem;
}

.download-box {
    background: var(--accent-subtle);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

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

.download-box h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.download-box p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.btn,
.download-btn {
    background: var(--accent);
    color: #000000;
    display: inline-block;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    width: 100%;
}

.btn:hover,
.download-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-accent);
}

.btn-discord {
    background: var(--discord);
    color: #FFFFFF;
}

.btn-discord:hover {
    background: #4752C4;
}

/* Installation Steps */
.install-steps {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.install-steps h2 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.steps-list li:last-child {
    margin-bottom: 0;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--accent);
    color: #000000;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.6875rem;
}

/* Sidebar Footer Link */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color var(--transition-base);
}

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

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.3;
}

h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

h2 {
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.accent {
    color: var(--accent);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero,
.welcome-header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-subtle), transparent);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.hero h1,
.welcome-header h1 {
    font-size: 2.5rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.features-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all var(--transition-base);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

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

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

.feature-link:hover {
    text-decoration: none;
    color: var(--accent-hover);
}

/* ============================================
   STEP CARDS
   ============================================ */
.step-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card,
.guide-step {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: var(--accent);
    color: #000000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================
   ALERTS / CALLOUTS
   ============================================ */
.alert,
.info-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-info,
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error);
}

.alert-discord {
    background: rgba(88, 101, 242, 0.1);
    border-left-color: var(--discord);
}

.info-box strong {
    color: var(--text-primary);
}

/* ============================================
   CODE BLOCKS
   ============================================ */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--accent);
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

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

th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
}

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

tr:nth-child(even) {
    background: var(--bg-secondary);
}

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

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-section {
    margin-bottom: 3rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-subtle), var(--bg-secondary));
    color: var(--text-primary);
}

.video-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.video-placeholder p {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-placeholder small {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   FEATURES DETAILED SECTION
   ============================================ */
.section-intro {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.features-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-detail-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.feature-detail-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow);
}

.feature-detail-card h3 {
    font-size: 1.0625rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.feature-detail-card p {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.feature-detail-card ul {
    list-style: none;
    padding-left: 0;
}

.feature-detail-card ul li {
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    line-height: 1.5;
}

.feature-detail-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.feature-detail-card ul li strong {
    color: var(--text-primary);
}

/* ============================================
   WORKFLOWS SECTION
   ============================================ */
.workflow-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.workflow-card h3 {
    font-size: 1.125rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.workflow-steps {
    list-style: none;
    counter-reset: workflow-counter;
    padding-left: 0;
}

.workflow-steps > li {
    counter-increment: workflow-counter;
    margin-bottom: 0.875rem;
    padding-left: 2.5rem;
    position: relative;
    line-height: 1.7;
}

.workflow-steps > li::before {
    content: counter(workflow-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--accent);
    color: #000000;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
}

.workflow-steps ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
    list-style: disc;
}

.workflow-steps ul li {
    padding-left: 0.5rem;
    margin-bottom: 0.375rem;
}

.workflow-steps ul li::before {
    display: none;
}

/* ============================================
   TROUBLESHOOTING SECTION
   ============================================ */
.troubleshooting-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--error);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.troubleshooting-item h3 {
    font-size: 1.0625rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.troubleshooting-item p {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.troubleshooting-item p strong {
    color: var(--text-primary);
}

.troubleshooting-item ul {
    margin-top: 0.75rem;
    padding-left: 1.25rem;
}

.troubleshooting-item ul li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow);
}

.faq-item h3 {
    font-size: 1.0625rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.faq-item p {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.faq-item ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.faq-item ul li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ============================================
   SUPPORT SECTION
   ============================================ */
.support-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.support-section h2 {
    margin-top: 0;
    color: var(--text-primary);
}

.support-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.support-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #000000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
}

.support-link:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    text-decoration: none;
    color: #000000;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.menu-toggle:hover {
    background: var(--accent-subtle);
    border-color: var(--border-accent);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
    }
    
    .content {
        padding: 5rem 1rem 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero,
    .welcome-header {
        padding: 2rem 1.5rem;
    }
    
    .hero h1,
    .welcome-header h1 {
        font-size: 1.75rem;
    }
    
    .features-grid,
    .feature-grid,
    .features-detailed {
        grid-template-columns: 1fr;
    }
    
    .step-card,
    .guide-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .step-content {
        text-align: center;
    }
    
    .support-links {
        flex-direction: column;
    }
    
    .support-link {
        text-align: center;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   SELECTION STYLING
   ============================================ */
::selection {
    background: var(--accent);
    color: #000000;
}

::-moz-selection {
    background: var(--accent);
    color: #000000;
}
