/*
    MeshOpt Styles
    Consolidated from inline styles and separate HTML files.
*/

/* Visually Hidden - For screen readers only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link - visible on focus for keyboard navigation */
a.visually-hidden:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 12px 20px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg: #111;
    --panel: #1f2937;
    --panel-dark: #1a1a1a; /* Sidebar background */
    --text: #f3f4f6;
    --text-muted: #b8bcc4; /* Improved contrast: was #9ca3af, now 5.2:1 on dark bg */
    --text-muted-dark: #8a8f98; /* For use on lighter backgrounds */
    --border: #374151;
    --border-dark: #333;
    --success: #10b981;
    --success-bg: #064e3b;
    --error: #ef4444;
    --overlay-bg: rgba(0, 0, 0, 0.4);
    --input-bg: #222;
    --input-border: #444;
    /* Focus ring color */
    --focus-ring: #60a5fa;
    --focus-ring-offset: #111;
}

/* Global Reset & Typography */
body {
    margin: 0;
    padding: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

body.app-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-left: 320px;
    box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    margin-top: 0;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

a:hover {
    text-decoration: underline;
}

/* Layout Utilities */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container-wide {
    max-width: 900px;
}

/* Flex Utilities */
.d-flex {
    display: flex;
}
.flex-column {
    flex-direction: column;
}
.justify-between {
    justify-content: space-between;
}
.align-center {
    align-items: center;
}
.gap-10 {
    gap: 10px;
}
.gap-20 {
    gap: 20px;
}
.flex-1 {
    flex: 1;
}

/* Text Utilities */
.text-center {
    text-align: center;
}
.text-muted {
    color: var(--text-muted);
}
.text-success {
    color: var(--success);
}
.text-error {
    color: var(--error);
}
.text-primary {
    color: var(--primary);
}
.font-bold {
    font-weight: bold;
}
.font-mono {
    font-family: monospace;
}
.text-small {
    font-size: 0.85rem;
}
.text-xs {
    font-size: 0.75rem;
}

/* Spacing Utilities */
.m-0 {
    margin: 0;
}
.mt-5 {
    margin-top: 5px;
}
.mt-10 {
    margin-top: 10px;
}
.mb-5 {
    margin-bottom: 5px;
}
.mb-10 {
    margin-bottom: 10px;
}
.mb-15 {
    margin-bottom: 15px;
}
.mb-20 {
    margin-bottom: 20px;
}
.mb-40 {
    margin-bottom: 40px;
}
.p-20 {
    padding: 20px;
}

/* Header */
header.main-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
button,
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

button:hover,
.btn:hover {
    opacity: 0.9;
    background-color: var(--primary-hover);
    text-decoration: none;
}

button:disabled {
    background: #444;
    color: #a1a1a1; /* Improved contrast for disabled state: 4.5:1 */
    cursor: not-allowed;
}

button.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
    width: auto;
}

button.btn-clear {
    background: none;
    color: var(--error);
    font-size: 0.75rem;
    padding: 8px; /* Increased touch target */
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.btn-clear:hover {
    text-decoration: underline;
}

button.btn-clear:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

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

.btn-secondary:hover {
    background: var(--panel);
    color: var(--primary);
    text-decoration: none;
    opacity: 1;
}

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-color: var(--primary);
}

/* Focus styles for buttons and interactive elements */
button:focus,
.btn:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Focus visible - only show focus ring for keyboard navigation */
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Custom File Inputs workaround (if needed, usually hidden) */
input[type="file"] {
    font-size: 0.8rem;
    color: #d1d5db; /* Improved contrast */
    width: 100%;
}

input[type="file"]:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Back Link (Used in documentation pages) */
a.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
}

a.back-link:hover {
    background: var(--panel);
}

