/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #0a1628;
    --primary-light: #1a2d4a;
    --gold: #c9a227;
    --gold-light: #e8c547;
    --text: #e8e8e8;
    --muted: #8a9bb3;
    --border: rgba(201,162,39,0.2);
    --card: rgba(26,45,74,0.6);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--primary);
    color: var(--text);
    min-height: 100vh;
}

/* 导航 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10,22,40,0.95);
    border-bottom: 1px solid var(--border);
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.logo {
    font-family: Georgia, 'Noto Serif SC', serif;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
}
.logo span { color: var(--gold); }
.home-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}
.home-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}
.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}
.status-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 工作区布局 */
.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
}

/* 左侧输入面板 */
.input-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}
.panel-header h1 {
    font-family: Georgia, 'Noto Serif SC', serif;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}
.panel-header p { color: var(--muted); margin-bottom: 1.5rem; }

/* 模块标题包装器 */
.module-header-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 帮助链接样式 - 更具体的选择器 */
.input-panel .panel-header .module-header-wrapper .module-help-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    color: var(--gold) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    margin-left: 10px !important;
    background: var(--gold) !important;
}

.input-panel .panel-header .module-header-wrapper .module-help-link:hover {
    opacity: 1 !important;
    background: var(--gold-light) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.5) !important;
}

.input-panel .panel-header .module-header-wrapper .module-help-link .help-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: var(--gold) !important;
    color: var(--primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.3) !important;
}

.input-panel .panel-header .module-header-wrapper .module-help-link .help-icon:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.6) !important;
    opacity: 1 !important;
}

/* 标题行布局 */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.header-row > div:first-child { flex: 1; }
.header-row h1 { margin-bottom: 0.25rem; }
.header-row p { margin-bottom: 0; }

/* 语言切换器 */
.lang-switcher {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.lang-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lang-toggle {
    position: relative;
    display: flex;
    background: rgba(10,22,40,0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    gap: 0;
}
.lang-toggle input[type="radio"] {
    display: none;
}
.lang-toggle label {
    position: relative;
    z-index: 2;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.3s ease;
    border-radius: 6px;
}
.lang-toggle input[type="radio"]:checked + label {
    color: var(--primary);
}
.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(201,162,39,0.3);
}
.lang-toggle input#langZh:checked ~ .toggle-slider {
    transform: translateX(100%);
}

/* 表单 */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(10,22,40,0.7);
    border: 1px solid rgba(201,162,39,0.3);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(10,22,40,0.9);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.form-group select { cursor: pointer; }
.form-group select option { background: var(--primary); color: var(--text); }

