/* 法壮�?- 样式文件 */

/* ==================== 基础样式 ==================== */

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

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== 导航�?==================== */

.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 28px;
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: 0.5px;
}

/* Tab切换 */
.nav-tabs {
    display: flex;
    gap: 8px;
}

.nav-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}

.nav-tab:hover {
    background: var(--gray-100);
}

.nav-tab.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* 用户区域 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.nav-link {
    padding: 8px 18px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* 登录按钮 */
.btn-login {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.btn-logout {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-600);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* ==================== 主内容区 ==================== */

.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - 60px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== 按钮 ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-large {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-full {
    width: 100%;
}

/* ==================== 表单 ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* ==================== 卡片 ==================== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

/* ==================== 登录弹窗 ==================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    position: relative;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.auth-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.auth-close {
    background: var(--gray-100);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.auth-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.15s;
    pointer-events: auto;
}

.tab-btn:hover {
    color: var(--gray-800);
}

.tab-btn.active {
    background: white;
    color: var(--gray-800);
    box-shadow: var(--shadow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 追问样式 */
.question-item {
    margin-bottom: 16px;
}

.question-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.question-item textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    resize: vertical;
}

.question-item textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.question-item input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
}

.question-item input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.question-item.error {
    background: #fef2f2;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid #fecaca;
}

.question-item .required {
    color: #ef4444;
}

/* 选择题样�?*/
.choice-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.choice-label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.choice-label:hover {
    background: var(--gray-100);
    border-color: var(--primary-light);
}

.choice-label input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--primary);
}

.choice-label input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 500;
}

.choice-label:has(input:checked) {
    background: #eff6ff;
    border-color: var(--primary);
}

/* 推荐文书样式 */
.recommend-doc-types {
    margin-bottom: 16px;
}

.recommend-doc-types > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.recommend-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recommend-label {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.recommend-label:hover {
    background: #dcfce7;
}

.recommend-label input[type="radio"] {
    margin-right: 8px;
    accent-color: #22c55e;
}

.recommend-label:has(input:checked) {
    background: #dcfce7;
    border-color: #22c55e;
    font-weight: 500;
}

/* 分析信息样式 */
.analysis-info {
    font-size: 14px;
    color: var(--gray-600);
}

.analysis-info p {
    margin: 8px 0;
}

/* ==================== 文书起草 ==================== */

.draft-header {
    text-align: center;
    margin-bottom: 32px;
}

.draft-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.draft-header p {
    font-size: 15px;
    color: var(--gray-500);
}

.draft-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.input-hint {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 6px;
}

.case-input {
    width: 100%;
    min-height: 140px;
    padding: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
}

.case-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.type-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.type-select:focus {
    outline: none;
    border-color: var(--primary);
}

.hot-types {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hot-label {
    font-size: 13px;
    color: var(--gray-500);
}

.type-tag {
    padding: 5px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}

.type-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.type-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.draft-actions {
    margin-top: 24px;
    text-align: center;
}

/* ==================== 文书预览 ==================== */

.document-preview {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-top: 24px;
    overflow: hidden;
}

.preview-header {
    background: var(--gray-50);
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.edit-hint {
    font-size: 12px;
    color: var(--primary);
    margin-left: 12px;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

/* Quill编辑器工具栏 */
#editor-toolbar {
    background: #fafafa;
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 16px;
}

#editor-toolbar .ql-formats {
    margin-right: 12px;
}

#editor-toolbar button {
    width: 28px;
    height: 28px;
}

#editor-toolbar select {
    height: 28px;
}

/* Quill编辑器内容区 */
#preview-content {
    min-height: 500px;
    font-size: 16px;
    line-height: 2;
    font-family: 仿宋, FangSong, serif;
}

#preview-content .ql-editor {
    padding: 48px 64px;
    max-width: 800px;
    margin: 0 auto;
}

#preview-content h1 {
    font-family: 黑体, SimHei, sans-serif;
    font-size: 22px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 24px;
}

#preview-content h2 {
    font-family: 黑体, SimHei, sans-serif;
    font-size: 18px;
    font-weight: bold;
    margin-top: 24px;
}

