/* ========================================
   HOSTIFY DOCUMENTATION - MIDNIGHT DOCS / DEV NOIR
   Professional, Trustworthy, Serious
   Inspired by: Cloudflare, Vercel, Stripe, GitBook Dark
   ======================================== */

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

/* ========================================
   COLOR PALETTE - REFINED
   ======================================== */

:root {
    /* Background - Gradient for Depth */
    --bg-midnight: linear-gradient(180deg, #0B0F14 0%, #0E1320 100%);
    --bg-sidebar: #0F1629;
    --bg-code: rgba(15, 23, 42, 0.75);
    --bg-tip: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(99,102,241,0.06));
    
    /* Borders */
    --border-sidebar: #1F2A44;
    --border-code: rgba(148,163,184,0.15);
    --border-tip: #38BDF8;
    
    /* Text Hierarchy */
    --text-heading: #F8FAFC;
    --text-body: #CBD5E1;
    --text-muted: #94A3B8;
    --text-link: #60A5FA;
    --text-code-inline: #FACC15;
    
    /* Sidebar Text */
    --sidebar-text: #C7D2FE;
    --sidebar-active-bg: rgba(99,102,241,0.12);
    --sidebar-active-text: #E0E7FF;
    
    /* Code Syntax */
    --code-keyword: #38BDF8;
    --code-string: #4ADE80;
    --code-comment: #64748B;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

#theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #60A5FA, #818CF8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.25);
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(96, 165, 250, 0.35);
}

#theme-toggle::before {
    content: '🌙 ';
    margin-right: 5px;
}

/* ========================================
   SIDEBAR - CLEAN & PROFESSIONAL
   ======================================== */

.wy-nav-side {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-sidebar) !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
}

/* Logo/Search Area - Subtle */
.wy-side-nav-search {
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-sidebar) !important;
    box-shadow: none !important;
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
    color: var(--text-heading) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    text-shadow: none !important;
    letter-spacing: 0.3px;
}

/* Search Input - Clean */
.wy-side-nav-search input[type="text"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-sidebar) !important;
    color: var(--sidebar-text) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
}

.wy-side-nav-search input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--text-link) !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1) !important;
}

/* Navigation Menu Items - Professional */
.wy-menu-vertical a {
    color: var(--sidebar-text) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    transition: all 0.2s ease !important;
    border-left: 2px solid transparent !important;
    padding: 0.6em 1.2em !important;
}

.wy-menu-vertical a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--sidebar-active-text) !important;
    border-left-color: var(--text-link) !important;
}

/* Active Menu Item - Subtle Highlight with Glow */
.wy-menu-vertical li.current > a {
    background: linear-gradient(90deg, rgba(56,189,248,0.15), rgba(99,102,241,0.08)) !important;
    color: var(--sidebar-active-text) !important;
    border-left: none !important;
    box-shadow: inset 2px 0 0 #38BDF8 !important;
    font-weight: 600 !important;
}

.wy-menu-vertical li.current a {
    border-right: none !important;
    color: var(--sidebar-text) !important;
}

/* ========================================
   UX ENHANCEMENTS
   ======================================== */

/* 1. Hero Subtext - Emotional Anchor */
.hero-subtext {
    color: #94A3B8 !important;
    font-size: 1.05rem !important;
    margin-top: 6px !important;
    margin-bottom: 2em !important;
    font-weight: 400 !important;
}

/* 2. Section Dividers - Visual Separation */
.rst-content .section {
    padding-top: 32px;
    margin-top: 48px;
    border-top: 1px solid rgba(148,163,184,0.12);
}

.rst-content .section:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* 3. Requirements Card - High Signal */
.requirements-card {
    background: rgba(15,23,42,0.6) !important;
    border: 1px solid rgba(148,163,184,0.15) !important;
    border-radius: 14px !important;
    padding: 20px 24px !important;
    margin: 1.5em 0 !important;
}

.requirements-card p {
    margin: 0.8em 0 !important;
    color: var(--text-body) !important;
    font-size: 0.95rem !important;
}

.requirements-card p:first-child {
    margin-top: 0 !important;
}