/* 上传区 */
.upload-zone {
    border: 2px dashed var(--border); border-radius: 12px; padding: 2rem;
    text-align: center; cursor: pointer; margin-bottom: 1.5rem; transition: all 0.3s;
}
.upload-zone:hover { border-color: var(--gold); background: rgba(201,162,39,0.05); }
.upload-zone.drag-over { border-color: var(--gold); background: rgba(201,162,39,0.1); border-style: solid; }
.upload-icon svg { width: 32px; height: 32px; stroke: var(--gold); margin-bottom: 0.5rem; }
.upload-zone p { color: var(--muted); }
.upload-zone span { color: var(--gold); }
.upload-formats {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* 提交按钮 */
.submit-btn {
    width: 100%; padding: 1rem; background: var(--gold); color: var(--primary);
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 1rem;
}
.submit-btn:hover:not(:disabled) { background: var(--gold-light); }
.submit-btn:disabled { background: #666; cursor: not-allowed; opacity: 0.6; }
.submit-btn .price { opacity: 0.8; }

/* 右侧输出面板 */
.output-panel { display: flex; flex-direction: column; gap: 1.5rem; }

/* 进度区 */
.progress-section {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem;
}
.progress-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.progress-header h2 { font-size: 1rem; }
.progress-percent { color: var(--gold); font-weight: 600; }

/* 进度条 */
.progress-bar {
    height: 8px; background: rgba(10,22,40,0.5); border-radius: 4px;
    overflow: hidden; position: relative; margin-bottom: 1.5rem;
}
.progress-fill {
    height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px; transition: width 0.5s ease;
}
.progress-glow {
    position: absolute; top: 0; right: 0; width: 50px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: glow 1.5s infinite;
}
@keyframes glow { 0% { transform: translateX(-100px); } 100% { transform: translateX(100px); } }

/* 阶段指示器 */
.stages { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.stage-icon {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(10,22,40,0.5);
    border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.stage-icon svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.stage span { font-size: 0.75rem; color: var(--muted); }
.stage.active .stage-icon { border-color: var(--gold); background: rgba(201,162,39,0.2); }
.stage.active .stage-icon svg { stroke: var(--gold); }
.stage.done .stage-icon { background: var(--gold); border-color: var(--gold); }
.stage.done .stage-icon svg { stroke: var(--primary); }
.stage-line { flex: 1; height: 2px; background: var(--border); margin: 0 0.5rem; }

/* 状态消息 */
.status-message {
    text-align: center; padding: 0.75rem; background: rgba(10,22,40,0.5);
    border-radius: 8px; color: var(--muted); font-size: 0.875rem;
}

/* 结果区 */
.result-section {
    flex: 1; background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem; display: flex; flex-direction: column;
}
.result-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.result-tabs { display: flex; gap: 0.5rem; }
.tab {
    padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--border);
    border-radius: 6px; color: var(--muted); cursor: pointer;
}
.tab.active { background: var(--gold); color: var(--primary); border-color: var(--gold); }
.result-content { flex: 1; overflow: auto; }
.placeholder { text-align: center; padding: 3rem; color: var(--muted); }
.placeholder-icon { font-size: 3rem; margin-bottom: 1rem; }

/* 下载按钮 */
.download-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.download-btn {
    flex: 1; padding: 1rem; border-radius: 8px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.download-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.download-btn small { font-size: 0.75rem; opacity: 0.7; }
.preview-btn { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.full-btn { background: var(--gold); border: none; color: var(--primary); }
.full-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 响应式 */
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } }

/* 确认对话框 */
.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.confirm-dialog {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.confirm-dialog-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.confirm-dialog-header h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin: 0;
}
.confirm-dialog-body {
    padding: 1.5rem;
}
.confirm-info-row {
    display: flex;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.confirm-info-row:last-child { margin-bottom: 0; }
.confirm-label {
    color: var(--muted);
    width: 60px;
    flex-shrink: 0;
}
.confirm-value {
    color: var(--text);
    word-break: break-all;
}
.confirm-dialog-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}
.confirm-btn-cancel, .confirm-btn-submit {
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.confirm-btn-cancel {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
}
.confirm-btn-cancel:hover { border-color: var(--muted); }
.confirm-btn-submit {
    background: var(--gold);
    border: none;
    color: var(--primary);
}
.confirm-btn-submit:hover { background: var(--gold-light); }

@media (max-width: 480px) {
    .confirm-dialog-footer {
        flex-direction: column;
    }
    .confirm-btn-cancel, .confirm-btn-submit {
        width: 100%;
    }
}

.auth-code-display {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    text-align: center;
}
.auth-code-display strong {
    color: #d4af37;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-left: 0.5rem;
}
.auth-code-display small {
    display: block;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.8rem;
}

/* 模式选择器 - 精致卡片设计 */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.mode-card {
    flex: 1;
    cursor: pointer;
}
.mode-card input[type="radio"] {
    display: none;
}
.mode-card-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(10,22,40,0.8) 0%, rgba(26,45,74,0.6) 100%);
    border: 2px solid var(--border);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mode-card:hover .mode-card-inner {
    border-color: rgba(201,162,39,0.5);
    background: linear-gradient(135deg, rgba(10,22,40,0.9) 0%, rgba(26,45,74,0.7) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.mode-card input:checked + .mode-card-inner {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(201,162,39,0.15) 0%, rgba(26,45,74,0.8) 100%);
    box-shadow: 0 0 0 4px rgba(201,162,39,0.1), 0 8px 24px rgba(0,0,0,0.3);
}

/* 模式图标 */
.mode-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(201,162,39,0.2) 0%, rgba(201,162,39,0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.mode-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--gold);
}
.mode-card input:checked + .mode-card-inner .mode-icon {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}
.mode-card input:checked + .mode-card-inner .mode-icon svg {
    stroke: var(--primary);
}

/* 模式信息 */
.mode-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mode-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.3s ease;
}
.mode-card input:checked + .mode-card-inner .mode-title {
    color: var(--gold);
}
.mode-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

/* 模式选中勾选 */
.mode-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 0;
}
.mode-check svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary);
}
.mode-card input:checked + .mode-card-inner .mode-check {
    opacity: 1;
    background: var(--gold);
    border-color: var(--gold);
}