#preview-content p {
    text-indent: 2em;
    margin: 8px 0;
}

.edit-status {
    background: var(--gray-50);
    padding: 12px 24px;
    border-top: 1px solid var(--gray-200);
    text-align: right;
    font-size: 13px;
    color: var(--gray-500);
}

/* ==================== 诊断结果 ==================== */

.diagnose-result {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-top: 24px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.result-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
}

.diagnose-result-body {
    max-height: 600px;
    overflow-y: auto;
}

/* 诊断卡片 */
.diagnose-section {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}

.win-rate-section {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.win-rate-display {
    text-align: center;
    flex-shrink: 0;
}

.win-rate-number {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.win-rate-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 8px;
}

.win-rate-analysis {
    flex: 1;
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-700);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    padding: 14px 20px;
    background: var(--gray-100);
    border-left: 4px solid var(--gray-400);
}

.section-content {
    padding: 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    line-height: 1.8;
    font-size: 14px;
}

.list-item {
    padding: 6px 0 6px 16px;
    position: relative;
}

.list-item::before {
    content: "�?;
    position: absolute;
    left: 0;
    color: var(--primary);
}

.text-line {
    margin-bottom: 8px;
}

/* 各部分配�?*/
.diagnose-section.advantage {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.diagnose-section.advantage .section-title {
    background: #dcfce7;
    border-left-color: #22c55e;
}

.diagnose-section.weakness {
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.diagnose-section.weakness .section-title {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.diagnose-section.opponent {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}
.diagnose-section.opponent .section-title {
    background: #ffedd5;
    border-left-color: #f97316;
}

.diagnose-section.judge {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
}
.diagnose-section.judge .section-title {
    background: #f3e8ff;
    border-left-color: #a855f7;
}

.diagnose-section.strategy {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.diagnose-section.strategy .section-title {
    background: #dbeafe;
    border-left-color: #3b82f6;
}

.diagnose-section.evidence {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.diagnose-section.evidence .section-title {
    background: #f1f5f9;
    border-left-color: #64748b;
}

.diagnose-section.nature,
.diagnose-section.prediction {
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.diagnose-section.nature .section-title,
.diagnose-section.prediction .section-title {
    background: #fef3c7;
    border-left-color: #eab308;
}

.diagnose-section.recommend-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.diagnose-section.recommend-section .section-title {
    background: #dcfce7;
    border-left-color: #22c55e;
}

.recommend-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== 关于页面 ==================== */

.about-page {
    max-width: 900px;
    margin: 0 auto;
}

.about-hero {
    text-align: center;
    padding: 40px 0;
}

.about-hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.about-hero p {
    font-size: 18px;
    color: var(--gray-500);
}

/* 对比区域 */
.compare-section {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin: 40px 0;
}

.compare-card {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.compare-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.compare-card ul {
    list-style: none;
    padding: 0;
}

.compare-card li {
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--gray-100);
}

.compare-card li:last-child {
    border-bottom: none;
}

.compare-card.normal h3 {
    color: var(--gray-500);
}

.compare-card.better {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: var(--primary);
}

.compare-card.better h3 {
    color: var(--primary);
}

.compare-vs {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-400);
}

/* 核心优势 */
.features-section {
    margin: 60px 0;
}

.features-section h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.feature-card p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
}

/* 工作流程 */
.flow-section {
    margin: 60px 0;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.flow-section h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.flow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 160px;
}

.step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--gray-800);
}

.step-content p {
    font-size: 13px;
    color: var(--gray-500);
}

.flow-arrow {
    font-size: 24px;
    color: var(--gray-300);
    margin-top: 16px;
}

/* CTA */
.cta-section {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-light), white);
    border-radius: var(--radius-lg);
    margin-top: 40px;
}

.cta-section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-800);
}

.cta-section p {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .compare-section {
        flex-direction: column;
    }
    .compare-vs {
        justify-content: center;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .flow-steps {
        flex-direction: column;
        align-items: center;
    }
    .flow-arrow {
        transform: rotate(90deg);
    }
}

/* ==================== Toast ==================== */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ==================== 加载 ==================== */

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-400);
}

