:root {
    --bg-color: #ffffff;
    --text-color: #202122;
    --link-color: #3366cc;
    --link-visited: #795cb2;
    --border-color: #a2a9b1;
    --bg-secondary: #f8f9fa;
    --font-family: sans-serif;
    --font-heading: 'Linux Libertine', 'Georgia', 'Times', serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
}

h1 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.8rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
    color: #000;
}

h2 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2rem;
}

h3 {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

p,
li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--link-visited);
}

.subtitle {
    font-size: 0.85rem;
    color: #54595d;
    margin-bottom: 1rem;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #fff;
}

.home-container {
    text-align: center;
    padding-top: 4rem;
}



.toc {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: inline-block;
    padding: 10px;
    margin: 1rem 0;
    min-width: 200px;
}

.toc h2 {
    border: none;
    font-size: 1rem;
    font-family: sans-serif;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.toc ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0.5rem;
    text-align: left;
}

.toc li {
    margin-bottom: 0.25rem;
}

code,
pre {
    font-family: monospace;
    background-color: #f8f9fa;
    border: 1px solid #eaecf0;
    padding: 1px 4px;
    border-radius: 2px;
}

pre {
    display: block;
    padding: 1rem;
    white-space: pre-wrap;
}

footer {
    margin-top: 3rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.75rem;
    color: #54595d;
}

.report-section {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.report-section a {
    color: var(--link-color);
    margin: 0 0.25rem;
}

.report-section a:hover {
    text-decoration: underline;
}

.report-section .separator {
    color: #a2a9b1;
    margin: 0 0.25rem;
}

.source-section {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.source-section a {
    color: var(--link-color);
    margin: 0 0.25rem;
}

.source-section a:hover {
    text-decoration: underline;
}

table {
    border-collapse: collapse;
    margin: 1rem 0;
    width: 100%;
    font-size: 0.9rem;
}

th,
td {
    border: 1px solid #a2a9b1;
    padding: 0.5rem;
    text-align: left;
}

th {
    background-color: #eaecf0;
    font-weight: bold;
}

/* Nav Buttons on Home Page */
.nav-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 2px;
    color: #202122;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #eaecf0;
    text-decoration: none;
}

/* Notice/Disclaimer */
.notice {
    margin-top: 2.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 0.9rem;
    display: inline-block;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Updates Section */
.updates-section {
    margin-top: 2.5rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.5rem;
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    border-radius: 8px;
    display: block;
    max-width: fit-content;
    text-align: left;
}

.updates-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #2e7d32;
    border: none;
}

.updates-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.updates-section li {
    color: #1b5e20;
    font-size: 0.9rem;
}

[data-theme="dark"] .updates-section {
    background-color: #1a3d1a;
    border-color: #4caf50;
}

[data-theme="dark"] .updates-section h3 {
    color: #81c784;
}

[data-theme="dark"] .updates-section li {
    color: #a5d6a7;
}

/* Solution Action Buttons */
.solution-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 3px;
    color: #202122;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #eaecf0;
    border-color: #72777d;
}

.copy-btn:active {
    background-color: #d5fdd5;
}

.download-btn:active {
    background-color: #d5e8fd;
}

.toggle-btn:active {
    background-color: #fde8d5;
}

/* Hidden comment lines */
.comment-hidden {
    display: none !important;
}

.comment-line {
    color: #6a737d;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --text-color: #e4e4e7;
    --link-color: #60a5fa;
    --link-visited: #a78bfa;
    --border-color: #3f3f46;
    --bg-secondary: #16213e;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] main {
    background: #1a1a2e;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #f4f4f5;
}

[data-theme="dark"] .subtitle {
    color: #a1a1aa;
}

[data-theme="dark"] footer {
    color: #a1a1aa;
}

[data-theme="dark"] code,
[data-theme="dark"] pre {
    background-color: #0f0f23;
    border-color: #3f3f46;
    color: #10b981;
}

[data-theme="dark"] table {
    border-color: #3f3f46;
}

[data-theme="dark"] th,
[data-theme="dark"] td {
    border-color: #3f3f46;
}

[data-theme="dark"] th {
    background-color: #16213e;
    color: #f4f4f5;
}

[data-theme="dark"] td {
    background-color: #1a1a2e;
}

[data-theme="dark"] .nav-btn {
    background-color: #16213e;
    border-color: #3f3f46;
    color: #e4e4e7;
}