/* Blueprint 模态框 - 重新设计 */
.blueprint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.blueprint-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}
.blueprint-modal-content {
    position: relative;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2744 100%);
    border: 1px solid rgba(201,162,39,0.3);
    border-radius: 20px;
    width: 94%;
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,39,0.1);
    animation: blueprintSlideIn 0.3s ease-out;
}
@keyframes blueprintSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 模态框头部 */
.blueprint-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(201,162,39,0.2);
    background: rgba(201,162,39,0.05);
}
.blueprint-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.blueprint-header-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary);
}
.blueprint-header-text { flex: 1; }
.blueprint-header-text h2 {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.blueprint-header-text p {
    color: var(--muted);
    font-size: 0.875rem;
}
.blueprint-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.2s;
}
.blueprint-close:hover {
    background: rgba(255,100,100,0.2);
    color: #ff6b6b;
}

/* 模态框主体 */
.blueprint-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}
.blueprint-modal-body::-webkit-scrollbar {
    width: 6px;
}
.blueprint-modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.blueprint-modal-body::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

/* 模态框底部 */
.blueprint-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(201,162,39,0.2);
    background: rgba(0,0,0,0.2);
}
.blueprint-modal-footer .btn-secondary,
.blueprint-modal-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.blueprint-modal-footer .btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}
.blueprint-modal-footer .btn-secondary:hover {
    border-color: var(--muted);
    color: var(--text);
}
.blueprint-modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border: none;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(201,162,39,0.3);
}
.blueprint-modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(201,162,39,0.4);
}

/* Blueprint 内容区域 */
.blueprint-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.blueprint-title {
    margin-bottom: 1rem;
}
.blueprint-title h3 {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 600;
}

/* 章节卡片 */
.blueprint-section {
    background: rgba(10,22,40,0.5);
    border: 1px solid rgba(201,162,39,0.15);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.2s;
}
.blueprint-section:hover {
    border-color: rgba(201,162,39,0.3);
    background: rgba(10,22,40,0.7);
}
.blueprint-section h4 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.blueprint-section h4 .section-num {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.blueprint-section label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}
.blueprint-section label:first-of-type {
    margin-top: 0;
}
.blueprint-section textarea,
.blueprint-section input[type="text"] {
    width: 100%;
    background: rgba(10,22,40,0.8);
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: 10px;
    color: var(--text);
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.blueprint-section textarea {
    min-height: 70px;
    resize: vertical;
}
.blueprint-section textarea:focus,
.blueprint-section input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(10,22,40,1);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

/* 关键词标签 */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(201,162,39,0.15) 0%, rgba(201,162,39,0.08) 100%);
    border: 1px solid rgba(201,162,39,0.4);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    color: var(--gold);
    transition: all 0.2s;
}
.keyword-tag:hover {
    background: rgba(201,162,39,0.2);
    border-color: var(--gold);
}
.keyword-tag .remove-keyword {
    cursor: pointer;
    opacity: 0.7;
    font-size: 1.3rem;
    padding: 0.15rem 0.4rem;
    margin-left: 0.5rem;
    line-height: 1;
    transition: opacity 0.2s;
    font-weight: bold;
}
.keyword-tag .remove-keyword:hover {
    opacity: 1;
}
.keyword-input {
    background: rgba(10,22,40,0.5);
    border: 1px dashed rgba(201,162,39,0.3);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text);
    min-width: 140px;
    transition: all 0.2s;
}
.keyword-input:focus {
    outline: none;
    border-color: var(--gold);
    border-style: solid;
    background: rgba(10,22,40,0.8);
}

