* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #0b0e14;
    color: #e8e4d8;
    font-family: 'Segoe UI', system-ui, sans-serif;
    padding: 20px 16px 40px;
    min-height: 100vh;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1a1f28;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: #b8943c;
    border-radius: 8px;
}

/* ===== 头部 ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #2c3340;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.header h1 {
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #f0d68a, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== 通用按钮 ===== */
.btn {
    background: transparent;
    border: 1px solid #3d4a5e;
    color: #d0d4dc;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    font-weight: 400;
    letter-spacing: .2px;
}
.btn:hover {
    border-color: #b8943c;
    color: #f0e6d0;
    background: rgba(184, 148, 60, 0.08);
}
.btn-primary {
    background: #b8943c;
    border-color: #b8943c;
    color: #0b0e14;
    font-weight: 500;
}
.btn-primary:hover {
    background: #c9a84c;
    border-color: #c9a84c;
    color: #0b0e14;
}
.btn-danger {
    border-color: #6f4e4e;
    color: #d4a0a0;
}
.btn-danger:hover {
    border-color: #b06060;
    color: #f0c0c0;
    background: rgba(176, 96, 96, 0.08);
}
.btn-sm {
    padding: 4px 14px;
    font-size: 12px;
}
.btn-gold-outline {
    border-color: #b8943c;
    color: #d4cdb8;
}
.btn-gold-outline:hover {
    background: rgba(184, 148, 60, 0.12);
    border-color: #c9a84c;
}

/* ===== 步骤区域 ===== */
.step-section {
    margin-bottom: 32px;
}
.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #8a929e;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== 主题卡片网格 ===== */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width:700px) {
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width:450px) {
    .topic-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.topic-card {
    background: #131a24;
    border: 2px solid #26303e;
    border-radius: 14px;
    padding: 18px 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}
.topic-card:hover {
    border-color: #7a8392;
    background: #181f2b;
}
.topic-card.active {
    border-color: #b8943c;
    background: #1a232f;
    box-shadow: 0 0 30px rgba(184, 148, 60, 0.08);
}
.topic-card .icon {
    font-size: 32px;
    line-height: 1.2;
}
.topic-card .name {
    font-weight: 600;
    color: #f0e6d0;
    margin-top: 4px;
    font-size: 15px;
}
.topic-card .desc {
    font-size: 11px;
    color: #7a8392;
    margin-top: 2px;
}

/* ===== 深度按钮行（复用预设行） ===== */
.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}
.preset-row .label {
    font-size: 13px;
    color: #8a929e;
    margin-right: 4px;
}
.preset-row .btn {
    font-size: 12px;
    padding: 5px 16px;
}
.preset-row .btn.active-preset {
    background: #b8943c;
    border-color: #b8943c;
    color: #0b0e14;
}
.depth-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #7a8392;
    padding-left: 4px;
}

/* ===== 方案看板 ===== */
.plan-card {
    background: #0a0f16;
    border: 1px solid #26303e;
    border-radius: 14px;
    padding: 20px 22px 18px;
}
.plan-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width:600px) {
    .plan-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
.plan-title {
    font-weight: 600;
    color: #d4cdb8;
    font-size: 14px;
    margin-bottom: 8px;
}
.plan-left .data-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 6px;
}
.tag-required {
    background: #1a2a1a;
    color: #8bc34a;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #2a4a2a;
}
.tag-optional {
    background: #1a232f;
    color: #f0d68a;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px dashed #3d4a5e;
}
.data-explain {
    font-size: 12px;
    color: #7a8392;
    margin-top: 4px;
    padding: 4px 0;
}
.plan-right ul {
    color: #d0d4dc;
    font-size: 13px;
    padding-left: 16px;
    line-height: 1.9;
    margin: 0;
}
.plan-action {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #1e2735;
    text-align: right;
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}
.modal-box {
    background: #1a232f;
    border: 1px solid #3d4a5e;
    border-radius: 20px;
    padding: 28px 32px 24px;
    max-width: 720px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.modal-box .close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    color: #8a929e;
    font-size: 26px;
    cursor: pointer;
    transition: color .2s;
}
.modal-box .close-btn:hover {
    color: #f0e6d0;
}
.modal-box h3 {
    font-size: 20px;
    color: #f0e6d0;
    margin-bottom: 4px;
}
.modal-box .sub {
    color: #a8aeb8;
    font-size: 14px;
    margin-bottom: 14px;
}