/* Application Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 320px;
    background: var(--panel-dark);
    padding: 15px 20px;
    border-right: 1px solid var(--border-dark);
    box-sizing: border-box;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.sidebar-section {
    padding-top: 8px;
}

.sidebar-section:not(:first-child) {
    border-top: 1px solid var(--border-dark);
}

/* Dropzone */
.dropzone {
    border: 2px dashed #444;
    border-radius: 8px;
    padding: 15px 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone .file-info {
    color: var(--success);
    font-size: 0.85rem;
    word-break: break-word;
}

.dropzone .file-info .file-size {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mini dropzones for MTL and textures */
.dropzone-mini {
    border: 1px dashed #444;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone-mini .drop-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dropzone-mini .file-info {
    color: var(--success);
    font-size: 0.8rem;
    word-break: break-word;
}

.dropzone-mini .file-info .file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dropzone-mini:hover {
    border-color: var(--primary);
    background: #333;
}

.dropzone-mini:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-color: var(--primary);
}

.dropzone-mini.dragging {
    border-color: var(--success);
    background: var(--success-bg);
}

.dropzone:hover {
    border-color: var(--primary);
    background: #333;
}

.dropzone:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-color: var(--primary);
}

.dropzone:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-color: var(--primary);
}

.dropzone.dragging {
    border-color: var(--success);
    background: var(--success-bg);
}

/* Sliders */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #c4c4c4; /* Improved contrast: was #aaa, now 7.5:1 on dark bg */
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

input[type="range"]:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

/* 3D Viewer */
.viewer-container {
    flex: 1;
    position: relative;
    background: #000;
}

model-viewer {
    width: 100%;
    height: 100%;
}

.loading-overlay {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--overlay-bg);
    padding: 20px;
    border-radius: 8px;
    z-index: 10;
    text-align: center;
}

/* Collapsible "Nightmare" Banner */
.nightmare-banner {
    background: #222;
    border-bottom: 1px solid #333;
    color: #d4d4d4; /* Improved contrast: was #ccc, now 9.4:1 */
}

.nightmare-banner details {
    padding: 15px;
    max-width: 900px;
    margin: 0 auto;
    cursor: pointer;
}

.nightmare-banner summary {
    font-weight: 600;
    color: #fff;
    padding: 4px;
    border-radius: 4px;
}

.nightmare-banner summary:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nightmare-banner summary:focus:not(:focus-visible) {
    outline: none;
}

.nightmare-banner summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nightmare-content {
    margin-top: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.quote-box {
    font-style: italic;
    margin-top: 15px;
    color: #d4d4d4; /* Improved contrast */
    border-left: 3px solid #444;
    padding-left: 10px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--overlay-bg);
    justify-content: center;
    align-items: center;
}

.modal-window {
    background-color: var(--panel);
    padding: 20px;
    border: 1px solid var(--border);
    width: 80%;
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    color: #fff;
}

.modal-window-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    /* Accessibility: minimum touch target size */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text);
    border-radius: 4px;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    border-top: 1px solid #444;
    margin-top: 15px;
    padding-top: 12px;
    font-size: 0.8rem;
    color: #a3a3a3; /* Improved contrast: was #888, now 4.6:1 */
    line-height: 1.5;
}

/* Tables */
.table-container {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.table-container th {
    position: sticky;
    top: 0;
    background-color: var(--panel);
    z-index: 10;
    text-align: left;
    border-bottom: 2px solid #444;
    padding: 10px;
}

.table-container th:first-child {
    width: 140px;
}

.table-container th:last-child {
    width: 80px;
    text-align: right;
}

.table-container td {
    padding: 10px;
    border-bottom: 1px solid #333;
    word-break: break-word;
}

.table-container td:last-child {
    text-align: right;
}

/* Documentation / Content Pages Specifics */
section.content-section {
    background: var(--panel);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

section.content-section h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

section.content-section h3 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

section.content-section ul,
section.content-section ol {
    color: var(--text-muted);
    padding-left: 20px;
    margin-bottom: 16px;
}

section.content-section li {
    margin-bottom: 8px;
}

/* Table of Contents */
.toc-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.toc-box h3 {
    margin-top: 0;
    color: white;
}

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

.toc-box a {
    color: var(--primary);
    text-decoration: none;
}

.summary-box {
    background: var(--panel);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.summary-box h2 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

/* Highlight Box */
.highlight-box {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 24px 0;
}

.highlight-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
}

.highlight-box p {
    margin: 0;
    color: var(--text);
}

/* Contact Box */
.contact-highlight {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.contact-highlight a {
    color: var(--success);
    font-weight: bold;
    text-decoration: none;
}

/* Code Snippets */
code {
    background: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #e5e7eb;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--panel) 0%, var(--bg) 100%);
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    margin-top: 40px;
}

.newsletter-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: var(--text);
}

.newsletter-content p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input-group {
    display: flex;
    gap: 8px;
}

.newsletter-input-group input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
}

.newsletter-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.newsletter-input-group button {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.newsletter-input-group button:hover {
    background: var(--primary-hover);
}

.newsletter-input-group button:active {
    transform: scale(0.98);
}

.newsletter-input-group button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.newsletter-status {
    font-size: 0.85rem;
    min-height: 20px;
}

.newsletter-status.success {
    color: var(--success);
}

.newsletter-status.error {
    color: var(--error);
}

@media (max-width: 480px) {
    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-input-group button {
        width: 100%;
    }
}

/* Footer */
footer.main-footer {
    padding: 15px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--bg);
}

footer.main-footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
}

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