.requirements-card p:last-child {
    margin-bottom: 0 !important;
}

/* 4. Code Labels - Professional Touch */
.code-label {
    font-size: 0.75rem !important;
    color: #94A3B8 !important;
    margin-bottom: 6px !important;
    margin-top: 1.5em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
}

/* 5. Success Message - Brand Personality */
.success-message {
    background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(34,197,94,0.06)) !important;
    border-left: 3px solid #4ADE80 !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    margin: 2em 0 !important;
    color: #D1FAE5 !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
}

/* 6. Enhanced Section Spacing */
.rst-content h2 {
    letter-spacing: 0.4px !important;
    margin-bottom: 12px !important;
}

/* ========================================
   USER GUIDE ENHANCEMENTS
   ======================================== */

/* 1. Mode Badge - Visual Clarity */
.mode-badge {
    font-size: 0.7rem !important;
    margin-left: 8px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    background: rgba(56,189,248,0.15) !important;
    color: #7DD3FC !important;
    letter-spacing: 0.08em !important;
    font-weight: 600 !important;
    vertical-align: middle !important;
}

/* 2. Context Line - Code Explanation */
.context-line {
    color: #94A3B8 !important;
    font-size: 0.95rem !important;
    margin-bottom: 10px !important;
    margin-top: 1em !important;
    font-style: italic !important;
}

.context-line code {
    background: rgba(250, 204, 21, 0.1) !important;
    color: var(--text-code-inline) !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    font-style: normal !important;
}

/* 3. Code Wrapper - Soft Focus */
.rst-content .highlight {
    border: 1px solid rgba(148,163,184,0.12) !important;
    border-radius: 16px !important;
    background: radial-gradient(
        circle at top,
        rgba(56,189,248,0.06),
        rgba(15,23,42,0.85)
    ) !important;
}

/* 4. Info Box - When to Use */
.info-box {
    background: rgba(34,197,94,0.08) !important;
    border-left: 3px solid #22C55E !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    margin: 1.5em 0 !important;
}

.info-box strong {
    color: #86EFAC !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 0.5em !important;
}

.info-box ul {
    margin: 0 !important;
    padding-left: 1.5em !important;
}

.info-box li {
    color: #D1FAE5 !important;
    margin: 0.4em 0 !important;
}

/* 5. Features List - Benefit-Driven */
.features {
    list-style: none !important;
    padding-left: 0 !important;
}

.features li {
    margin-bottom: 8px !important;
    padding-left: 0 !important;
    color: var(--text-body) !important;
}

/* 6. Section Rhythm */
.rst-content .section {
    margin-top: 56px !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(148,163,184,0.1) !important;
}

/* Expanded Menu Levels */
.wy-menu-vertical li.toctree-l1.current > a {
    background: var(--sidebar-active-bg) !important;
}

.wy-menu-vertical li.toctree-l2 > a {
    color: var(--text-muted) !important;
    padding-left: 2.2em !important;
    font-size: 13px !important;
}

.wy-menu-vertical li.toctree-l2.current > a {
    background: rgba(99,102,241,0.08) !important;
    color: var(--sidebar-active-text) !important;
}

.wy-menu-vertical li.toctree-l3 > a {
    color: var(--text-muted) !important;
    padding-left: 3.2em !important;
    font-size: 13px !important;
}

/* Section Headers - Clean */
.wy-menu-vertical p.caption {
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    margin-top: 1.5em !important;
    padding-left: 1.2em !important;
    border-left: none !important;
    text-shadow: none !important;
}

/* ========================================
   MAIN CONTENT AREA - DEPTH & CLARITY
   ======================================== */

.wy-nav-content-wrap {
    background: var(--bg-midnight) !important;
}

.wy-nav-content {
    background: transparent !important;
    max-width: 720px !important;
    padding: 3em 2em !important;
    color: var(--text-body) !important;
}

/* Typography - Professional Hierarchy */
body,
.wy-nav-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.7 !important;
}

/* Headings - Clear Hierarchy */
.rst-content h1 {
    color: var(--text-heading) !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
    font-size: 2.5em !important;
    letter-spacing: 0.4px !important;
    margin-bottom: 0.5em !important;
}