/* 子章节容器 - Review Matrix */
.subsections-container {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}
.subsection-item {
    background: rgba(201,162,39,0.05);
    border: 1px solid rgba(201,162,39,0.1);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 小节标题头部 */
.subsection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.subsection-num {
    background: linear-gradient(135deg, var(--gold), #d4af37);
    color: var(--bg);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    min-width: 2rem;
    text-align: center;
}
.subsection-title-input {
    flex: 1;
    background: rgba(10,22,40,0.6);
    border: 1px dashed rgba(201,162,39,0.3);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.subsection-title-input:focus {
    outline: none;
    border-color: var(--gold);
    border-style: solid;
    background: rgba(10,22,40,0.8);
}

/* 删除小节按钮 */
.delete-subsection-btn {
    background: transparent;
    border: 1px solid rgba(255,100,100,0.3);
    color: #ff6b6b;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
}
.delete-subsection-btn:hover {
    background: rgba(255,100,100,0.2);
    border-color: #ff6b6b;
}

/* 章节标题行 */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.section-header-row h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}
.section-heading-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(201,162,39,0.3);
    color: var(--text);
    font-size: 1rem;
    padding: 0.3rem 0;
}
.section-heading-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* 删除章节按钮 */
.delete-section-btn {
    background: transparent;
    border: 1px solid rgba(255,100,100,0.3);
    color: #ff6b6b;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.delete-section-btn:hover {
    background: rgba(255,100,100,0.2);
    border-color: #ff6b6b;
}

/* 添加小节/章节按钮 */
.add-subsection-btn, .add-section-btn {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 0.8rem;
}
.add-subsection-btn:hover, .add-section-btn:hover {
    background: rgba(201,162,39,0.1);
    border-color: var(--gold);
}
.add-section-btn {
    width: 100%;
    margin-top: 1rem;
}

/* 小节关键词区域 */
.subsection-keywords {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.subsection-keywords label {
    font-size: 0.75rem;
    color: rgba(232,232,232,0.7);
    margin: 0;
}
.subsection-item input {
    width: 100%;
}

/* Blueprint 响应式 */
@media (max-width: 640px) {
    .blueprint-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .blueprint-modal-header {
        padding: 1rem;
    }
    .blueprint-modal-body {
        padding: 1rem;
    }
    .blueprint-modal-footer {
        padding: 1rem;
    }
    .subsection-item {
        padding: 0.75rem;
    }
}

/* Blueprint 操作按钮 */
.blueprint-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.btn-primary {
    background: var(--gold);
    color: var(--primary);
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--gold-light);
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    border-color: var(--muted);
    background: rgba(255,255,255,0.05);
}

/* 输出语言选择器 - 药丸式设计 */
.lang-selector-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(10,22,40,0.6) 0%, rgba(26,45,74,0.4) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.lang-selector-group .lang-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.lang-pills {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}
.lang-pill {
    flex: 1;
    cursor: pointer;
}
.lang-pill input[type="radio"] {
    display: none;
}
.lang-pill .pill-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(10,22,40,0.5);
    border: 2px solid var(--border);
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-pill:hover .pill-content {
    border-color: rgba(201,162,39,0.5);
    background: rgba(10,22,40,0.7);
}
.lang-pill input:checked + .pill-content {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(201,162,39,0.3);
}
.pill-flag {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    transition: color 0.3s ease;
}
.pill-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.3s ease;
}
.lang-pill input:checked + .pill-content .pill-flag,
.lang-pill input:checked + .pill-content .pill-text {
    color: var(--primary);
}

/* =============================================================================
   浮动进度小窗口
   ============================================================================= */
.floating-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 最小化状态 - 圆形按钮 */
.fp-minimized {
    display: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    box-shadow: 0 4px 20px rgba(201,162,39,0.4);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fp-minimized:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(201,162,39,0.5);
}
.fp-mini-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(10,22,40,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: fp-spin 1s linear infinite;
}
.fp-mini-percent {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
}
@keyframes fp-spin {
    to { transform: rotate(360deg); }
}

/* 展开状态 */
.fp-expanded {
    display: block;
    width: 340px;
    background: linear-gradient(135deg, rgba(26,45,74,0.98) 0%, rgba(10,22,40,0.98) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,39,0.3), 0 0 30px rgba(201,162,39,0.15);
    overflow: hidden;
    animation: fp-border-flow 3s linear infinite;
}
@keyframes fp-border-flow {
    0% { box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,39,0.3), 0 0 30px rgba(201,162,39,0.15); }
    50% { box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 2px rgba(201,162,39,0.5), 0 0 40px rgba(201,162,39,0.25); }
    100% { box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,39,0.3), 0 0 30px rgba(201,162,39,0.15); }
}
.floating-progress.minimized .fp-minimized { display: flex; }
.floating-progress.minimized .fp-expanded { display: none; }