footer.main-footer p {
    margin: 0;
}

/* Sticky footer variant for app layout */
footer.main-footer.sticky {
    z-index: 100;
    margin-top: 0;
    border-top: 1px solid var(--border-dark);
}

/* Contact Page Styles */
.intro {
    background: var(--panel);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.intro p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
}

.intro p:last-child {
    margin-bottom: 0;
}

.form-section {
    background: var(--panel);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 24px;
}

.api-key-row {
    display: flex;
    align-items: baseline;
}

.api-key-row label {
    flex: 0 0 auto;
    margin-bottom: 0;
    margin-right: 0.75rem;
}

.api-key-row input {
    flex: 0 1 200px; /* Do not grow, allow shrinking, base width 200px */
}

.api-key-row small {
    flex: 1 1 auto;
    margin-left: 0.75rem;
}

label .required {
    color: var(--error);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.button-group button {
    flex: 1;
}

button[type="reset"] {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

button[type="reset"]:hover {
    background: rgba(255, 255, 255, 0.05);
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: none;
}

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

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

.alert.show {
    display: block;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.quick-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.quick-links h3 {
    color: var(--text);
    margin-bottom: 16px;
    font-size: 1rem;
}

.quick-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 12px;
}

.quick-links a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column;
    }
}

/* Help Page Styles */
.alert-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error);
    padding: 16px;
    border-radius: 4px;
    margin: 20px 0;
}

.alert-box h4 {
    margin: 0 0 8px 0;
    color: var(--error);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.mode-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Border Utilities */
.border-bottom {
    border-bottom: 1px solid var(--border);
}

.border-top {
    border-top: 1px solid var(--border);
}

.pb-20 {
    padding-bottom: 20px;
}

/* Display & Width */
.d-block {
    display: block;
}

.d-none {
    display: none;
}

.w-100 {
    width: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

/* Positioning */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.pos-top-right {
    top: 0;
    right: -8px;
}

/* Text */
.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-nowrap {
    white-space: nowrap;
}

.text-darker {
    color: #888; /* Improved contrast: was #555, now 4.5:1 on dark bg */
}

.min-w-60 {
    min-width: 60px;
}

/* Specific component styles */
.btn-dark {
    background: #333;
    border: 1px solid #555;
    color: white;
}

.btn-dark:hover {
    background: #444;
}

.btn-dark:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Code Block - API Code Modal */
.code-block {
    background-color: var(--input-bg);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.code-block code {
    background: transparent;
    padding: 0;
    color: #e5e7eb;
}

.code-block-small {
    font-size: 0.8rem;
    padding: 10px;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Sticky Header */
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 20;
    margin: -20px -20px 20px -20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
}

.code-block-header h3 {
    margin: 0;
}

/* Copy button success state */
.btn-copy-success {
    background: var(--success) !important;
    color: white !important;
}

/* API Documentation Tables */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.85rem;
}

.api-table th,
.api-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-dark);
}

.api-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text);
}

.api-table td {
    color: var(--text-muted);
}

.api-table code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Tabs Component */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    padding-top: 5px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-dark);
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.tab-btn.active {
    color: #ffffff;
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* API Key Warning Banner */
.api-key-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.875rem;
}

.api-key-warning-icon {
    font-size: 1.25rem;
    color: #ef4444;
    flex-shrink: 0;
}

.api-key-warning strong {
    color: #ef4444;
}

/* Help Search Feature */
.help-search-container {
    position: relative;
}

.help-search-below-header {
    margin-bottom: 20px;
}

.help-search-container input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.875rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text);
    box-sizing: border-box;
}

.help-search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.help-search-container input::placeholder {
    color: var(--text-muted);
}

.help-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

