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

:root {
    --primary: #8B4513;
    --primary-light: #A0522D;
    --primary-dark: #654321;
    --bg: #EDEDED;
    --bg-card: #FFFFFF;
    --text: #3E2723;
    --text-light: #6D4C41;
    --text-muted: #8D6E63;
    --border: #D7CCC8;
    --success: #4CAF50;
    --danger: #E53935;
    --wechat-green: #07C160;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
}

html {
    font-size: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ==================== 顶部栏 ==================== */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
}

.top-bar-title {
    flex: 1;
    text-align: center;
}

.top-bar-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.8rem;
}

.user-badge:hover {
    background: rgba(255,255,255,0.3);
}

.user-avatar {
    font-size: 1.1rem;
}

.user-name {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-bar-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.top-bar-menu:active {
    background: rgba(255,255,255,0.2);
}

/* ==================== 设置菜单 ==================== */
.settings-menu {
    position: fixed;
    top: 52px;
    right: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    overflow: hidden;
    min-width: 160px;
}

.settings-item {
    padding: 14px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.settings-item:active {
    background: #f5f5f5;
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 6px rgba(0,0,0,0.08);
    z-index: 100;
    height: 60px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 16px;
    border: none;
    background: none;
    color: #999;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 56px;
}

.nav-item .icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--primary);
    font-weight: 600;
}

/* ==================== 页面容器 ==================== */
.page {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 60px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page.active {
    display: flex;
    flex-direction: column;
}

/* 登录页面特殊布局 */
#page-login {
    top: 0;
    bottom: 0;
    background: var(--bg);
    overflow-y: auto;
    display: none;
}

#page-login.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 非聊天页面 */
#page-autobiography,
#page-profile,
#page-admin {
    overflow-y: auto;
    background: var(--bg);
}

/* 页面头部栏 */
.page-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn-inline {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    font-family: inherit;
}

/* ==================== 登录页面 ==================== */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    width: 100%;
}

.login-logo {
    font-size: 4rem;
    margin-bottom: 12px;
}

.login-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f5f0eb;
    border-radius: var(--radius);
    padding: 4px;
}

.login-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-family: inherit;
}

.login-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.login-hint {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
}

.login-links a:hover {
    text-decoration: underline;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input-lg {
    padding: 14px 18px;
    font-size: 1.1rem;
}

.code-row {
    display: flex;
    gap: 12px;
}

.code-row .form-input {
    flex: 1;
}

.btn-send-code {
    white-space: nowrap;
    min-width: 120px;
    padding: 12px 16px;
    font-size: 0.9rem;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 52px;
    font-family: inherit;
}

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

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

.btn-primary:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 1.2rem;
    min-height: 56px;
}

/* ==================== 对话主页面（微信风格） ==================== */
.chat-page {
    flex-direction: column;
    background: var(--bg);
}

.chat-page.active {
    display: flex;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 8px;
    background: var(--bg);
}

.chat-messages-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    justify-content: flex-end;
}