.rst-content h2 {
    color: var(--text-heading) !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.8em !important;
    letter-spacing: 0.4px !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.8em !important;
}

.rst-content h3 {
    color: var(--text-heading) !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.4em !important;
    margin-top: 1.2em !important;
}

/* Body Text */
.rst-content p,
.rst-content li,
.rst-content td {
    color: var(--text-body) !important;
    line-height: 1.7 !important;
}

/* Links - Professional Blue */
.rst-content a {
    color: var(--text-link) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.rst-content a:hover {
    color: #93C5FD !important;
}

/* Code Blocks - Glass + Elevation */
.rst-content pre,
.rst-content code {
    background: var(--bg-code) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-code) !important;
    border-radius: 12px !important;
    color: var(--text-body) !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.rst-content .highlight {
    background: var(--bg-code) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-code) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.45) !important;
    padding: 16px 20px !important;
    margin: 1.5em 0 !important;
}

/* Inline Code - Yellow Highlight */
.rst-content code.literal {
    background: rgba(250, 204, 21, 0.1) !important;
    color: var(--text-code-inline) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(250, 204, 21, 0.2) !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
}

/* Syntax Highlighting */
.rst-content .highlight .k,
.rst-content .highlight .kd,
.rst-content .highlight .kn { color: var(--code-keyword) !important; }

.rst-content .highlight .s,
.rst-content .highlight .s1,
.rst-content .highlight .s2 { color: var(--code-string) !important; }

.rst-content .highlight .c,
.rst-content .highlight .c1,
.rst-content .highlight .cm { color: var(--code-comment) !important; }

/* Admonitions - Soft Info Panels */
.rst-content .admonition {
    background: var(--bg-tip) !important;
    border-left: 3px solid var(--border-tip) !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin: 1.5em 0 !important;
    box-shadow: none !important;
}

.rst-content .admonition-title {
    background: transparent !important;
    color: #E0F2FE !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    border-bottom: none !important;
    padding-bottom: 0.3em !important;
    margin-bottom: 0.5em !important;
    font-size: 0.95em !important;
}

.rst-content .admonition p {
    color: #E0F2FE !important;
}

/* Tables - Clean */
.rst-content table.docutils {
    border: 1px solid var(--border-code) !important;
    background: rgba(15, 23, 42, 0.5) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.rst-content table.docutils thead {
    background: rgba(96, 165, 250, 0.08) !important;
}

.rst-content table.docutils th {
    color: var(--text-heading) !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    border-bottom: 1px solid var(--border-code) !important;
    padding: 12px !important;
}

.rst-content table.docutils td {
    border-color: var(--border-code) !important;
    padding: 10px !important;
}

/* ========================================
   SECTIONS - SPACING & DEPTH
   ======================================== */

section {
    margin-bottom: 48px;
}

section:hover {
    transform: translateY(-1px);
    transition: transform 0.3s ease;
}

/* ========================================
   TOP NAVIGATION
   ======================================== */

.wy-nav-top {
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-sidebar) !important;
    box-shadow: none !important;
}

/* Breadcrumbs - Minimal */
.wy-breadcrumbs {
    background: transparent !important;
    padding: 1em 0 !important;
    border-bottom: 1px solid rgba(148,163,184,0.1) !important;
    margin-bottom: 2em !important;
}

.wy-breadcrumbs li a {
    color: var(--text-link) !important;
}

/* ========================================
   SCROLLBAR - SUBTLE
   ======================================== */

.wy-side-scroll::-webkit-scrollbar {
    width: 6px;
}

.wy-side-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.wy-side-scroll::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.3);
    border-radius: 3px;
}

.wy-side-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.5);
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.5);
}

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

footer {
    background: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border-sidebar) !important;
    color: var(--text-muted) !important;
}

.rst-versions {
    background: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border-sidebar) !important;
}

.rst-versions a {
    color: var(--text-body) !important;
}

.rst-versions .rst-current-version {
    background: rgba(96, 165, 250, 0.08) !important;
    color: var(--text-heading) !important;
}

/* ========================================
   SMOOTH TRANSITIONS - SUBTLE
   ======================================== */

* {
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}