.help-search-result {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

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

.help-search-result:hover,
.help-search-result:focus {
    background: rgba(59, 130, 246, 0.15);
    outline: none;
}

.help-search-result-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.help-search-result-location {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.help-search-result-context {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.help-search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.help-search-result mark {
    background: rgba(59, 130, 246, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Content Pages (Blog, Tools)
   Industrial Terminal / Data HUD Aesthetic
   ========================================================================== */

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

/* Content page specific variables */
.content-page {
    --cp-bg: #080b10;
    --cp-bg-grid: #0d1117;
    --cp-panel: rgba(13, 17, 23, 0.8);
    --cp-border: #1e2a3a;
    --cp-border-glow: #00d4ff;
    --cp-accent: #00d4ff;
    --cp-accent-dim: rgba(0, 212, 255, 0.15);
    --cp-accent-secondary: #b4f84a;
    --cp-text: #e6edf3;
    --cp-text-dim: #7d8590;
    --cp-success: #3fb950;
    --cp-warning: #d29922;
    --cp-danger: #f85149;
    --cp-font-display: 'JetBrains Mono', monospace;
    --cp-font-body: 'Outfit', sans-serif;
}

/* Keyframe animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.2); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Base content page styles */
body.content-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cp-bg);
    font-family: var(--cp-font-body);
    color: var(--cp-text);
    position: relative;
    overflow-x: hidden;
}

/* Subtle grid background */
body.content-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Scanline effect overlay */
body.content-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(180deg,
        transparent,
        rgba(0, 212, 255, 0.1),
        transparent
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

/* Header */
.content-page .site-header {
    position: relative;
    z-index: 100;
    padding: 20px 40px;
    border-bottom: 1px solid var(--cp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, var(--cp-bg) 0%, transparent 100%);
    backdrop-filter: blur(10px);
}

.content-page .site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--cp-accent) 20%,
        var(--cp-accent) 80%,
        transparent
    );
    opacity: 0.5;
}

.content-page .site-header .logo {
    font-family: var(--cp-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cp-text);
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
}

.content-page .site-header .logo::before {
    content: '//';
    color: var(--cp-accent);
    margin-right: 4px;
    opacity: 0.7;
}

.content-page .site-header .logo:hover {
    color: var(--cp-accent);
    text-decoration: none;
}

.content-page .site-header nav {
    display: flex;
    gap: 32px;
}

.content-page .site-header nav a {
    font-family: var(--cp-font-display);
    color: var(--cp-text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}

.content-page .site-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cp-accent);
    transition: width 0.3s ease;
}

.content-page .site-header nav a:hover {
    color: var(--cp-accent);
}

.content-page .site-header nav a:hover::after {
    width: 100%;
}

/* Main content area */
.content-page main {
    flex: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.content-page main.wide {
    max-width: 1100px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: var(--cp-font-display);
    font-size: 0.75rem;
    color: var(--cp-text-dim);
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 0.5s ease;
}

.breadcrumb a {
    color: var(--cp-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb .separator {
    color: var(--cp-border);
    font-weight: 300;
}

.breadcrumb .current {
    color: var(--cp-accent);
}

/* Article Header with HUD corners */
.article-header {
    margin-bottom: 48px;
    position: relative;
    padding: 32px;
    background: var(--cp-panel);
    border: 1px solid var(--cp-border);
    animation: fadeInUp 0.6s ease;
}

/* HUD corner brackets */
.article-header::before,
.article-header::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--cp-accent);
    border-style: solid;
}

.article-header::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.article-header::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.article-header h1 {
    font-family: var(--cp-font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--cp-text);
    letter-spacing: -1px;
}

.article-header > p {
    color: var(--cp-text-dim);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-family: var(--cp-font-display);
    font-size: 0.75rem;
    color: var(--cp-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-meta .category {
    background: var(--cp-accent-dim);
    color: var(--cp-accent);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Article Content - Prose Typography */
.article-content {
    font-family: var(--cp-font-body);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--cp-text);
    animation: fadeInUp 0.7s ease;
}

.article-content h2 {
    font-family: var(--cp-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 64px;
    margin-bottom: 20px;
    color: var(--cp-text);
    letter-spacing: -0.5px;
    padding-left: 16px;
    border-left: 3px solid var(--cp-accent);
}

.article-content h3 {
    font-family: var(--cp-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--cp-accent);
    letter-spacing: 0;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content strong {
    color: var(--cp-text);
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 0;
    list-style: none;
}

.article-content li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.article-content ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--cp-accent);
    font-family: var(--cp-font-display);
    font-weight: 600;
}

.article-content ol {
    counter-reset: item;
}

.article-content ol li::before {
    content: counter(item, decimal-leading-zero);
    counter-increment: item;
    position: absolute;
    left: 0;
    color: var(--cp-accent);
    font-family: var(--cp-font-display);
    font-size: 0.85rem;
    font-weight: 600;
}

.article-content pre {
    background: #000;
    border: 1px solid var(--cp-border);
    padding: 24px;
    overflow-x: auto;
    margin: 32px 0;
    position: relative;
}

.article-content pre::before {
    content: 'CODE';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--cp-accent-dim);
    color: var(--cp-accent);
    font-family: var(--cp-font-display);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    letter-spacing: 1px;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    font-family: var(--cp-font-display);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cp-text);
}

.article-content blockquote {
    border-left: 3px solid var(--cp-accent-secondary);
    background: rgba(180, 248, 74, 0.05);
    padding: 20px 24px;
    margin: 32px 0;
    font-style: normal;
    color: var(--cp-text);
}

.article-content a {
    color: var(--cp-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--cp-accent);
}

/* Tool Container with HUD styling */
.tool-container {
    background: var(--cp-panel);
    border: 1px solid var(--cp-border);
    padding: 40px;
    margin: 32px 0;
    position: relative;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.tool-container::before,
.tool-container::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--cp-accent);
    border-style: solid;
}

