* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2563eb;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-user { color: #64748b; font-size: 0.9rem; font-weight: 500; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary { 
    background: #2563eb; 
    color: #fff; 
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
}
.btn-primary:hover { 
    background: #1d4ed8; 
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}
.btn-outline { 
    background: #fff; 
    color: #475569; 
    border: 1px solid #e2e8f0; 
}
.btn-outline:hover { 
    background: #f8fafc; 
    border-color: #cbd5e1;
}
.btn-block { width: 100%; }

/* 认证页容器 */
.auth-container {
    max-width: 420px;
    margin: 4rem auto;
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}
.auth-container h2 { 
    text-align: center; 
    margin-bottom: 2rem; 
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
}

/* 登录 Tab 切换 */
.auth-tabs { 
    display: flex; 
    margin-bottom: 2rem; 
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
}
.auth-tab {
    flex: 1; 
    text-align: center; 
    padding: 0.625rem 0; 
    cursor: pointer;
    font-size: 0.875rem; 
    color: #64748b; 
    font-weight: 600;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
}
.auth-tab.active { 
    background: #fff;
    color: #2563eb; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* 表单控件 */
.form-group { margin-bottom: 1.25rem; }
.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-size: 0.875rem; 
    font-weight: 600;
    color: #475569; 
}
.form-group input {
    width: 100%;
    height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.form-group input:focus { 
    outline: none; 
    border-color: #2563eb; 
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); 
}

/* 手机号输入 */
.phone-input-wrap { display: flex; }
.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}
.phone-input-wrap input { border-radius: 0 8px 8px 0; }

/* 链接与提示 */
.auth-link { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: #64748b; }
.auth-link a { color: #2563eb; font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.error-msg { 
    background: #fef2f2; 
    color: #dc2626; 
    padding: 0.875rem; 
    border-radius: 10px; 
    margin-bottom: 1.5rem; 
    font-size: 0.875rem; 
    border: 1px solid #fee2e2;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 首页 Hero */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #f5f3ff 100%);
    text-align: center;
    padding: 5rem 1.5rem 4rem;
}
.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 99px;
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}
.hero-sub {
    font-size: 1.125rem;
    color: #475569;
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}
.hero-sub strong {
    color: #1e293b;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}
.hero-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* 通用 Section */
.section {
    padding: 4rem 1.5rem;
}
.section-alt {
    background: #f8fafc;
}
.section-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.section-desc {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}
.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2rem 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.feature-card p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.7;
}

/* Steps */
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}
.step {
    flex: 1;
    max-width: 240px;
    text-align: center;
}
.step-num {
    width: 48px;
    height: 48px;
    background: #2563eb;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.step p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}
.step-arrow {
    font-size: 1.5rem;
    color: #cbd5e1;
    margin-top: 0.75rem;
    flex-shrink: 0;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    text-align: center;
    padding: 4rem 1.5rem;
}
.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
}
.cta-desc {
    font-size: 1rem;
    color: #bfdbfe;
    margin-bottom: 2rem;
}
.cta-section .btn-primary {
    background: #fff;
    color: #2563eb;
    font-weight: 700;
}
.cta-section .btn-primary:hover {
    background: #f0f9ff;
    transform: translateY(-1px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #f1f5f9;
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
}
.footer-brand {
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.footer-copy {
    color: #94a3b8;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
}

/* 响应式 - 首页 */
@media (max-width: 768px) {
    .hero { padding: 3rem 1.25rem 2.5rem; }
    .hero h1 { font-size: 1.875rem; }
    .hero-sub { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .features-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .steps { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); }
}

/* 容器 */
.container { max-width: 1024px; margin: 2rem auto; padding: 0 1.5rem; flex: 1; width: 100%; }

/* ===== Dashboard ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* 上传区域 */
.upload-section h2,
.history-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.upload-icon {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}
.upload-area:hover .upload-icon { color: #2563eb; }
.upload-area:hover {
    border-color: #2563eb;
    background: #eff6ff;
}
.upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}
.upload-area.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.upload-hint {
    font-size: 1rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.upload-limit {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* 上传进度 */
.upload-status {
    margin-top: 1rem;
    text-align: center;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 99px;
    width: 0%;
    transition: width 0.3s;
}
#upload-text {
    font-size: 0.875rem;
    color: #64748b;
}

/* 任务错误信息 */
.task-error {
    font-size: 0.78rem;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 4px;
    padding: 3px 8px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 任务按钮组 */
.task-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* 翻译历史 */
/* 翻译历史 */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 12px;
    flex-wrap: wrap;
}
.history-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.history-header-left h2 { margin-bottom: 0; }
.history-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 标题模式切换 */
.title-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 7px;
    padding: 3px;
    gap: 2px;
}
.title-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
}
.title-btn.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 批量操作栏 */
.batch-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.selected-count {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}
.select-all-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    font-weight: 500;
}
.select-all-label input { cursor: pointer; width: 18px; height: 18px; }

