:root {
    --red: #dc1414;
    --red-dark: #b01010;
    --blue: #1e64a0;
    --blue-dark: #154a78;
    --yellow: #fac832;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--dark); }
.brand-version { font-size: 0.7rem; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--red); }

.github-link {
    background: var(--dark);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.github-link:hover { background: var(--red); }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.help-hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
    padding: 8rem 1.5rem 4rem;
    text-align: center;
}

.help-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.section-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-tag.light { color: var(--white); }

.help-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.help-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.search-box button {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--yellow);
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-box button:hover { transform: translateY(-2px); }

.quick-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-links a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-links a:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--white);
}

/* Main layout */
.help-main {
    display: flex;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    gap: 2.5rem;
}

.toc {
    width: 260px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    align-self: flex-start;
    position: sticky;
    top: 90px;
    border: 1px solid var(--gray-200);
}

.toc h3 {
    color: var(--red);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ul { list-style: none; }

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

.toc a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.toc a:hover {
    background: var(--gray-50);
    color: var(--red);
}

.help-content {
    flex: 1;
    min-width: 0;
}

.help-content section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.help-content h2 {
    color: var(--red);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--yellow);
    display: inline-block;
}

.help-content h3 {
    color: var(--blue);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
}

.help-content p {
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.help-content ul {
    margin: 0.75rem 0 1rem 1.5rem;
    color: var(--gray-800);
}

.help-content li { margin-bottom: 0.4rem; }

pre {
    background: var(--dark);
    color: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 0.9rem;
}

code {
    font-family: 'Fira Code', Consolas, monospace;
    background: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--red);
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

code[class*="language-"],
pre[class*="language-"] {
    text-shadow: none;
    font-family: 'Fira Code', 'SF Mono', Consolas, monospace;
}

pre[class*="language-"] {
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    margin: 0.75rem 0;
}

.code-preview {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.filename-tag {
    background: var(--red);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--blue);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    color: var(--blue-dark);
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.command-card {
    background: var(--gray-50);
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.command-card code {
    display: block;
    margin-bottom: 0.4rem;
    background: transparent;
    font-size: 0.85rem;
}

.command-card span {
    color: var(--gray-600);
    font-size: 0.85rem;
}

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

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--red);
    color: var(--white);
    font-weight: 600;
}

.data-table tr:hover { background: var(--gray-50); }

.mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mod-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border-left: 4px solid var(--blue);
}

.mod-card h4 {
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.mod-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

.error-item {
    background: #fef2f2;
    border-left: 4px solid var(--red);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.error-item h4 {
    color: var(--red);
    margin-bottom: 0.5rem;
}

.error-item p {
    color: var(--gray-800);
    margin: 0;
}

/* FAQ */
.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--gray-50);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: var(--white);
    border: none;
    padding: 1.1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--red);
    transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--white);
}

.faq-item.active .faq-answer {
    max-height: 400px;
}

.faq-answer p {
    padding: 1.25rem;
    margin: 0;
    color: var(--gray-600);
}

.ask-title {
    margin-top: 2.5rem;
}

.ask-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.ask-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ask-form input,
.ask-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    width: fit-content;
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.note {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.support-list {
    list-style: none;
    margin-left: 0 !important;
}

.support-list li {
    margin-bottom: 0.75rem;
}

.support-list a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.support-list a:hover { text-decoration: underline; }

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-bottom p { margin-bottom: 0.5rem; }

.footer-bottom a {
    color: var(--yellow);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-bottom a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
    .help-main {
        flex-direction: column;
    }

    .toc {
        width: 100%;
        position: static;
    }

    .help-hero h1 { font-size: 2.25rem; }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
        gap: 1rem;
    }

    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }

    .search-box { flex-direction: column; }
    .quick-links { flex-direction: column; align-items: center; }

    .help-content section { padding: 1.5rem; }
    .command-grid { grid-template-columns: 1fr; }
}