.error-text {
    text-align: center;
    padding: 40px;
    color: var(--danger);
}

/* ==================== 响应�?==================== */

@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .draft-header h1 {
        font-size: 24px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .preview-actions .btn {
        flex: 1;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card.full-width {
        grid-column: span 1;
    }
}


/* ==================== ����׷�ʵ��� ==================== */

#question-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

#question-modal .smart-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

#question-modal .smart-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 460px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    margin: 20px;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#question-modal .smart-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#question-modal .smart-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#question-modal .smart-ai-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

#question-modal .smart-header h2 {
    color: white;
    font-size: 18px;
    margin: 0;
}

#question-modal .smart-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-modal .smart-progress {
    padding: 16px 20px;
    background: #f9fafb;
    flex-shrink: 0;
}

#question-modal .progress-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#question-modal .progress-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s;
}

#question-modal .progress-dots .dot.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: scale(1.2);
}

#question-modal .smart-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
}

#question-modal .smart-footer {
    padding: 18px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    background: white;
}

#question-modal .btn-skip {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
}

#question-modal .btn-prev {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

#question-modal .btn-next {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

#question-modal .btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ����������ʽ */
#question-modal .step-header {
    text-align: center;
    margin-bottom: 20px;
}

#question-modal .step-header h3 {
    font-size: 17px;
    margin: 0 0 6px;
    color: #1e293b;
}

#question-modal .step-header .step-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

#question-modal .optional-tag {
    background: #fef3c7;
    color: #d97706;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

#question-modal .doc-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#question-modal .doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#question-modal .doc-card:hover {
    border-color: #8b5cf6;
}

#question-modal .doc-card.selected {
    border-color: #7c3aed;
    background: #faf5ff;
}

#question-modal .doc-card .check {
    display: none;
    width: 22px;
    height: 22px;
    background: #7c3aed;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    align-items: center;
    justify-content: center;
}

#question-modal .doc-card.selected .check {
    display: flex;
}

#question-modal .doc-card .icon {
    font-size: 26px;
}

#question-modal .doc-card .name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
}

#question-modal .choice-group {
    margin-bottom: 16px;
}

#question-modal .choice-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

#question-modal .choice-btns {
    display: flex;
    gap: 10px;
}

#question-modal .choice-btn {
    flex: 1;
    padding: 14px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

#question-modal .choice-btn:hover {
    border-color: #8b5cf6;
}

#question-modal .choice-btn.selected {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #5b21b6;
}

#question-modal .input-group {
    margin-bottom: 14px;
}

#question-modal .input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#question-modal .input-group label .optional {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

#question-modal .input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

#question-modal .input-group input:focus {
    outline: none;
    border-color: #7c3aed;
}

/* 智能追问样式 */
.smart-questions-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.smart-question {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.smart-question:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.smart-question .question-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.smart-question .q-num {
    color: #7c3aed;
    font-weight: 700;
}

.smart-question .question-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 24px;
}

.smart-question .q-option {
    padding: 10px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
    position: relative;
}

.smart-question .q-option:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.smart-question .q-option.selected {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #5b21b6;
    font-weight: 500;
}

.smart-question .q-option .recommend {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #7c3aed;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.smart-question .q-option.custom-option {
    color: #6b7280;
    font-style: italic;
}

.smart-question .custom-input {
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    margin-left: 0;
}

.smart-question .custom-input:focus {
    outline: none;
    border-color: #7c3aed;
}

.smart-question .q-text-input {
    width: 100%;
    margin-left: 24px;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.smart-question .q-text-input:focus {
    outline: none;
    border-color: #7c3aed;
}

/* 合同审查样式 */
.review-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 30px;
}

.review-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.review-header p {
    font-size: 16px;
    opacity: 0.9;
}

.review-upload {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.upload-area {
    text-align: center;
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 15px;
}

.upload-or {
    margin: 15px;
    color: #999;
}

.contract-textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    margin-top: 15px;
}

.contract-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.review-result {
    margin-top: 30px;
}

