/* VB6Parse GitHub Pages Stylesheet */

:root {
    --primary-color: #0066cc;
    --secondary-color: #004999;
    --accent-color: #ff6b35;
    --background-color: #ffffff;
    --text-color: #333333;
    --code-background: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #3399ff;
    --secondary-color: #1a73e8;
    --accent-color: #ff8c5a;
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --code-background: #2d2d2d;
    --border-color: #404040;
    --success-color: #4caf50;
    --warning-color: #ffc107;
}

[data-theme="dark"] header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

[data-theme="dark"] nav {
    background-color: #0d47a1;
}

[data-theme="dark"] footer {
    background-color: #0d47a1;
}

[data-theme="dark"] .docs-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 100%);
}

[data-theme="dark"] .docs-header h1 a:visited {
    color: white;
}

[data-theme="dark"] .docs-nav {
    background-color: #0d47a1;
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .doc-link,
[data-theme="dark"] .stat-card {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .layer-card {
    background: #1a73e8;
}

[data-theme="dark"] tbody tr:nth-child(even) {
    background-color: #2d2d2d;
}

[data-theme="dark"] .info-box {
    background-color: #1a2b3d;
    border-color: #3399ff;
}

[data-theme="dark"] .warning-box {
    background-color: #3d3417;
    border-color: #ffc107;
}

[data-theme="dark"] .algorithm-box {
    background-color: #1a2e1a;
    border-color: #4caf50;
}

/* Improve link readability in dark mode */
[data-theme="dark"] a {
    color: #66b3ff;
}

[data-theme="dark"] a:visited {
    color: #b39ddb;
}

[data-theme="dark"] a:hover {
    color: #99ccff;
}

/* Fix topics-covered sections in dark mode */
[data-theme="dark"] .doc-link div {
    background: #2d3748 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .doc-link ul {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .doc-link li {
    color: #b0b0b0 !important;
}

/* Fix community button text in dark mode */
[data-theme="dark"] .community-btn {
    color: white !important;
}

[data-theme="dark"] .community-btn:hover {
    color: white !important;
}

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

html {
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

main {
    flex: 1;
    width: 100%;
}

main.container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header .tagline {
    font-size: 1.3rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badges img {
    height: 20px;
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Theme Toggle Button in Nav */
nav .theme-toggle {
    position: absolute;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

nav .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

nav .theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    line-height: 1;
    display: inline-block;
}

/* Main Content */
section {
    margin-bottom: 80px;
    width: 100%;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    width: 100%;
}

/* Library category pages - ensure proper grid layout */
#items-list .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.feature-card {
    background: var(--code-background);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Code Blocks */
pre {
    background-color: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}

/* Override Highlight.js background to match our theme */
pre code.hljs {
    background-color: var(--code-background);
    padding: 0;
}

code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9rem;
}

p code, li code, td code {
    background-color: var(--code-background);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

/* Example Cards */
.example-card {
    margin-bottom: 30px;
}

.example-card h3 {
    margin-top: 30px;
}

/* Architecture */
.architecture-diagram {
    background-color: var(--code-background);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    margin: 30px 0;
    overflow-x: auto;
}

.architecture-diagram pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
}

.pipeline-layer {
    margin-bottom: 0;
    padding-bottom: 20px;
}

.pipeline-layer:last-child {
    padding-bottom: 0;
}

.layer-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.pipeline-components {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pipeline-box {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--secondary-color);
    border-radius: 6px;
    padding: 15px 20px;
    min-width: 120px;
    text-align: center;
    font-weight: 600;
}

.pipeline-box small {
    display: block;
    margin-top: 5px;
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.pipeline-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.vertical-arrow {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    line-height: 1;
}

[data-theme="dark"] .pipeline-box {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .pipeline-box small {
    color: rgba(255, 255, 255, 0.9);
}

/* Architecture Layer Grid */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.layer-card {
    background: var(--code-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.layer-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.layer-card h4 {
    background: var(--primary-color);
    color: white;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
}

.layer-card > p,
.layer-card > p:last-child {
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.layer-card > p:first-of-type {
    margin-top: 1.5rem;
}

.layer-card > p:last-child {
    margin-bottom: 1.5rem;
}

.layer-card p strong {
    color: var(--secondary-color);
}

.layer-card code {
    font-size: 0.85rem;
}

[data-theme="dark"] .layer-card {
    background: #2d2d2d;
}

[data-theme="dark"] .layer-card p strong {
    color: #5eb3ff;
}

.tip-box {
    background: #e7f3ff;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
}

[data-theme="dark"] .tip-box {
    background: #1a2b3d;
    border-left-color: #3399ff;
}

.quick-start-cta {
    background: #f0f7ff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.quick-start-cta h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.quick-start-cta p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.quick-start-cta a {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quick-start-cta a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

[data-theme="dark"] .quick-start-cta {
    background: #2a3f5f;
    border-left-color: #5eb3ff;
}

[data-theme="dark"] .quick-start-cta p {
    color: var(--text-color);
}

/* Getting Started Page Styles */
.step-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .step-card {
    background: #252525;
    border-color: var(--border-color);
}

.step-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
}

.step-card h3 {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
}

/* Code block labels */
pre[data-lang] {
    margin-top: 2rem;
    z-index: 1;
    overflow: visible;
}

pre[data-lang]:not([data-file])::before {
    content: attr(data-lang);
    position: absolute;
    top: -1.5rem;
    left: 0;
    z-index: 999;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-transform: uppercase;
    pointer-events: none;
}

pre[data-file]::before {
    content: attr(data-file) " (" attr(data-lang) ")";
    position: absolute;
    top: -1.5rem;
    left: 0;
    z-index: 999;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    pointer-events: none;
}

.output-box {
    background: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

[data-theme="dark"] .warning-box {
    background: #3d3417;
    border-left-color: #ffc107;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.use-case-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.use-case-card h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

th, td {
    padding: 15px;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: var(--code-background);
}

/* Documentation Links */
.doc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* API Documentation section - 2x2 grid */
#api-doc-links {
    grid-template-columns: repeat(2, 1fr);
}

.doc-link {
    display: flex;
    flex-direction: column;
    background: var(--code-background);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.doc-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.doc-link h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Add spacing after list items */
.doc-link ul {
    margin-bottom: 20px;
}

/* Topics covered sections - anchor to bottom */
.doc-link > div:last-child {
    margin-top: auto !important;
    padding: 10px !important;
    border-radius: 5px !important;
    font-size: 0.9rem !important;
    height: 115px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Light mode topics covered */
.doc-link > div:last-child {
    background: #e6f2ff;
    color: #333;
}

/* Dark mode topics covered */
[data-theme="dark"] .doc-link > div:last-child {
    background: #1e3a5f !important;
    color: #e0e0e0 !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.testing-info {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
}

/* Community Section */
.community-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.community-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.community-btn:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer p {
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    header .tagline {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    nav .container {
        gap: 15px;
    }
    
    .feature-grid,
    .stats-grid,
    .doc-links {
        grid-template-columns: 1fr;
    }
    
    .architecture-diagram pre {
        font-size: 0.7rem;
    }
    
    .pipeline-components {
        flex-direction: column;
        gap: 10px;
    }
    
    .pipeline-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
    
    .vertical-arrow {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    header .tagline {
        font-size: 1rem;
    }
}