/* ==================== 欢迎消息 ==================== */
.msg-welcome {
    text-align: center;
    padding: 60px 20px 40px;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.welcome-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.welcome-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ==================== 聊天气泡 ==================== */
.msg-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 82%;
    animation: msgIn 0.25s ease;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-row.msg-left {
    align-self: flex-start;
}

.msg-row.msg-right {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-row.msg-center {
    align-self: center;
    max-width: 90%;
}

.msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: #E8E0D8;
}

.msg-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.msg-bubble {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
    position: relative;
}

/* 左侧气泡（系统消息） */
.msg-left .msg-bubble {
    background: white;
    border-top-left-radius: 2px;
}

/* 右侧气泡（用户消息） */
.msg-right .msg-bubble {
    background: #95EC69;
    border-top-right-radius: 2px;
}

.msg-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.msg-text {
    word-break: break-word;
}

.msg-mood {
    font-size: 0.8rem;
    color: #3A7A28;
    margin-bottom: 2px;
}

.msg-time {
    font-size: 0.7rem;
    color: #B0B0B0;
    margin-top: 4px;
    padding: 0 4px;
}

.msg-right .msg-time {
    text-align: right;
}

/* 系统通知（居中） */
.msg-system-text {
    background: rgba(0,0,0,0.06);
    color: #999;
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 12px;
}

/* ==================== 语音消息 ==================== */
.msg-voice {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 110px;
    padding: 2px 0;
}

.msg-voice .voice-icon {
    font-size: 1.2rem;
}

.msg-voice .voice-play-btn {
    margin-left: auto;
}

.msg-voice-transcript {
    font-size: 0.82rem;
    color: #666;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.msg-right .msg-voice-transcript {
    color: #3A7A28;
    border-top-color: rgba(0,0,0,0.06);
}

/* ==================== 文件消息 ==================== */
.msg-file {
    display: flex;
    align-items: center;
    gap: 10px;
}

.msg-file .file-icon {
    font-size: 2rem;
}

.msg-file .file-info {
    flex: 1;
    min-width: 0;
}

.msg-file .file-name {
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-all;
}

.msg-file .file-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

/* ==================== 图片消息 ==================== */
.msg-image {
    max-width: 200px;
    border-radius: 4px;
    cursor: pointer;
    display: block;
}

.msg-caption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* ==================== 图片全屏预览 ==================== */
.image-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.image-fullscreen-overlay img {
    max-width: 95vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.image-caption-fullscreen {
    color: white;
    font-size: 1rem;
    margin-top: 12px;
    text-align: center;
}

/* ==================== 底部输入栏 ==================== */
.chat-input-bar {
    flex-shrink: 0;
    background: #F7F7F7;
    border-top: 1px solid #D9D9D9;
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 50;
}

.input-bar-main {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.input-bar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}

.input-bar-btn:active {
    background: #E0E0E0;
}

.voice-toggle {
    font-size: 1.4rem;
}

.voice-toggle.active {
    color: var(--primary);
}

.attach-toggle {
    font-size: 1.6rem;
    font-weight: 300;
    color: #666;
}

.send-btn {
    background: var(--wechat-green);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    width: auto;
    padding: 0 12px;
    border-radius: 6px;
    font-family: inherit;
    min-width: 50px;
}

.send-btn:active {
    background: #06AD56;
}

/* 文字输入区 */
.input-bar-textarea-wrap {
    flex: 1;
    min-height: 36px;
    max-height: 120px;
    display: flex;
    align-items: center;
}

.input-bar-textarea {
    width: 100%;
    min-height: 36px;
    max-height: 120px;
    padding: 7px 12px;
    border: 1px solid #D9D9D9;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    resize: none;
    background: white;
    color: #333;
    outline: none;
    overflow-y: auto;
}

.input-bar-textarea::placeholder {
    color: #B0B0B0;
}

/* 语音按钮（按住说话） */
.input-bar-voice-wrap {
    flex: 1;
}

.voice-hold-btn {
    width: 100%;
    height: 36px;
    border: none;
    background: white;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.voice-hold-btn:active,
.voice-hold-btn.recording {
    background: #E0E0E0;
}

/* ==================== 附件面板 ==================== */
.attach-panel {
    display: flex;
    gap: 16px;
    padding: 14px 8px 6px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.attach-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
    min-width: 60px;
}

.attach-item:active {
    background: #E0E0E0;
}

.attach-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attach-label {
    font-size: 0.72rem;
    color: #666;
}

/* ==================== 心情面板 ==================== */
.mood-panel {
    padding: 10px 8px 4px;
}

.mood-panel-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mood-panel-btn {
    padding: 8px 14px;
    border: 1px solid #D9D9D9;
    border-radius: 20px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.mood-panel-btn:active {
    background: #FFF3E0;
    border-color: var(--primary);
}

/* ==================== 录音指示 ==================== */
.chat-recording-indicator {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: #FFEBEE;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 60;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==================== 个人资料 ==================== */
.profile-card {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.profile-avatar {
    margin-bottom: 12px;
}

.avatar-icon {
    font-size: 4rem;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-role {
    font-size: 0.95rem;
    opacity: 0.85;
}

.profile-form {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* ==================== 自传样式 ==================== */
.autobiography-section {
    margin-bottom: 32px;
}

.chapter {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.chapter h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.chapter-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.chapter-image {
    margin: 20px 0;
    text-align: center;
}

.chapter-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.chapter-image img:hover {
    transform: scale(1.02);
}

.chapter-image-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.export-section {
    text-align: center;
    padding: 20px 0;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
}

.empty-state .message {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state .hint {
    font-size: 0.95rem;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading .text {
    margin-top: 16px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==================== 管理后台 ==================== */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.admin-tab.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #FFF8F0;
}

/* ==================== 提示消息 ==================== */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow);
    max-width: 85vw;
}

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

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

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== 安全区域适配 ==================== */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }
}

/* ==================== 响应式 ==================== */
@media (max-width: 400px) {
    .msg-row {
        max-width: 88%;
    }
    .attach-panel {
        gap: 12px;
    }
    .attach-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    .code-row {
        flex-direction: column;
    }
    .btn-send-code {
        width: 100%;
    }
}

/* ==================== 我的记录页面 ==================== */
#page-records {
    overflow-y: auto;
    background: var(--bg);
}

.records-filter-bar {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.records-filter-chip {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fafafa;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.records-filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.records-list {
    padding: 16px;
    flex: 1;
}

.records-date-group {
    margin-bottom: 20px;
}

.records-date-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    padding-left: 4px;
    letter-spacing: 1px;
}

.record-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.record-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.record-type-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f3e9dc;
    color: var(--primary);
    flex-shrink: 0;
}

.record-card-time {
    font-size: 0.75rem;
    color: #999;
    margin-left: auto;
    flex-shrink: 0;
}

.record-question {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 6px;
    line-height: 1.5;
}

.record-content {
    font-size: 0.92rem;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}

.record-content img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
}

.record-voice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3e9dc;
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--primary);
    font-size: 0.9rem;
}

.record-file {
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-file-icon {
    font-size: 1.6rem;
}

.record-file-name {
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-all;
}

.record-file-meta {
    font-size: 0.75rem;
    color: #999;
}

.records-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* ==================== 自传更新提示条 ==================== */
.autobiography-update-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdf6ec;
    border: 1px solid #f0dcb8;
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: var(--primary-dark);
    line-height: 1.5;
}

.autobiography-update-tip button {
    margin-left: auto;
    flex-shrink: 0;
}

/* ==================== 自传统计条 ==================== */
.autobiography-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #666;
}

.autobiography-stats b {
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.autobiography-stats .divider {
    color: #ddd;
}

/* ==================== 分享弹窗 ==================== */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-modal {
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 24px 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.share-modal h3 {
    margin-bottom: 6px;
    color: var(--primary);
}

.share-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.share-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f3ec;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.share-url-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--primary-dark);
    word-break: break-all;
    line-height: 1.4;
}

.share-qrcode {
    text-align: center;
    margin-bottom: 14px;
}

.share-qrcode img {
    width: 180px;
    height: 180px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.share-wechat-tip {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.6;
    background: #f7f3ec;
    border-radius: 8px;
    padding: 10px;
}

.share-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    padding: 4px;
}