.review-container {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.review-original {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.review-original-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-original-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.suggestion-count {
    background: #fee2e2;
    color: #dc2626;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.review-original-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.8;
}

.highlight-text {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
}

.highlight-text.active {
    background: #fde047;
}

.highlight-text.accepted {
    background: #bbf7d0;
    text-decoration: none;
}

.review-suggestions {
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.review-suggestions-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-suggestions-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.review-suggestions-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.suggestion-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid #e5e7eb;
}

.suggestion-item.high-risk {
    border-left-color: #dc2626;
}

.suggestion-item.medium-risk {
    border-left-color: #f59e0b;
}

.suggestion-item.low-risk {
    border-left-color: #22c55e;
}

.suggestion-item.processed {
    opacity: 0.5;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.risk-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.risk-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.risk-badge.low {
    background: #dcfce7;
    color: #16a34a;
}

.suggestion-content {
    margin-bottom: 12px;
}

.suggestion-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.suggestion-original {
    color: #dc2626;
    text-decoration: line-through;
    font-size: 13px;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: #fef2f2;
    border-radius: 4px;
}

.suggestion-new {
    color: #16a34a;
    font-size: 13px;
    padding: 4px 8px;
    background: #f0fdf4;
    border-radius: 4px;
}

.suggestion-reason {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    font-style: italic;
}

.suggestion-actions {
    display: flex;
    gap: 8px;
}

.suggestion-actions button {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accept {
    background: #16a34a;
    color: white;
}

.btn-accept:hover {
    background: #15803d;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-ignore {
    background: #e5e7eb;
    color: #4b5563;
}

.btn-ignore:hover {
    background: #d1d5db;
}

.suggestion-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.suggestion-status.accepted {
    background: #dcfce7;
    color: #16a34a;
}

.suggestion-status.ignored {
    background: #f3f4f6;
    color: #6b7280;
}

.suggestion-status.modified {
    background: #dbeafe;
    color: #2563eb;
}

.review-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

/* 修改建议弹窗 */
.edit-suggestion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.edit-suggestion-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
}

.edit-suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.edit-suggestion-header h3 {
    font-size: 18px;
}

.edit-suggestion-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.edit-suggestion-body {
    margin-bottom: 20px;
}

.edit-suggestion-body label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.edit-suggestion-body textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
}

.edit-suggestion-body textarea:focus {
    outline: none;
    border-color: #667eea;
}

.edit-suggestion-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 900px) {
    .review-container {
        flex-direction: column;
    }
    
    .review-suggestions {
        width: 100%;
    }
}

/* 关于法壮壮页面布局 */
.about-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.about-nav {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 90px;
}

.about-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    color: var(--gray-600);
    transition: all 0.2s;
    margin-bottom: 4px;
}

.about-nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.about-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.about-nav-item .nav-icon {
    font-size: 20px;
}

.about-main {
    flex: 1;
    min-width: 0;
}

.about-content {
    display: none;
}

.about-content.active {
    display: block;
}

@media (max-width: 768px) {
    .about-layout {
        flex-direction: column;
    }
    
    .about-sidebar {
        width: 100%;
    }
    
    .about-nav {
        display: flex;
        overflow-x: auto;
        position: static;
        gap: 8px;
        padding: 8px;
    }
    
    .about-nav-item {
        flex-shrink: 0;
        padding: 10px 16px;
    }
    
    .about-nav-item .nav-icon {
        display: none;
    }
}

/* ==================== 移动端适配 ==================== */

/* 汉堡菜单按钮 */
.nav-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius);
}

.nav-menu-btn:hover {
    background: var(--gray-100);
}

/* 移动端导航展开状态 */
.nav-tabs.mobile-open {
    display: flex !important;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 8px 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
    z-index: 99;
}

.nav-tabs.mobile-open .nav-tab {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border-radius: var(--radius);
}

.nav-user.mobile-open {
    display: flex !important;
    position: absolute;
    top: calc(70px + 4 * 48px + 16px);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
    z-index: 99;
}

