* {
    box-sizing: border-box;
}

:root {
    --bg: #eef2f5;
    --card: #ffffff;
    --green: #168957;
    --green-dark: #047857;
    --green-light: #ecfdf5;
    --text: #0f2f4d;
    --muted: #64748b;
    --border: #dbe5ee;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Microsoft YaHei",
        "PingFang SC",
        Arial,
        sans-serif;
    line-height: 1.7;
}

body.modal-open {
    overflow: hidden;
}

.site-header {
    background: linear-gradient(135deg, #047857, #0f766e);
    color: #ffffff;
    padding: 34px 24px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.site-header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    letter-spacing: 1px;
}

.site-header p {
    margin: 0;
    opacity: 0.9;
}

.page-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px;
}

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

.card {
    background: var(--card);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow);
    border: 1px solid #e7edf3;
    margin-bottom: 26px;
}

.card h2 {
    margin: 0 0 14px;
    color: var(--green-dark);
    font-size: 22px;
}

.card p {
    margin-top: 0;
}

.section-desc {
    margin-bottom: 18px;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.divider {
    height: 1px;
    border-top: 1px dashed var(--border);
    margin: 18px 0;
}

code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
    color: #475569;
}

/* 搜索 */

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    font-size: 15px;
    background: #f8fafc;
}

.search-box input:focus {
    border-color: var(--green);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 137, 87, 0.12);
}

.search-box button {
    border: none;
    border-radius: 12px;
    padding: 0 18px;
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 700;
    cursor: pointer;
}

.search-box button:hover {
    background: #cbd5e1;
}

.qa-count {
    margin: 10px 0 14px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

/* 分类 */

.category-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 20px;
}

.category-btn {
    border: 1px solid #b9dfca;
    border-radius: 999px;
    padding: 9px 16px;
    background: #f8fafc;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--green);
    color: #ffffff;
    border-color: var(--green);
}

/* 问答列表 */

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qa-item {
    border: 1px solid #dbe5ee;
    border-radius: 14px;
    padding: 18px;
    background: #fbfdff;
}