/* 任务复选框 */
.task-checkbox {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 4px;
    cursor: pointer;
}
.task-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2563eb;
}
/* 任务名称区域可点击切换勾选 */
.task-info.clickable-info {
    cursor: pointer;
    user-select: none;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.task-list .loading {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
    font-size: 0.9rem;
}
.task-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: box-shadow 0.2s;
    position: relative;
}
.btn-task-delete {
    position: absolute;
    top: 6px; right: 6px;
    background: none; border: none;
    color: #9ca3af; font-size: 18px; cursor: pointer;
    line-height: 1; padding: 2px 5px; border-radius: 4px;
    z-index: 1;
}
.btn-task-delete:hover { color: #ef4444; background: #fee2e2; }
.task-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.task-info {
    flex: 1;
    min-width: 0;
}
.task-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}
.task-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    white-space: nowrap;
}
.task-status.status-pending { background: #fef3c7; color: #b45309; }
.task-status.status-translating { background: #dbeafe; color: #1d4ed8; }
.task-status.status-completed { background: #dcfce7; color: #15803d; }
.task-status.status-failed { background: #fee2e2; color: #dc2626; }
.task-actions .btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.875rem;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.875rem;
}

/* 空状态 */
.empty-msg {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
    font-size: 0.9rem;
}

/* 任务内进度条 */
.task-progress-bar {
    width: 120px;
    flex-shrink: 0;
}

/* 下载按钮 */
.btn-success {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.1);
}
.btn-success:hover {
    background: #15803d;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== 下载下拉菜单 ===== */
.dl-dropdown {
    position: relative;
    display: inline-block;
}
.dl-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 200;
    overflow: hidden;
}
.dl-dropdown.open .dl-menu {
    display: block;
}
.dl-menu a {
    display: block;
    padding: 9px 16px;
    color: #334155;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}
.dl-menu a:hover {
    background: #eff6ff;
    color: #2563eb;
}
.dl-menu a + a {
    border-top: 1px solid #f1f5f9;
}

/* ===== 批量下载 Modal ===== */
.batch-dl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.batch-dl-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.batch-dl-modal h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}
.batch-dl-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px;
}
.batch-dl-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}
.batch-dl-opt input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}
.batch-dl-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* ===== 用户下拉菜单 ===== */
.user-dropdown {
    position: relative;
}
.dropdown-trigger {
    cursor: pointer;
    user-select: none;
}
.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 2px;
    transition: transform 0.2s;
}
.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    padding-top: 6px;
    z-index: 200;
}
.dropdown-menu-inner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
}
.user-dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #334155;
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    cursor: pointer;
}
.dropdown-item:hover {
    background: #eff6ff;
    color: #2563eb;
}
.dropdown-item + .dropdown-item {
    border-top: 1px solid #f1f5f9;
}

/* ===== 密码设置 Modal ===== */
.pwd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}
.pwd-modal {
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.pwd-modal h3 {
    margin: 0 0 20px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}
.pwd-form-group {
    margin-bottom: 16px;
}
.pwd-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}
.pwd-form-group input {
    width: 100%;
    height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.pwd-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.pwd-code-row {
    display: flex;
    gap: 8px;
}
.pwd-code-row input {
    flex: 1;
}
.pwd-code-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.pwd-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    border: 1px solid #fee2e2;
    animation: fadeIn 0.3s ease-out;
}
.pwd-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.pwd-modal-actions .btn {
    flex: 1;
}