[data-theme="dark"] .nav-btn:hover {
    background-color: #1e3a5f;
}

[data-theme="dark"] .action-btn {
    background-color: #16213e;
    border-color: #3f3f46;
    color: #e4e4e7;
}

[data-theme="dark"] .action-btn:hover {
    background-color: #1e3a5f;
    border-color: #60a5fa;
}

[data-theme="dark"] .notice {
    background-color: #422006;
    border-color: #f59e0b;
    color: #fcd34d;
}

[data-theme="dark"] .toc {
    background-color: #16213e;
    border-color: #3f3f46;
}

[data-theme="dark"] .report-section .separator {
    color: #52525b;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle {
    background-color: #16213e;
    border-color: #3f3f46;
}

/* LLM Section */
.llm-section {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.llm-section span:first-child {
    color: #54595d;
}

[data-theme="dark"] .llm-section {
    color: #a1a1aa;
}

[data-theme="dark"] .llm-section span:first-child {
    color: #a1a1aa;
}

/* Contact Section (moved from report-section) */
.contact-section {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.contact-section a {
    color: var(--link-color);
    margin: 0 0.25rem;
}

.contact-section a:hover {
    text-decoration: underline;
}

.contact-section .separator {
    color: #a2a9b1;
    margin: 0 0.25rem;
}

[data-theme="dark"] .contact-section .separator {
    color: #52525b;
}

/* Report Problem Button */
.report-problem-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 3px;
    color: #202122;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-problem-btn:hover {
    background-color: #eaecf0;
    border-color: #72777d;
}

[data-theme="dark"] .report-problem-btn {
    background-color: #16213e;
    border-color: #3f3f46;
    color: #e4e4e7;
}

[data-theme="dark"] .report-problem-btn:hover {
    background-color: #1e3a5f;
    border-color: #60a5fa;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Content */
.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .modal-content {
    background: #1a1a2e;
    border: 1px solid #3f3f46;
}

[data-theme="dark"] .modal-content h3 {
    color: #f4f4f5;
}

/* Form Group */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: #54595d;
}

[data-theme="dark"] .form-group label {
    color: #a1a1aa;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--link-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: #0f0f23;
    border-color: #3f3f46;
    color: #e4e4e7;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.modal-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    color: #202122;
}

.cancel-btn:hover {
    background-color: #eaecf0;
}

.submit-btn {
    background-color: #3366cc;
    border: 1px solid #3366cc;
    color: #fff;
}

.submit-btn:hover {
    background-color: #2a4d8f;
}

.submit-btn:disabled {
    background-color: #a2a9b1;
    border-color: #a2a9b1;
    cursor: not-allowed;
}

[data-theme="dark"] .cancel-btn {
    background-color: #16213e;
    border-color: #3f3f46;
    color: #e4e4e7;
}

[data-theme="dark"] .cancel-btn:hover {
    background-color: #1e3a5f;
}

[data-theme="dark"] .submit-btn {
    background-color: #60a5fa;
    border-color: #60a5fa;
    color: #1a1a2e;
}

[data-theme="dark"] .submit-btn:hover {
    background-color: #3b82f6;
}

/* File Input Styles */
.file-input {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: 3px;
    background-color: var(--bg-secondary);
    cursor: pointer;
}

.file-input:hover {
    border-color: var(--link-color);
}

.file-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #72777d;
}

[data-theme="dark"] .file-input {
    background-color: #16213e;
    border-color: #3f3f46;
}

[data-theme="dark"] .file-hint {
    color: #71717a;
}

/* Simple Solution Dropdown */
.simple-solution-dropdown {
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
}

.simple-solution-dropdown summary {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.simple-solution-dropdown summary:hover {
    background-color: #eaecf0;
}

.simple-solution-dropdown[open] summary {
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px 4px 0 0;
}

.simple-solution-dropdown pre {
    margin: 0;
    border: none;
    border-radius: 0 0 4px 4px;
}

/* Dark mode for Simple Solution Dropdown */
[data-theme="dark"] .simple-solution-dropdown {
    background-color: #16213e;
    border-color: #3f3f46;
}

[data-theme="dark"] .simple-solution-dropdown summary {
    background-color: #16213e;
    color: #f4f4f5;
}

[data-theme="dark"] .simple-solution-dropdown summary:hover {
    background-color: #1e3a5f;
}

[data-theme="dark"] .simple-solution-dropdown[open] summary {
    border-bottom-color: #3f3f46;
}