.tool-container::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.tool-container::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.tool-container h2 {
    font-family: var(--cp-font-display);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.tool-container .tool-description {
    color: var(--cp-text-dim);
    margin-bottom: 32px;
}

/* Enhanced Dropzone */
.content-page .dropzone {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.02) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 2px dashed var(--cp-border);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.content-page .dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 212, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.content-page .dropzone:hover::before {
    left: 100%;
}

.content-page .dropzone:hover {
    border-color: var(--cp-accent);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.content-page .dropzone.dragging {
    border-color: var(--cp-accent-secondary);
    background: rgba(180, 248, 74, 0.05);
    box-shadow: 0 0 40px rgba(180, 248, 74, 0.1);
}

.content-page .dropzone .file-info {
    font-family: var(--cp-font-display);
    color: var(--cp-accent-secondary);
}

/* Tool Output with data visualization feel */
.tool-output {
    background: #000;
    border: 1px solid var(--cp-border);
    padding: 24px;
    margin-top: 32px;
    position: relative;
}

.tool-output::before {
    content: 'ANALYSIS';
    position: absolute;
    top: -10px;
    left: 16px;
    background: #000;
    color: var(--cp-accent);
    font-family: var(--cp-font-display);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    letter-spacing: 2px;
}

.tool-output h3 {
    font-family: var(--cp-font-display);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--cp-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tool-output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.tool-output-item {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid var(--cp-border);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.tool-output-item:hover {
    border-color: var(--cp-accent);
    background: rgba(0, 212, 255, 0.06);
}

.tool-output-item .label {
    font-family: var(--cp-font-display);
    font-size: 0.65rem;
    color: var(--cp-text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.tool-output-item .value {
    font-family: var(--cp-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cp-text);
}

.tool-output-item .value.success {
    color: var(--cp-success);
}

.tool-output-item .value.warning {
    color: var(--cp-warning);
}

/* CTA Box with glowing border */
.cta-box {
    background: var(--cp-panel);
    border: 2px solid var(--cp-accent);
    padding: 48px 40px;
    margin: 56px 0;
    text-align: center;
    position: relative;
    animation: glowPulse 4s ease infinite, fadeInUp 0.6s ease 0.2s backwards;
}

.cta-box h3 {
    font-family: var(--cp-font-display);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--cp-accent);
}

.cta-box p {
    color: var(--cp-text-dim);
    margin-bottom: 28px;
    font-size: 1.05rem;
}

.cta-box .btn {
    display: inline-block;
    background: var(--cp-accent);
    color: #000;
    padding: 14px 36px;
    font-family: var(--cp-font-display);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-box .btn:hover {
    background: var(--cp-accent-secondary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

/* Blog Search - Industrial HUD styling */
.blog-search-container {
    position: relative;
    max-width: 480px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.55s ease;
}

.blog-search-container input {
    width: 100%;
    min-height: 44px;
    padding: 12px 18px;
    font-family: var(--cp-font-display);
    font-size: 0.9rem;
    background: #000;
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    box-sizing: border-box;
    letter-spacing: 0.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search-container input:focus {
    outline: 2px solid var(--cp-accent);
    outline-offset: -2px;
    border-color: var(--cp-accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25);
}

.blog-search-container input::placeholder {
    color: var(--cp-text-dim);
    font-family: var(--cp-font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.blog-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--cp-bg);
    border: 1px solid var(--cp-border);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

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

.blog-search-result {
    display: block;
    min-height: 44px;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--cp-border);
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

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

.blog-search-result:hover {
    background: rgba(0, 212, 255, 0.1);
}

.blog-search-result:focus,
.blog-search-result.selected {
    background: rgba(0, 212, 255, 0.1);
    outline: 2px solid var(--cp-accent);
    outline-offset: -2px;
}

.blog-search-result-title {
    font-family: var(--cp-font-display);
    font-weight: 600;
    color: var(--cp-text);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.blog-search-result-location {
    font-family: var(--cp-font-display);
    font-size: 0.7rem;
    color: var(--cp-accent);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-search-result-context {
    font-family: var(--cp-font-body);
    font-size: 0.85rem;
    color: var(--cp-text-dim);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--cp-text-dim);
    font-family: var(--cp-font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-search-result mark {
    background: rgba(0, 212, 255, 0.25);
    color: var(--cp-accent);
    padding: 0 2px;
    border-radius: 2px;
}

/* Cards Grid with HUD styling */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.card {
    background: var(--cp-panel);
    border: 1px solid var(--cp-border);
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.5s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--cp-accent);
    transition: height 0.3s ease;
}

.card:hover {
    border-color: var(--cp-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.1);
}

.card:hover::before {
    height: 100%;
}

.card h3 {
    font-family: var(--cp-font-display);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.card h3 a {
    color: var(--cp-text);
    text-decoration: none;
    transition: color 0.2s;
}

.card h3 a:hover {
    color: var(--cp-accent);
}

.card > p {
    color: var(--cp-text-dim);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card .card-meta {
    font-family: var(--cp-font-display);
    font-size: 0.7rem;
    color: var(--cp-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content section with terminal feel */
.content-page .content-section {
    background: var(--cp-panel);
    border: 1px solid var(--cp-border);
    padding: 32px;
    margin: 40px 0;
    position: relative;
}

.content-page .content-section h2 {
    font-family: var(--cp-font-display);
    margin-top: 0;
    border-bottom: none;
    padding-left: 0;
    border-left: none;
}

.content-page .content-section h2::before {
    content: '## ';
    color: var(--cp-accent);
}

/* Footer styling */
.content-page footer.main-footer {
    margin-top: auto;
    padding: 24px 40px;
    border-top: 1px solid var(--cp-border);
    background: var(--cp-bg);
    position: relative;
    z-index: 10;
    font-family: var(--cp-font-display);
    font-size: 0.8rem;
}

.content-page footer.main-footer p {
    color: var(--cp-text-dim);
}

.content-page footer.main-footer a {
    color: var(--cp-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.content-page footer.main-footer a:hover {
    color: var(--cp-accent);
}

/* API table styling */
.content-page .api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-family: var(--cp-font-display);
    font-size: 0.85rem;
}

.content-page .api-table th,
.content-page .api-table td {
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--cp-border);
}

.content-page .api-table th {
    background: rgba(0, 212, 255, 0.05);
    font-weight: 600;
    color: var(--cp-accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.content-page .api-table td {
    color: var(--cp-text);
}

.content-page .api-table tr:hover td {
    background: rgba(0, 212, 255, 0.02);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .content-page .site-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .content-page .site-header nav {
        gap: 20px;
    }

    .content-page main {
        padding: 40px 16px;
    }

    .article-header {
        padding: 24px;
    }

    .article-header h1 {
        font-size: 1.6rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
        margin-top: 48px;
    }

    .tool-container {
        padding: 24px;
    }

    .tool-output-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-box {
        padding: 32px 24px;
    }

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

    .breadcrumb {
        flex-wrap: wrap;
    }
}