/* ===== 输出区（复用清洗工具样式） ===== */
.output-area {
    background: #0a0f16;
    border-radius: 12px;
    border: 1px solid #26303e;
    padding: 4px;
}
.output-area textarea {
    width: 100%;
    min-height: 200px;
    background: transparent;
    border: none;
    color: #e0dccc;
    font-size: 13px;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.7;
    border-radius: 12px;
}
.output-area textarea:focus {
    outline: none;
}

/* ===== 术语折叠 ===== */
.glossary-collapse {
    display: inline-block;
    color: #b8943c;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 1px dashed #3d4a5e;
    transition: color .2s;
}
.glossary-collapse:hover {
    color: #f0d68a;
}
#glossaryContent {
    margin-top: 10px;
    padding: 12px 16px;
    background: #0f1620;
    border-radius: 8px;
    border: 1px solid #26303e;
}
.glossary-item {
    padding: 4px 0;
    border-bottom: 1px solid #1a232f;
}
.glossary-item:last-child {
    border-bottom: none;
}
.glossary-item .term {
    font-weight: 600;
    color: #f0d68a;
    font-size: 13px;
}
.glossary-item .def {
    color: #c8ccd4;
    font-size: 13px;
    margin-left: 6px;
}

/* ===== 教程弹窗 ===== */
.tutorial-body .section {
    margin-bottom: 16px;
}
.tutorial-body .section .st {
    font-weight: 600;
    color: #d4cdb8;
    margin-bottom: 4px;
}
.tutorial-body ul {
    padding-left: 20px;
    margin: 4px 0 8px;
    line-height: 1.8;
    color: #d0d4dc;
    font-size: 14px;
}
.tutorial-body p {
    color: #d0d4dc;
    font-size: 14px;
    line-height: 1.7;
}
.highlight-box {
    background: #1a232f;
    border-left: 3px solid #b8943c;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 13px;
    color: #d8d4c8;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e2735;
    border: 1px solid #b8943c;
    color: #f0e6d0;
    padding: 10px 26px;
    border-radius: 40px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
.footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #1e2735;
    font-size: 12px;
    color: #5a6373;
    text-align: center;
    line-height: 1.7;
}
.footer strong {
    color: #8a929e;
}
/* ===== 子场景网格 ===== */
.subtopic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.subtopic-card {
    background: #131a24;
    border: 2px solid #26303e;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.subtopic-card:hover {
    border-color: #7a8392;
    background: #181f2b;
}
.subtopic-card.active {
    border-color: #b8943c;
    background: #1a232f;
    box-shadow: 0 0 30px rgba(184, 148, 60, 0.08);
}
.subtopic-card .icon {
    font-size: 24px;
}
.subtopic-card .name {
    font-weight: 500;
    color: #f0e6d0;
    font-size: 14px;
    margin-top: 2px;
}
.subtopic-card .desc {
    font-size: 11px;
    color: #7a8392;
}

/* ===== 问题清单 ===== */
.question-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    background: #0a0f16;
    border: 1px solid #26303e;
    border-radius: 12px;
    padding: 16px 20px;
}
@media (max-width:550px) {
    .question-grid {
        grid-template-columns: 1fr;
    }
}
.question-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.question-item:hover {
    background: #131a24;
}
.question-item input[type="checkbox"] {
    accent-color: #b8943c;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.question-item .q-label {
    font-size: 14px;
    color: #d0d4dc;
    cursor: pointer;
    line-height: 1.5;
}
.question-item .q-id {
    font-size: 11px;
    color: #5a6373;
    font-weight: 600;
    margin-right: 4px;
}

/* ===== 方案看板中的问题列表 ===== */
#planSelectedQuestions {
    list-style: none;
    padding: 0;
    margin: 0;
}
#planSelectedQuestions li {
    font-size: 13px;
    color: #d0d4dc;
    padding: 4px 0;
    border-bottom: 1px solid #1a232f;
    display: flex;
    align-items: center;
    gap: 8px;
}
#planSelectedQuestions li:last-child {
    border-bottom: none;
}
#planSelectedQuestions li .q-id {
    color: #b8943c;
    font-weight: 600;
    font-size: 12px;
}

/* ===== 步骤显示/隐藏动画 ===== */
.step-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.step-section.hidden {
    display: none;
}

.tag-required,
.tag-optional {
    cursor: pointer;   /* 全部显示为手型 */
    transition: background 0.2s, transform 0.1s;
}
.tag-required:hover,
.tag-optional:hover {
    background: #243040;
}
.tag-required:active,
.tag-optional:active {
    transform: scale(0.95);  /* 点击反馈 */
}
