/**
 * Market Experts Bot Documentation
 * Styled to match docs.marketexpertstrading.com
 */

/* CSS Variables */
:root {
    /* Primary Colors - matching docs site */
    --primary-blue: #1e73be;
    --primary-dark: #1a5a96;
    --primary-deeper: #144a7a;
    --accent-orange: #f7941d;
    --accent-gold: #FDAF17;

    /* Backgrounds */
    --bg-light: #e9f6ff;
    --bg-lighter: #f5faff;
    --bg-dark: #1a2538;
    --bg-darker: #0f1724;
    --bg-card: #ffffff;

    /* Text */
    --text-dark: #40474f;
    --text-darker: #202124;
    --text-light: #ffffff;
    --text-muted: #6b7c93;

    /* Borders */
    --border-light: #b7e5ff;
    --border-medium: #ccc;

    /* Status Colors */
    --success: #57F287;
    --warning: #FEE75C;
    --error: #ED4245;
    --info: #5865F2;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e73be 0%, #144a7a 100%);
    --gradient-dark: linear-gradient(135deg, #1a2538 0%, #0f1724 100%);
    --gradient-gold: linear-gradient(135deg, #FDAF17 0%, #f7941d 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius - matching docs site */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 50%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-lighter);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--text-darker);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background: var(--gradient-dark);
    color: var(--text-light);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

/* Navigation */
.nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav a {
    color: var(--text-light);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
}

.nav a.active {
    background: var(--accent-gold);
    color: var(--bg-dark);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-light);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

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

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--text-light);
}

/* Main Content */
.main {
    padding: var(--spacing-xl) 0;
}

/* Sidebar Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-lg);
}

/* Sidebar */
.sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: var(--spacing-md);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-light);
}

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

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

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

.sidebar-nav a.active {
    background: var(--primary-blue);
    color: var(--text-light);
}

.sidebar-nav .icon {
    width: 20px;
    text-align: center;
}

/* Content */
.content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.content h2 {
    color: var(--text-darker);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--accent-orange);
    margin-bottom: var(--spacing-md);
}

.content h3 {
    color: var(--primary-blue);
    margin-top: var(--spacing-lg);
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    margin-top: 0;
    color: var(--text-darker);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

/* Command Tables */
.command-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.command-table th,
.command-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.command-table th {
    background: var(--primary-blue);
    color: var(--text-light);
    font-weight: 600;
}

.command-table tr:hover {
    background: var(--bg-light);
}

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

.command-table code {
    background: var(--bg-dark);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Code Blocks */
pre {
    background: var(--bg-darker);
    color: var(--text-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* Inline code */
p code, li code {
    background: var(--bg-light);
    color: var(--primary-deeper);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Alert Boxes */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
    display: flex;
    gap: var(--spacing-sm);
    border: 1px solid;
}

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

.alert-info {
    background: rgba(30, 115, 190, 0.1);
    border-color: var(--primary-blue);
}

.alert-success {
    background: rgba(87, 242, 135, 0.1);
    border-color: var(--success);
}

.alert-warning {
    background: rgba(247, 148, 29, 0.1);
    border-color: var(--accent-orange);
}

.alert-error {
    background: rgba(237, 66, 69, 0.1);
    border-color: var(--error);
}

/* Tags/Badges */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.tag-new {
    background: var(--success);
    color: var(--bg-dark);
}

.tag-beta {
    background: var(--warning);
    color: var(--bg-dark);
}

.tag-premium {
    background: var(--accent-gold);
    color: var(--bg-dark);
}

/* Footer */
.footer {
    background: var(--gradient-dark);
    color: var(--text-light);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

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

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-deeper);
}

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

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

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

    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-darker);
        padding: var(--spacing-md);
    }

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

    .command-table {
        font-size: 0.85rem;
    }

    .command-table th,
    .command-table td {
        padding: var(--spacing-xs);
    }
}

/* Feature Details Box */
.feature-details-box {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.feature-details-box > h3 {
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.feature-subsection {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.feature-subsection:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.feature-subsection h4 {
    color: var(--text-darker);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Chart Types Table */
.chart-types-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
}

.chart-types-table th,
.chart-types-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.chart-types-table th {
    background: var(--primary-dark);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
}

.chart-types-table tr:hover {
    background: rgba(30, 115, 190, 0.05);
}

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

.chart-types-table code {
    background: var(--bg-dark);
    color: var(--accent-gold);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

/* Menu Options Grid */
.menu-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.menu-option-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
}

.menu-option-card h5 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.menu-option-card p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.menu-option-card code {
    background: var(--bg-light);
    color: var(--primary-deeper);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

/* Quick Buttons Demo */
.quick-buttons-demo {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.demo-button {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: default;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.demo-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Data Sources */
.data-sources {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.data-source-badge {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-deeper) 100%);
    color: var(--text-light);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.data-source-badge::before {
    content: "📡";
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Hero Stats */
.hero-stats {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.hero-stats strong {
    color: var(--accent-gold);
    font-size: 1.3rem;
}

/* Section h3 styling for Commands header */
section > h3 {
    color: var(--text-darker);
    font-size: 1.2rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--accent-gold);
}

/* Responsive adjustments for feature details */
@media (max-width: 768px) {
    .feature-details-box {
        padding: var(--spacing-md);
    }

    .menu-options-grid {
        grid-template-columns: 1fr;
    }

    .chart-types-table {
        font-size: 0.8rem;
    }

    .chart-types-table th,
    .chart-types-table td {
        padding: var(--spacing-xs);
    }

    .quick-buttons-demo {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header, .sidebar, .footer {
        display: none;
    }

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

    .content {
        box-shadow: none;
        border: none;
    }

    .feature-details-box {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
}