.qa-question {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.qa-question strong {
    color: #0f172a;
}

.qa-category {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.qa-answer {
    color: #334155;
}

.empty-tip {
    color: #64748b;
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

/* 专家系统入口 */

.expert-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.expert-entry h2 {
    margin: 0 0 8px;
    color: var(--green-dark);
}

.expert-entry p {
    margin: 0;
}

.expert-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.primary-btn,
.secondary-btn {
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.primary-btn {
    border: none;
    background: var(--green);
    color: #ffffff;
}

.primary-btn:hover {
    background: #0f6f45;
}

.secondary-btn {
    background: #eaf4ef;
    color: var(--green-dark);
    border: 1px solid #b9dfca;
}

.secondary-btn:hover {
    background: #d8efe3;
}

/* 通用弹窗 */

.expert-modal-mask,
.changelog-modal-mask,
.chat-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 32px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.expert-modal-mask.show,
.changelog-modal-mask.show,
.chat-modal-mask.show {
    display: flex;
}

.expert-modal,
.changelog-modal,
.chat-modal {
    width: min(1000px, 96vw);
    max-height: 86vh;
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
    animation: modalIn 0.18s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.expert-modal-header,
.changelog-modal-header,
.chat-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.expert-modal-header h2,
.changelog-modal-header h2,
.chat-modal-header h2 {
    margin: 0 0 6px;
    color: var(--green-dark);
}

.expert-modal-header p,
.changelog-modal-header p,
.chat-modal-header p {
    margin: 0;
    color: var(--muted);
}

.modal-close-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #eef2f7;
    color: #1f2937;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-close-btn:hover {
    background: #dbe4ef;
}

/* 专家系统弹窗 */

.expert-modal-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    padding: 24px 28px;
    max-height: calc(86vh - 110px);
    overflow: auto;
}

.expert-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.expert-type-btn {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d6e5dc;
    background: #f8fafc;
    color: #0f5132;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.expert-type-btn:hover,
.expert-type-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: #ffffff;
}

.expert-result-panel {
    min-height: 300px;
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.expert-result-panel h3 {
    margin-top: 0;
    color: var(--green-dark);
}

.expert-section {
    margin-top: 18px;
}

.expert-section h4 {
    margin: 0 0 8px;
    color: #0f172a;
}

.expert-section ul,
.expert-section ol {
    margin: 0;
    padding-left: 22px;
    line-height: 1.8;
}

.expert-note {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--green-light);
    color: var(--green-dark);
}

/* 更新日志 */

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.changelog-item {
    padding: 14px 16px;
    border: 1px solid #dbe5ee;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: 0.2s;
}

.changelog-item:hover {
    border-color: #93c5fd;
    background: #f1f7ff;
}

.changelog-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.changelog-date {
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.changelog-detail-btn {
    margin-left: auto;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    background: #eef6ff;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
}

.changelog-detail-btn:hover {
    background: #dbeafe;
}

.changelog-modal {
    width: min(760px, 94vw);
}

.changelog-modal-body {
    padding: 24px 30px 30px;
    max-height: calc(86vh - 110px);
    overflow: auto;
}

.changelog-modal-body ul {
    margin: 0;
    padding-left: 24px;
    line-height: 1.9;
}

/* 问答助手 */

.chat-modal {
    width: min(860px, 94vw);
}

.chat-modal-body {
    padding: 24px 28px 30px;
    max-height: calc(86vh - 110px);
    overflow: auto;
}

.chat-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.chat-input-row input {
    flex: 1;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid #d8e1ea;
    font-size: 15px;
}

.chat-input-row button {
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    background: var(--green);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.chat-result-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-result-item {
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.chat-result-question {
    margin-bottom: 8px;
    color: var(--green-dark);
    font-weight: 800;
}

.chat-result-answer {
    color: #334155;
}

/* 移动端 */

@media (max-width: 768px) {
    .page-container {
        padding: 16px;
    }

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

    .expert-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    .expert-actions {
        justify-content: flex-start;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        padding: 12px 18px;
    }

    .expert-modal-body {
        grid-template-columns: 1fr;
    }

    .expert-modal-mask,
    .changelog-modal-mask,
    .chat-modal-mask {
        padding: 16px;
    }

    .chat-input-row {
        flex-direction: column;
    }

    .chat-input-row button {
        padding: 12px 20px;
    }
}
/* 问题诊断助手增强版 */

.assistant-tip {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 14px;
}

.quick-question-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.quick-question-box button {
    border: 1px solid #cde8d8;
    border-radius: 999px;
    padding: 8px 13px;
    background: #ffffff;
    color: #047857;
    font-weight: 700;
    cursor: pointer;
}

.quick-question-box button:hover {
    background: #ecfdf5;
    border-color: #168957;
}

.assistant-welcome {
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.assistant-welcome h3 {
    margin: 0 0 8px;
    color: #047857;
}

.assistant-welcome p {
    margin: 0 0 16px;
    color: #475569;
}

.assistant-welcome-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-welcome-grid span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
    font-size: 13px;
}

.assistant-diagnosis-card,
.assistant-related-card {
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #dbe5ee;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.assistant-diagnosis-card h3,
.assistant-related-card h3 {
    margin: 0;
    color: #047857;
}

.assistant-diagnosis-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.assistant-label {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.assistant-section {
    margin-top: 18px;
}

.assistant-section h4 {
    margin: 0 0 8px;
    color: #0f172a;
}

.assistant-section ul,
.assistant-section ol {
    margin: 0;
    padding-left: 22px;
    line-height: 1.85;
    color: #334155;
}

.assistant-keyword-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-keyword-btn,
.assistant-search-main-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 13px;
    background: #168957;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.assistant-keyword-btn:hover,
.assistant-search-main-btn:hover {
    background: #047857;
}

.assistant-search-main-btn {
    white-space: nowrap;
}

.assistant-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.assistant-related-item {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.assistant-related-question {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.assistant-related-question span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.assistant-related-question strong {
    color: #0f172a;
}

.assistant-related-answer {
    color: #334155;
    line-height: 1.75;
}

@media (max-width: 768px) {
    .assistant-diagnosis-head {
        flex-direction: column;
    }

    .assistant-search-main-btn {
        width: 100%;
    }
}
.visit-counter-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #d8e5ef;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    color: #39556b;
    font-size: 14px;
}

.visit-counter-box strong {
    color: #008f6b;
    font-weight: 700;
}
.visit-counter-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #d8e5ef;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    color: #39556b;
    font-size: 14px;
}

.visit-counter-box strong {
    color: #008f6b;
    font-weight: 700;
}