/* 手机端响应式 */
@media (max-width: 600px) {
    /* 导航栏 */
    .navbar {
        padding: 0 16px;
        position: relative;
    }
    
    .nav-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-tabs {
        display: none;
    }
    
    .nav-user {
        display: none;
    }
    
    .brand-name {
        font-size: 18px;
    }
    
    /* 主内容 */
    .main-content {
        padding: 16px;
    }
    
    /* 标题 */
    .draft-header h1 {
        font-size: 22px;
    }
    
    .draft-header p {
        font-size: 14px;
    }
    
    /* 卡片 */
    .draft-card {
        padding: 20px;
    }
    
    .case-input {
        min-height: 120px;
        font-size: 14px;
    }
    
    /* 热门标签 */
    .hot-types {
        flex-wrap: wrap;
    }
    
    .type-tag {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    /* 文书预览 */
    .preview-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .preview-header h2 {
        font-size: 16px;
    }
    
    .edit-hint {
        display: none;
    }
    
    .preview-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .preview-actions .btn {
        flex: 1 1 calc(50% - 4px);
        font-size: 13px;
        padding: 8px 12px;
    }
    
    /* Quill编辑器 */
    #preview-content {
        min-height: 300px;
        font-size: 14px;
    }
    
    #preview-content .ql-editor {
        padding: 20px;
    }
    
    #editor-toolbar {
        overflow-x: auto;
        padding: 8px 12px;
    }
    
    /* 关于页面 */
    .about-hero h1 {
        font-size: 24px;
    }
    
    .about-hero p {
        font-size: 15px;
    }
    
    .compare-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .compare-vs {
        justify-content: center;
        padding: 8px 0;
    }
    
    .compare-card {
        padding: 20px;
    }
    
    .compare-card h3 {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .feature-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .feature-card h3 {
        font-size: 14px;
    }
    
    .feature-card p {
        font-size: 12px;
    }
    
    .flow-section {
        padding: 24px 16px;
    }
    
    .flow-steps {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .flow-step {
        flex: none;
    }
    
    .step-content h4 {
        font-size: 14px;
    }
    
    .step-content p {
        font-size: 12px;
    }
    
    .cta-section {
        padding: 40px 20px;
    }
    
    .cta-section h2 {
        font-size: 22px;
    }
    
    /* 诊断结果 */
    .diagnose-result {
        padding: 16px;
    }
    
    .win-rate-section {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        text-align: center;
    }
    
    .win-rate-number {
        font-size: 42px;
    }
    
    .section-title {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .section-content {
        padding: 16px;
        font-size: 13px;
    }
    
    .recommend-btns {
        flex-direction: column;
    }
    
    /* 登录弹窗 */
    .auth-modal-content {
        margin: 10px;
        padding: 24px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* 智能追问弹窗 */
    #question-modal .smart-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    #question-modal .smart-body {
        padding: 16px;
    }
    
    #question-modal .smart-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    #question-modal .btn-next,
    #question-modal .btn-prev,
    #question-modal .btn-skip {
        flex: 1;
        min-width: 80px;
    }
    
    #question-modal .doc-cards {
        gap: 8px;
    }
    
    #question-modal .doc-card {
        padding: 12px;
    }
    
    #question-modal .doc-card .icon {
        font-size: 22px;
    }
    
    #question-modal .doc-card .name {
        font-size: 14px;
    }
    
    .smart-question .question-options {
        flex-direction: column;
        gap: 8px;
        margin-left: 0;
    }
    
    .smart-question .q-option {
        width: 100%;
        text-align: center;
    }
    
    .smart-question .q-text-input {
        margin-left: 0;
    }
    
    /* 合同审查 */
    .review-columns {
        flex-direction: column;
    }
    
    .review-editor-panel,
    .review-suggestions-panel {
        width: 100%;
    }
    
    .review-toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .review-options {
        padding: 12px;
    }
    
    .review-strictness {
        gap: 8px;
    }
    
    .strictness-option {
        padding: 10px;
    }
    
    .strictness-desc {
        font-size: 11px;
    }
    
    .review-input-area {
        padding: 16px;
    }
    
    .review-textarea {
        min-height: 150px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-actions .btn {
        flex: 1 1 100%;
    }
    
    .type-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}