/* ===== 导航栏社群链接 ===== */
.nav-community-link {
    font-size: 0.8rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: #2563eb;
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
}
.nav-community-link:hover {
    background: #1d4ed8;
    color: #fff;
}
.nav-qr-trigger {
    position: relative;
    font-size: 0.8rem;
    color: #2563eb;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: #eff6ff;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.nav-qr-trigger:hover {
    background: #dbeafe;
    color: #1d4ed8;
}
.nav-qr-popup {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    padding-top: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    text-align: center;
    min-width: 160px;
}
.nav-qr-popup::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 10px;
}
.nav-qr-trigger:hover .nav-qr-popup {
    display: block;
}
.qr-image-sm {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.5rem;
}
.qr-placeholder-sm {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    margin: 0 auto 0.5rem;
}

/* ===== 社群区块（首页） ===== */
.community-block {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.community-info {
    text-align: left;
}
.community-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #1e293b;
}
.community-info p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #64748b;
}
.community-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.community-perks li {
    font-size: 0.875rem;
    color: #475569;
    padding: 0.25rem 0;
}
.community-perks li::before {
    content: "✓ ";
    color: #16a34a;
    font-weight: 700;
}
.community-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.qr-image {
    width: 128px;
    height: 128px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
}
.qr-placeholder {
    width: 128px;
    height: 128px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}
.qr-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}
.qq-group-link {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}
.qq-group-link:hover {
    text-decoration: underline;
}

/* ===== 社群提示条（Dashboard） ===== */
.community-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.community-banner span {
    font-size: 0.875rem;
    color: #1e40af;
}
.community-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ===== QQ 群弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}
.modal-content {
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}
.modal-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #1e293b;
}
.modal-content p {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #64748b;
}
.modal-content .qr-image {
    margin-bottom: 0.75rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.modal-content .qr-placeholder {
    margin: 0 auto 0.75rem;
}
.modal-content .qq-group-link {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: #475569;
}

@media (max-width: 640px) {
    .community-block {
        flex-direction: column;
        text-align: center;
    }
    .community-info {
        text-align: center;
    }
    .community-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== 访客上传区块 ===== */
.guest-upload-box {
    margin: 28px auto 0;
    max-width: 560px;
}
.guest-upload-area {
    border: 2px dashed #a5b4fc;
    border-radius: 16px;
    padding: 36px 24px;
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.guest-upload-area:hover,
.guest-upload-area.dragover {
    border-color: #6366f1;
    background: rgba(238,242,255,0.9);
}
.guest-upload-area .upload-icon {
    width: 48px;
    height: 48px;
    color: #6366f1;
}
.guest-upload-area .upload-hint {
    margin: 0;
    font-size: 1rem;
    color: #334155;
}
.guest-upload-area .upload-limit {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}
.guest-upload-status {
    padding: 24px;
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    text-align: center;
}
.guest-upload-status .progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 10px;
}
.guest-upload-status .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 99px;
    transition: width 0.4s;
}

/* ===== 访客 Banner ===== */
.guest-banner {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.guest-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.guest-banner-text strong {
    font-size: 1rem;
}
.guest-banner-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}
.guest-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.guest-banner .btn-primary {
    background: white;
    color: #6366f1;
}
.guest-banner .btn-primary:hover {
    background: #f1f5f9;
}
.guest-banner .btn-outline {
    border-color: rgba(255,255,255,0.6);
    color: white;
}
.guest-banner .btn-outline:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== 额度用尽弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-box h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #1e293b;
}
.modal-box p {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== guest_result 页面 ===== */
.guest-result-wrap {
    max-width: 680px;
    margin: 48px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.guest-status-card {
    padding: 32px;
}
.guest-filename {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 20px;
    word-break: break-all;
}
.guest-status-text {
    margin: 10px 0 0;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
}
.guest-stay-hint {
    margin: 12px 0 0;
    font-size: 0.82rem;
    color: #f59e0b;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 12px;
}

/* Banner 按钮修复 —— 让"已有账号"在紫色背景上可见 */
.guest-banner-reg {
    background: white !important;
    color: #6366f1 !important;
    border: none !important;
}
.guest-banner-login {
    background: transparent !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.55) !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.guest-banner-login:hover {
    background: rgba(255,255,255,0.15) !important;
}

/* Reader 访客 Banner */
.guest-reader-banner {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.guest-reader-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.guest-reader-banner-text strong { font-size: 0.92rem; }
.guest-reader-banner-text span { font-size: 0.8rem; opacity: 0.9; }
.guest-reader-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Reader 访客模式：顶部偏移减去 banner 高度 */
.reader-app-guest {
    top: 0;  /* banner 在 .reader-app 外部，不需要额外偏移 */
}