/* 头部 */
.fp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(201,162,39,0.18) 0%, rgba(201,162,39,0.08) 100%);
    border-bottom: 1px solid rgba(201,162,39,0.35);
}
.fp-title {
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--gold) 0%, #ffd700 50%, var(--gold-light) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    animation: fp-title-shimmer 2s ease-in-out infinite;
}
@keyframes fp-title-shimmer {
    0% { background-position: -100% 50%; }
    100% { background-position: 200% 50%; }
}
.fp-minimize {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(10,22,40,0.5);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.2s;
}
.fp-minimize:hover {
    background: rgba(201,162,39,0.2);
    color: var(--gold);
}

/* 主体 */
.fp-body {
    padding: 20px;
}

/* 进度条 */
.fp-progress-bar {
    height: 8px;
    background: rgba(10,22,40,0.6);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 18px;
}
.fp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    animation: fp-progress-flow 1.5s ease-in-out infinite;
}
@keyframes fp-progress-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.fp-progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: fp-glow 2s ease-in-out infinite;
}
@keyframes fp-glow {
    0% { transform: translateX(-60px); }
    100% { transform: translateX(280px); }
}

/* 阶段指示器 */
.fp-stages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}
.fp-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(138,155,179,0.3);
    transition: all 0.3s;
}
.fp-stage-dot.active {
    background: var(--gold);
    box-shadow: 0 0 8px rgba(201,162,39,0.6);
    animation: fp-pulse 1.5s ease-in-out infinite;
}
.fp-stage-dot.done {
    background: var(--gold);
}
.fp-stage-arrow {
    color: rgba(138,155,179,0.4);
    font-size: 10px;
}
.fp-stage-arrow.done {
    color: var(--gold);
}
@keyframes fp-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* 状态信息 */
.fp-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(201,162,39,0.12) 0%, rgba(10,22,40,0.6) 100%);
    border: 1px solid rgba(201,162,39,0.25);
    border-radius: 10px;
}
.fp-percent {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold) 0%, #ffd700 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 50px;
    text-shadow: 0 0 20px rgba(201,162,39,0.5);
}
.fp-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    animation: fp-message-glow 2s ease-in-out infinite;
}
@keyframes fp-message-glow {
    0%, 100% { color: var(--text); }
    50% { color: var(--gold-light); }
}

/* 预计时间 */
.fp-eta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gold-light);
    opacity: 0.9;
    padding: 8px 12px;
    background: rgba(201,162,39,0.08);
    border-radius: 8px;
    margin-top: 4px;
}
.fp-eta svg {
    stroke: var(--gold);
    animation: fp-clock-tick 1s ease-in-out infinite;
}
@keyframes fp-clock-tick {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

/* 响应式 - 手机端全宽 */
@media (max-width: 480px) {
    .floating-progress {
        bottom: 0;
        right: 0;
        left: 0;
    }
    .fp-expanded {
        width: 100%;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
    }
    .fp-minimized {
        position: fixed;
        bottom: 16px;
        right: 16px;
    }
}

/* =============================================================================
   NSFC/Proposal Blueprint 优化样式
   ============================================================================= */

/* 通用 section header */
.blueprint-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.blueprint-section .section-header h4 {
    margin: 0;
}

/* 字数徽章 */
.word-badge {
    background: linear-gradient(135deg, rgba(201,162,39,0.2) 0%, rgba(201,162,39,0.1) 100%);
    border: 1px solid rgba(201,162,39,0.4);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* section body 布局 */
.blueprint-section .section-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 写作指导块 */
.guide-block, .keywords-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.guide-block label, .keywords-block label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.guide-block label .hint, .keywords-block label .hint {
    font-size: 0.7rem;
    color: var(--muted);
    opacity: 0.7;
}

/* NSFC Header 样式 */
.nsfc-header .blueprint-meta-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(10,22,40,0.5);
    border: 1px solid rgba(201,162,39,0.15);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.nsfc-header .blueprint-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nsfc-header .blueprint-meta > label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}
/* 研究类型下拉框美化 */
.blueprint-section select,
.nsfc-header .meta-select {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 3rem;
    background: rgba(10,22,40,0.8);
    border: 1px solid rgba(201,162,39,0.25);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9a227' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.blueprint-section select:hover,
.nsfc-header .meta-select:hover {
    border-color: var(--gold);
    background-color: rgba(10,22,40,0.95);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}
.blueprint-section select:focus,
.nsfc-header .meta-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.blueprint-section select option {
    background: var(--primary);
    color: var(--text);
    padding: 0.75rem;
}
.nsfc-header .meta-textarea {
    width: 100%;
    min-height: 70px;
    line-height: 1.5;
    background: rgba(10,22,40,0.8);
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: 10px;
    color: var(--text);
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.2s;
}
.nsfc-header .meta-textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(10,22,40,1);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}
.nsfc-header .meta-textarea.large {
    min-height: 120px;
}

/* NSFC Section 样式 */
.nsfc-section {
    border-left: 3px solid var(--gold);
}

/* Proposal Header 样式 */
.proposal-header .proposal-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.proposal-header .proposal-title-row h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
}

