/* Professional Documentation CSS */
:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --text-color: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --border-light: #f3f4f6;
    --bg-code: #f8fafc;
    --bg-highlight: #eff6ff;
    --bg-warning: #fef3c7;
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 6px;
    --radius-lg: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Professional Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.25;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

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

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    text-align: justify;
    hyphens: auto;
}

/* Professional Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Enterprise Code Styling */
pre {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-subtle);
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

pre::before {
    content: attr(class);
    position: absolute;
    top: 0;
    right: 0;
    background: var(--border-light);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0 var(--radius-lg) 0 var(--radius);
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

code {
    background: var(--bg-code);
    color: var(--text-color);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-color);
    font-weight: 400;
}

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

li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

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

/* Professional Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin: 2rem 0;
    border: 1px solid var(--border-light);
    display: block;
}

/* Enterprise Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9rem;
    box-shadow: var(--shadow-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

th {
    background: var(--bg-highlight);
    color: var(--primary-color);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--primary-color);
}

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

tbody tr:hover {
    background: #fafafa;
}

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

/* Professional Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-highlight);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
}

blockquote > *:first-child {
    margin-top: 0;
}

blockquote > *:last-child {
    margin-bottom: 0;
}

/* Professional Horizontal Rules */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 3rem 0;
}

/* Professional Warning/Info Boxes */
.info, .warning, .note {
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    background: var(--bg-highlight);
}

.info {
    border-left-color: var(--primary-color);
    background: var(--bg-highlight);
}

.warning {
    border-left-color: #f59e0b;
    background: var(--bg-warning);
}

.note {
    border-left-color: #10b981;
    background: #f0fdf4;
}

/* Print Optimization */
@media print {
    body {
        max-width: none;
        padding: 1rem;
        font-size: 12px;
        line-height: 1.4;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    pre {
        font-size: 10px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    img {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    table {
        box-shadow: none;
    }
    
    a {
        color: var(--text-color);
        text-decoration: underline;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem;
        font-size: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    pre {
        padding: 1rem;
        font-size: 13px;
        margin: 1rem 0;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f9fafb;
        --text-secondary: #e5e7eb;
        --text-muted: #9ca3af;
        --border-color: #374151;
        --border-light: #4b5563;
        --bg-code: #1f2937;
        --bg-highlight: #1e3a8a;
    }
    
    body {
        background: #111827;
    }
    
    pre {
        background: var(--bg-code);
    }
    
    th {
        background: var(--bg-highlight);
    }
    
    tbody tr:hover {
        background: #1f2937;
    }
}