/* 学位级别徽章 */
.level-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.level-badge.master {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}
.level-badge.phd {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
}

/* Proposal Section 样式 */
.proposal-section.master-proposal {
    border-left: 3px solid #3b82f6;
}
.proposal-section.phd-proposal {
    border-left: 3px solid #8b5cf6;
}

/* =============================================================================
   核心科学假说卡片 - 精美设计
   ============================================================================= */
.hypothesis-card {
    background: linear-gradient(135deg, rgba(201,162,39,0.08) 0%, rgba(10,22,40,0.6) 100%);
    border: 1px solid rgba(201,162,39,0.25);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}
.hypothesis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
}
.hypothesis-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.hypothesis-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(201,162,39,0.25) 0%, rgba(201,162,39,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hypothesis-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--gold);
}
.hypothesis-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    flex: 1;
}
.hypothesis-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    background: rgba(138,155,179,0.15);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hypothesis-content {
    position: relative;
}
.hypothesis-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem 1.25rem;
    background: rgba(10,22,40,0.7);
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    transition: all 0.3s ease;
}
.hypothesis-textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(10,22,40,0.9);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}
.hypothesis-textarea::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

/* =============================================================================
   章节模式选择器（开题报告专用）- 重新设计
   ============================================================================= */
.chapter-mode-selector {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(10,22,40,0.6) 0%, rgba(26,45,74,0.4) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.chapter-mode-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.chapter-mode-icon {
    width: 20px;
    height: 20px;
    stroke: var(--gold);
}
.chapter-mode-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.chapter-mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.chapter-mode-card input[type="radio"] { display: none; }
.chapter-card-inner {
    position: relative;
    padding: 1.25rem;
    background: rgba(10,22,40,0.7);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.chapter-mode-card:hover .chapter-card-inner {
    border-color: rgba(201,162,39,0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.chapter-mode-card input:checked + .chapter-card-inner {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(201,162,39,0.1) 0%, rgba(26,45,74,0.8) 100%);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15), 0 8px 24px rgba(0,0,0,0.3);
}
/* 章节卡片顶部 */
.chapter-card-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.chapter-badge-wrap {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.chapter-badge {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.chapter-badge.eight {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.chapter-badge-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}
.chapter-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chapter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.chapter-subtitle {
    font-size: 0.72rem;
    color: var(--muted);
    opacity: 0.8;
}
/* 章节列表 - 双列布局 */
.chapter-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.chapter-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.chapter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 0.35rem 0.5rem;
    background: rgba(138,155,179,0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
}
.chapter-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    border-radius: 4px;
    flex-shrink: 0;
}
/* 八章模式的序号颜色 */
.chapter-mode-card[data-mode="nine"] .chapter-item i {
    background: rgba(168,85,247,0.15);
    color: #c084fc;
}
.chapter-mode-card input:checked + .chapter-card-inner .chapter-item {
    background: rgba(201,162,39,0.12);
    color: var(--text);
}
.chapter-mode-card input:checked + .chapter-card-inner .chapter-item i {
    background: rgba(201,162,39,0.25);
    color: var(--gold);
}
/* 章节勾选标记 */
.chapter-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.chapter-check svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary);
}
.chapter-mode-card input:checked + .chapter-card-inner .chapter-check {
    opacity: 1;
    background: var(--gold);
    border-color: var(--gold);
}

/* 分隔线 */
.chapter-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 1rem 0;
}

/* 章节模式响应式 */
@media (max-width: 640px) {
    .chapter-mode-cards {
        grid-template-columns: 1fr;
    }
    .chapter-list {
        grid-template-columns: 1fr;
    }
    .chapter-col {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
