/**
 * 易医移动端样式 - 完全匹配设计图
 * 更新时间：2026-01-21
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-gradient: linear-gradient(180deg, #E8EAFF 0%, #F0E6FF 30%, #E8F0FF 60%, #F5F5FF 100%);
    --card-bg: #FFFFFF;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-gradient);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 主容器 */
.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
}

/* ========== 顶部导航栏 ========== */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    position: relative;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.5);
}

.menu-btn {
    width: 36px;
    height: 36px;
}

.app-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.smart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.smart-btn:active {
    background: rgba(255, 255, 255, 1);
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
}

/* ========== 问候区域 ========== */
.greeting-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0 24px;
}

.greeting-text {
    flex: 1;
    padding-top: 16px;
}

.greeting-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.sparkle {
    font-size: 22px;
}

.greeting-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.doctor-avatar {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    margin-right: -10px;
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========== 健康数据卡片 ========== */
.health-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

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

.health-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-bar {
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.title-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.update-time {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 4px;
}

.collapse-btn {
    width: 36px;
    height: 36px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.health-content {
    display: flex;
    gap: 20px;
}

.health-item {
    flex: 1;
}

.health-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.health-chart {
    height: 40px;
    margin: 8px 0;
}

.health-chart svg {
    width: 100%;
    height: 100%;
}

.health-label {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.health-label.clickable {
    cursor: pointer;
}

.status-normal {
    color: var(--primary);
}

.status-action {
    color: var(--primary);
}

.health-divider {
    width: 1px;
    background: #E5E7EB;
    margin: 0 10px;
}

/* ========== 快捷问题列表 ========== */
.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

.question-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.question-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.question-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.question-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.question-arrow {
    color: var(--primary);
    flex-shrink: 0;
}

/* ========== 底部功能栏 ========== */
.bottom-bar {
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 16px 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.function-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.function-row::-webkit-scrollbar {
    display: none;
}

.func-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #F3F4F6;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.func-btn:active {
    transform: scale(0.98);
}

.func-btn.active {
    background: var(--card-bg);
    border: 1px solid #E5E7EB;
}

.func-btn svg {
    flex-shrink: 0;
}

/* 打电话按钮特殊样式 */
.func-btn.omni-call-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.func-btn.omni-call-btn:active {
    background: linear-gradient(135deg, #388E3C 0%, #689F38 100%);
}

.func-btn.omni-call-btn svg {
    stroke: white;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F3F4F6;
    border-radius: 24px;
    padding: 6px 8px;
}

.main-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 10px 4px;
    outline: none;
    color: var(--text-primary);
}

.main-input::placeholder {
    color: var(--text-muted);
}

.send-btn-round {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
    transition: all 0.2s;
}

.send-btn-round:active {
    transform: scale(0.95);
}

.send-btn-round svg {
    margin-left: 2px;
}

.input-icon-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.input-icon-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

.input-icon-btn.camera-btn {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.input-placeholder {
    flex: 1;
    padding: 10px 0;
    cursor: pointer;
}

.privacy-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== 输入弹窗 ========== */
.input-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.input-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.input-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.input-modal-content textarea {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    resize: none;
    outline: none;
    font-family: inherit;
}

.input-modal-content textarea:focus {
    border-color: var(--primary);
}

.input-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.cancel-btn {
    flex: 1;
    padding: 14px;
    background: #F3F4F6;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.send-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== 聊天页面 ========== */
.chat-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F8F9FF;
    z-index: 100;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: white;
    border-bottom: 1px solid #E5E7EB;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

.chat-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
}

.message-user {
    align-self: flex-end;
}

.message-assistant {
    align-self: flex-start;
}

.message-content {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.message-user .message-content {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-assistant .message-content {
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    background: white;
    border-top: 1px solid #E5E7EB;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    background: #F3F4F6;
}

.chat-input:focus {
    border-color: var(--primary);
    background: white;
}

.send-message-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* ========== 响应式 ========== */
@media (min-width: 480px) {
    .app-container {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    }
}

/* 隐藏滚动条 */
.main-content::-webkit-scrollbar {
    display: none;
}

.main-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ========== 健康状态样式 ========== */
.status-normal {
    color: var(--primary);
}

.status-low {
    color: #F59E0B;
}

.status-high {
    color: #EF4444;
}

.status-warning {
    color: #F59E0B;
}

.status-action {
    color: var(--primary);
}

/* ========== 健康数据输入弹窗 ========== */
.health-input-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.health-modal-content {
    position: relative;
    width: 90%;
    max-width: 340px;
    background: white;
    border-radius: 20px;
    padding: 24px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.health-modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.health-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 20px;
}

.health-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: 600;
    padding: 12px 0;
    outline: none;
    text-align: center;
    color: var(--text-primary);
}

.health-input-group input::placeholder {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
}

.health-unit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.health-modal-actions {
    display: flex;
    gap: 12px;
}

.health-modal-actions .cancel-btn,
.health-modal-actions .send-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.health-modal-actions .cancel-btn {
    background: #F3F4F6;
    color: var(--text-primary);
}

.health-modal-actions .send-btn {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

/* ========== 打字动画指示器 ========== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ========== 内嵌聊天区域 ========== */
.inline-chat {
    background: white;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

/* 全屏聊天容器模式 */
.inline-chat.inline-chat-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    animation: none;
}

/* 全屏模式下的头部 */
.inline-chat-fullscreen .inline-chat-header {
    flex-shrink: 0;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

/* 全屏模式下的消息区域 */
.inline-chat-fullscreen .inline-chat-messages {
    flex: 1;
    max-height: none;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
    scroll-behavior: smooth;
}

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

.inline-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

.chat-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.chat-dot {
    width: 8px;
    height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.clear-chat-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-chat-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.inline-chat-messages {
    min-height: 200px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 头部操作按钮组 */
.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 滚动到底部按钮 */
.scroll-bottom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.scroll-bottom-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.scroll-bottom-btn.visible {
    display: flex;
}

.inline-message {
    display: flex;
    gap: 10px;
    animation: messageIn 0.3s ease-out;
}

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

.inline-message-user {
    flex-direction: row-reverse;
}

.inline-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0F0FF 0%, #E8E8FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.inline-message-user .inline-message-avatar {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.inline-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.inline-message-user .inline-message-content {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.inline-message-assistant .inline-message-content {
    background: #F3F4F6;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

/* 内嵌聊天中的打字动画 */
.inline-message-assistant .typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.inline-message-assistant .typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

/* AI思考中提示样式 */
.ai-thinking-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.ai-thinking-indicator .typing-indicator {
    padding: 0;
}

.ai-thinking-indicator .thinking-text {
    font-size: 14px;
    color: #666;
    animation: textPulse 1.5s infinite ease-in-out;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========== 附件菜单 ========== */
.attach-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.attach-menu {
    position: fixed;
    bottom: calc(120px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: menuSlideUp 0.3s ease;
}

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

.attach-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s;
}

.attach-menu-item:active {
    background: #F3F4F6;
}

.attach-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attach-menu-item span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========== 文件预览区域 ========== */
.file-preview-area {
    padding: 12px 8px;
    border-top: 1px solid #E5E7EB;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.file-preview-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
}

.file-preview-list::-webkit-scrollbar {
    display: none;
}

.file-preview-item {
    position: relative;
    flex-shrink: 0;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preview-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.preview-doc {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.preview-doc .doc-ext {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
}

.remove-file-btn {
    position: absolute;
    top: -6px;
    right: 0;
    width: 22px;
    height: 22px;
    background: #EF4444;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    transition: transform 0.2s;
}

.remove-file-btn:active {
    transform: scale(0.9);
}

.file-name {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 消息中的文件显示 ========== */
.message-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:active {
    transform: scale(0.98);
}

.message-doc {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.inline-message-user .message-doc {
    background: rgba(255, 255, 255, 0.2);
}

.inline-message-assistant .message-doc {
    background: rgba(99, 102, 241, 0.1);
}

.doc-icon {
    font-size: 18px;
}

/* 相机按钮高亮动画 */
.camera-btn.active {
    animation: cameraPulse 1s ease infinite;
}

@keyframes cameraPulse {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(99, 102, 241, 0.6);
    }
}

/* ========== 诊断结果样式 ========== */
.diagnosis-result {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.diagnosis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

.tongue-result .diagnosis-header {
    background: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
}

.face-result .diagnosis-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.diagnosis-icon {
    font-size: 24px;
}

.diagnosis-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

/* 语音播报指示器 */
.voice-indicator {
    font-size: 16px;
    animation: voicePulse 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes voicePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.diagnosis-score {
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.diagnosis-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    background: #F8F9FA;
}

.metric-item {
    background: white;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-value.highlight {
    color: var(--primary);
}

.diagnosis-analysis,
.diagnosis-suggestions,
.diagnosis-diet,
.diagnosis-organs {
    padding: 16px;
    border-top: 1px solid #E5E7EB;
}

.diagnosis-analysis h4,
.diagnosis-suggestions h4,
.diagnosis-diet h4,
.diagnosis-organs h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.diagnosis-analysis p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.diagnosis-suggestions ul,
.diagnosis-diet ul {
    margin: 0;
    padding-left: 20px;
}

.diagnosis-suggestions li,
.diagnosis-diet li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.organ-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.organ-item {
    background: #F3F4F6;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

.organ-item span:first-child {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 4px;
}

.organ-item span:last-child {
    display: block;
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
}

.diagnosis-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F8F9FA;
    border-top: 1px solid #E5E7EB;
}

.confidence {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.disclaimer {
    font-size: 11px;
    color: #9CA3AF;
}

.diagnosis-loading {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

/* 诊断弹窗 */
.diagnosis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagnosis-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.diagnosis-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

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

.diagnosis-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

.diagnosis-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

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

.diagnosis-modal-body {
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    padding: 20px;
}

/* ========== 个人中心按钮样式 ========== */
.user-center-btn {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 6px 8px !important;
}

.user-center-btn svg {
    stroke: white;
}

/* ========== 个人中心弹窗适配 ========== */
.user-center-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.user-center-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.user-center-container {
    position: relative;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.user-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

.user-center-header h2 {
    margin: 0;
    font-size: 18px;
}

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

.user-center-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 移动端适配 - 导航变为顶部标签栏 */
@media (max-width: 768px) {
    .user-center-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .user-center-layout {
        flex-direction: column;
    }
    
    .user-center-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        border-bottom: 1px solid #E5E7EB;
        padding: 8px;
        gap: 8px;
        background: #F8F9FA;
    }
    
    .user-center-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 12px;
        border-radius: 8px;
        text-decoration: none;
        color: var(--text-secondary);
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 12px;
    }
    
    .user-center-nav-item.active {
        background: var(--primary);
        color: white;
    }
    
    .user-center-nav-item .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .user-center-nav-item .nav-label {
        font-size: 11px;
    }
    
    .user-center-content {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
    }
}

/* PC端样式 */
@media (min-width: 769px) {
    .user-center-nav {
        width: 180px;
        background: #F8F9FA;
        border-right: 1px solid #E5E7EB;
        padding: 16px 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .user-center-nav-item {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        border-radius: 8px;
        text-decoration: none;
        color: var(--text-secondary);
        transition: all 0.2s;
    }
    
    .user-center-nav-item:hover {
        background: #E5E7EB;
    }
    
    .user-center-nav-item.active {
        background: var(--primary);
        color: white;
    }
    
    .user-center-nav-item .nav-icon {
        margin-right: 10px;
        font-size: 18px;
    }
    
    .user-center-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }
}

/* 模块样式 */
.uc-module {
    display: block;
}

.uc-module.hidden {
    display: none;
}

.module-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.module-content {
    background: white;
    border-radius: 12px;
}

/* 病历标签页 */
.medical-record-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.mr-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: #F3F4F6;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

.mr-tab-content {
    display: none;
}

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

/* 病历卡片 */
.medical-record-card {
    background: #F8F9FA;
    border-radius: 12px;
    overflow: hidden;
}

.medical-record-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.medical-record-card .card-header h4 {
    margin: 0;
    font-size: 15px;
}

.record-status {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
}

.medical-record-card .card-body {
    padding: 16px;
}

.completeness-info {
    margin-bottom: 16px;
}

.completeness-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.completeness-bar-small {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.completeness-fill-small {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    border-radius: 4px;
    transition: width 0.3s;
}

.btn-edit-record {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* 电子病历表单弹窗 */
.medical-record-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.medical-record-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.medical-record-container {
    position: relative;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.medical-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.medical-record-title {
    margin: 0;
    font-size: 18px;
}

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

.medical-record-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.completeness-indicator {
    background: #F8F9FA;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.completeness-bar {
    height: 10px;
    background: #E5E7EB;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
}

.completeness-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    border-radius: 5px;
    transition: width 0.3s;
}

.form-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group.required label::after {
    content: ' *';
    color: #EF4444;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #F3F4F6;
    color: var(--text-secondary);
}

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

.empty-cart-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-cart-text {
    font-size: 14px;
}

/* ========== AI回复内容样式 ========== */
.diagnosis-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.diagnosis-content p {
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.diagnosis-content p:last-child {
    margin-bottom: 0;
}

.diagnosis-content br {
    line-height: 1.2;
}

.diagnosis-content .ai-heading {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #E5E7EB;
}

.diagnosis-content .ai-heading:first-child {
    margin-top: 0;
}

.diagnosis-content h3.ai-heading {
    font-size: 16px;
    color: var(--primary);
}

.diagnosis-content h4.ai-heading {
    font-size: 14px;
}

.diagnosis-content .ai-list {
    margin: 6px 0;
    padding-left: 20px;
    list-style: disc;
}

.diagnosis-content .ai-list li {
    margin-bottom: 4px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.diagnosis-content strong {
    color: var(--primary);
    font-weight: 600;
}

/* 紧凑的消息气泡样式 */
.inline-message-bubble {
    line-height: 1.4;
}

.inline-message-bubble p {
    margin: 0 0 6px 0;
}

.inline-message-bubble p:last-child {
    margin-bottom: 0;
}

/* ========== 移动端个人中心新样式 ========== */

/* 默认隐藏移动端专属元素 */
.mobile-uc-main,
.mobile-uc-subpage {
    display: none;
}

/* PC端显示原有布局 */
.user-center-container.pc-only {
    display: flex;
    flex-direction: column;
}

/* 移动端样式 */
@media (max-width: 768px) {
    /* 隐藏PC端布局 */
    .user-center-container.pc-only {
        display: none !important;
    }
    
    /* 隐藏遮罩层（移动端全屏） */
    .user-center-modal .user-center-overlay {
        display: none;
    }
    
    /* 显示移动端主页 */
    .mobile-uc-main {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, #E8EEFF 0%, #F5F7FA 30%, #F5F7FA 100%);
        z-index: 9999;
    }
    
    /* 移动端子页面 */
    .mobile-uc-subpage {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #F5F7FA;
        z-index: 10000;
        flex-direction: column;
    }
    
    .mobile-uc-subpage[style*="display: flex"],
    .mobile-uc-subpage[style*="display:flex"] {
        display: flex !important;
    }
    
    /* 移动端头部 */
    .mobile-uc-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0));
        background: transparent;
        position: relative;
        z-index: 10;
    }
    
    .mobile-uc-subpage .mobile-uc-header {
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-uc-back {
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #333;
        border-radius: 50%;
    }
    
    .mobile-uc-back:active {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .mobile-uc-title {
        font-size: 18px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .mobile-uc-actions {
        display: flex;
        gap: 8px;
    }
    
    .mobile-uc-action-btn {
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #666;
        border-radius: 50%;
    }
    
    .mobile-uc-action-btn:active {
        background: rgba(0, 0, 0, 0.05);
    }
    
    /* 移动端内容区 */
    .mobile-uc-body {
        flex: 1;
        overflow-y: auto;
        padding: 0 16px 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 用户信息卡片 */
    .mobile-uc-profile-card {
        display: flex;
        align-items: center;
        padding: 20px;
        margin-bottom: 16px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.1);
    }
    
    .mobile-uc-avatar {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 16px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 3px;
    }
    
    .mobile-uc-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        background: white;
    }
    
    .mobile-uc-user-info {
        flex: 1;
    }
    
    .mobile-uc-username {
        font-size: 18px;
        font-weight: 600;
        color: #1a1a1a;
        margin-bottom: 4px;
    }
    
    .mobile-uc-subtitle {
        font-size: 13px;
        color: #9CA3AF;
    }
    
    /* 菜单分组 */
    .mobile-uc-menu-group {
        background: white;
        border-radius: 16px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    /* 菜单项 */
    .mobile-uc-menu-item {
        display: flex;
        align-items: center;
        padding: 16px 20px;
        cursor: pointer;
        transition: background 0.2s;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .mobile-uc-menu-item:last-child {
        border-bottom: none;
    }
    
    .mobile-uc-menu-item:active {
        background: #F9FAFB;
    }
    
    .mobile-uc-menu-item .menu-icon {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        margin-right: 14px;
        background: #F3F4F6;
        border-radius: 10px;
    }
    
    .mobile-uc-menu-item .menu-label {
        flex: 1;
        font-size: 15px;
        color: #1a1a1a;
        font-weight: 500;
    }
    
    .mobile-uc-menu-item .menu-value {
        font-size: 14px;
        color: #667eea;
        margin-right: 8px;
    }
    
    .mobile-uc-menu-item .menu-badge {
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        background: #EF4444;
        color: white;
        font-size: 11px;
        font-weight: 600;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 8px;
    }
    
    .mobile-uc-menu-item .menu-arrow {
        color: #D1D5DB;
        display: flex;
        align-items: center;
    }
    
    /* 底部Logo */
    .mobile-uc-footer {
        text-align: center;
        padding: 30px 0 20px;
        color: #D1D5DB;
    }
    
    .mobile-uc-footer .footer-logo {
        font-size: 14px;
        font-weight: 500;
        display: block;
        margin-bottom: 4px;
    }
    
    .mobile-uc-footer .footer-version {
        font-size: 12px;
    }
    
    /* 子页面内容区 */
    .mobile-uc-subpage-content {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
        background: #F5F7FA;
    }
    
    /* 子页面模块卡片 */
    .mobile-subpage-card {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .mobile-subpage-card .card-title {
        font-size: 16px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0 0 12px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    /* 账号安全表单在子页面中的样式 */
    .mobile-uc-subpage-content .password-form {
        background: white;
        border-radius: 12px;
        padding: 20px;
    }
    
    .mobile-uc-subpage-content .form-group {
        margin-bottom: 16px;
    }
    
    .mobile-uc-subpage-content .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        margin-bottom: 8px;
    }
    
    .mobile-uc-subpage-content .form-input {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #E5E7EB;
        border-radius: 10px;
        font-size: 16px;
        background: #F9FAFB;
        box-sizing: border-box;
        transition: all 0.2s;
    }
    
    .mobile-uc-subpage-content .form-input:focus {
        outline: none;
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
    
    .mobile-uc-subpage-content .btn-submit {
        width: 100%;
        padding: 14px;
        margin-top: 8px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
    }
    
    .mobile-uc-subpage-content .btn-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    /* 健康档案卡片 */
    .mobile-health-card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 12px;
    }
    
    .mobile-health-card .card-header {
        padding: 16px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-health-card .card-header h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 500;
    }
    
    .mobile-health-card .completeness-badge {
        background: rgba(255, 255, 255, 0.2);
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 12px;
    }
    
    .mobile-health-card .card-body {
        padding: 16px;
    }
    
    .mobile-health-card .completeness-bar {
        height: 8px;
        background: #E5E7EB;
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 16px;
    }
    
    .mobile-health-card .completeness-fill {
        height: 100%;
        background: linear-gradient(90deg, #10B981, #34D399);
        border-radius: 4px;
        transition: width 0.3s;
    }
    
    .mobile-health-card .btn-edit {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }
    
    /* 历史记录列表 */
    .mobile-history-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-history-item {
        display: flex;
        background: white;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        gap: 12px;
    }
    
    .mobile-history-item .history-image {
        width: 72px;
        height: 72px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
        background: #F3F4F6;
    }
    
    .mobile-history-item .history-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    
    .mobile-history-item .history-date {
        font-size: 12px;
        color: #9CA3AF;
        margin-bottom: 4px;
    }
    
    .mobile-history-item .history-result {
        font-size: 13px;
        color: #374151;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 8px;
    }
    
    .mobile-history-item .history-actions {
        display: flex;
        gap: 8px;
    }
    
    .mobile-history-item .btn-action {
        padding: 6px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
    }
    
    .mobile-history-item .btn-action.primary {
        background: #667eea;
        color: white;
    }
    
    .mobile-history-item .btn-action.secondary {
        background: #F3F4F6;
        color: #6B7280;
    }
    
    /* 空状态 */
    .mobile-empty-state {
        text-align: center;
        padding: 60px 20px;
    }
    
    .mobile-empty-state .empty-icon {
        font-size: 56px;
        margin-bottom: 16px;
    }
    
    .mobile-empty-state .empty-text {
        font-size: 15px;
        color: #6B7280;
        margin: 0 0 8px 0;
    }
    
    .mobile-empty-state .empty-hint {
        font-size: 13px;
        color: #9CA3AF;
        margin: 0;
    }
}
.mobile-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.mobile-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-modal-content {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.3s ease-out;
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.mobile-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
}

.mobile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* ========== 移动端用户中心增强样式 ========== */
@media (max-width: 768px) {
    /* 账号安全表单样式 */
    #ucModule_account-security .module-card {
        max-width: 100% !important;
        padding: 0;
        background: transparent;
    }
    
    #ucModule_account-security .form-group {
        margin-bottom: 16px;
    }
    
    #ucModule_account-security .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-primary);
    }
    
    #ucModule_account-security .form-input {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #E5E7EB;
        border-radius: 10px;
        font-size: 16px;
        background: white;
        box-sizing: border-box;
    }
    
    #ucModule_account-security .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
    
    #ucModule_account-security .btn-primary {
        width: 100%;
        padding: 14px;
        margin-top: 10px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
    }
    
    #ucModule_account-security .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    /* 历史记录卡片样式优化 */
    .history-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .history-card {
        display: flex;
        background: white;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        gap: 12px;
    }
    
    .history-card .history-image {
        width: 80px;
        height: 80px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .history-card .history-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }
    
    .history-card .history-date {
        font-size: 12px;
        color: #9CA3AF;
        margin-bottom: 4px;
    }
    
    .history-card .history-result {
        font-size: 13px;
        color: var(--text-secondary);
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 8px;
    }
    
    .history-card .history-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .history-card .btn-detail,
    .history-card .btn-compare-with {
        padding: 6px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
        white-space: nowrap;
    }
    
    .history-card .btn-detail {
        background: var(--primary);
        color: white;
    }
    
    .history-card .btn-compare-with {
        background: #F3F4F6;
        color: var(--text-secondary);
    }
    
    /* 问诊记录样式 */
    .consultation-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .consultation-card {
        background: white;
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .consultation-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .consultation-type {
        font-size: 14px;
        font-weight: 600;
        color: var(--primary);
    }
    
    .consultation-date {
        font-size: 12px;
        color: #9CA3AF;
    }
    
    .consultation-content p {
        font-size: 13px;
        line-height: 1.5;
        color: var(--text-secondary);
        margin: 0 0 6px 0;
    }
    
    .consultation-content p strong {
        color: var(--text-primary);
    }
    
    .consultation-card .btn-view {
        display: block;
        width: 100%;
        padding: 10px;
        margin-top: 12px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        cursor: pointer;
        text-align: center;
    }
    
    /* 历史工具栏 */
    .history-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding: 12px;
        background: #F8F9FA;
        border-radius: 10px;
    }
    
    .history-toolbar .btn-compare {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
        font-size: 13px;
        color: var(--text-primary);
        cursor: pointer;
    }
    
    .history-toolbar .history-count {
        font-size: 12px;
        color: #9CA3AF;
    }
    
    /* 空状态样式优化 */
    .empty-state {
        text-align: center;
        padding: 40px 20px;
    }
    
    .empty-state .empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .empty-state p {
        font-size: 14px;
        color: #6B7280;
        margin: 0 0 6px 0;
    }
    
    .empty-state .empty-hint {
        font-size: 12px;
        color: #9CA3AF;
    }
    
    /* 舌诊指标标签 */
    .history-metrics {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    
    .metric-badge {
        font-size: 11px;
        padding: 3px 8px;
        background: #EEF2FF;
        color: var(--primary);
        border-radius: 4px;
    }
    
    /* 加载更多按钮 */
    .load-more-container {
        text-align: center;
        padding: 16px;
    }
    
    .btn-load-more {
        padding: 10px 24px;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
        font-size: 14px;
        color: var(--text-primary);
        cursor: pointer;
    }
    
    .btn-load-more:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    .load-more-info {
        font-size: 12px;
        color: #9CA3AF;
        margin-left: 4px;
    }
    
    /* ========== 个人资料编辑样式 ========== */
    
    /* 头像编辑徽章 */
    .mobile-uc-avatar {
        position: relative;
    }
    
    .avatar-edit-badge {
        position: absolute;
        bottom: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 8px;
        border: 2px solid white;
    }
    
    /* 个人资料卡片可点击样式 */
    .mobile-uc-profile-card {
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-uc-profile-card:active {
        transform: scale(0.98);
        background: #F9FAFB;
    }
    
    /* 退出登录分组 */
    .logout-group {
        margin-top: 20px;
    }
    
    .logout-item {
        justify-content: center;
    }
    
    .logout-item .menu-icon {
        background: #FEE2E2 !important;
    }
    
    /* 个人资料编辑表单 */
    .profile-edit-form {
        background: white;
        border-radius: 12px;
        padding: 20px;
    }
    
    .avatar-edit-section {
        display: flex;
        justify-content: center;
        margin-bottom: 24px;
    }
    
    .avatar-preview {
        position: relative;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        overflow: hidden;
        border: 3px solid #667eea;
    }
    
    .avatar-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .avatar-upload-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.6);
        color: white;
        text-align: center;
        padding: 8px 0;
        font-size: 12px;
        cursor: pointer;
    }
    
    /* 订单列表样式 */
    .mobile-order-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-order-item {
        background: white;
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .order-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .order-no {
        font-size: 12px;
        color: #9CA3AF;
    }
    
    .order-status {
        font-size: 12px;
        color: #667eea;
        font-weight: 500;
    }
    
    .order-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .order-amount {
        font-size: 18px;
        font-weight: 600;
        color: #EF4444;
    }
    
    .order-time {
        font-size: 12px;
        color: #9CA3AF;
        margin-top: 4px;
    }
    
    /* 购物车列表样式 */
    .mobile-cart-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .mobile-cart-item {
        display: flex;
        background: white;
        border-radius: 12px;
        padding: 12px;
        gap: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .cart-image {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .cart-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .cart-name {
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        margin-bottom: 4px;
    }
    
    .cart-price {
        font-size: 13px;
        color: #EF4444;
    }
    
    .cart-total {
        background: white;
        border-radius: 12px;
        padding: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
    }
    
    .total-price {
        font-size: 20px;
        font-weight: 600;
        color: #EF4444;
    }
}

/* ========== 底部栏全屏优化 ========== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
    max-width: 480px;
    margin: 0 auto;
}

/* 功能导航按钮行 */
.function-row {
    display: flex !important;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.function-row::-webkit-scrollbar {
    display: none;
}

/* 输入框行优化 */
.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F5F7FA;
    border-radius: 25px;
    padding: 6px 8px 6px 14px;
}

/* 输入框 */
.main-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 10px 0;
    outline: none;
    color: #1a1a1a;
}

.main-input::placeholder {
    color: #9CA3AF;
}

/* 附件按钮(+号) */
.input-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    flex-shrink: 0;
    transition: all 0.2s;
}

.input-icon-btn:active {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(0.95);
}

.input-icon-btn svg {
    width: 22px;
    height: 22px;
}

/* 拍照按钮样式 */
.input-icon-btn.camera-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.input-icon-btn.camera-btn:active {
    background: linear-gradient(135deg, #C7D2FE 0%, #A5B4FC 100%);
}

.input-icon-btn.camera-btn svg {
    width: 20px;
    height: 20px;
    stroke: #667eea;
}

/* 发送按钮样式 */
.send-btn-round {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-btn-round:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.send-btn-round svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* 主内容区域调整，为底部输入框留出空间 */
main.main-content {
    padding-bottom: 90px;
}

/* ========== 收款码上传样式 ========== */
.payment-qr-upload {
    margin-top: 8px;
}

.qr-preview {
    width: 150px;
    height: 150px;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FAFB;
}

.qr-preview:hover {
    border-color: #667eea;
    background: #F0F4FF;
}

.upload-placeholder {
    text-align: center;
    color: #9CA3AF;
}

.upload-placeholder p {
    margin: 8px 0 0;
    font-size: 12px;
}

/* 邀请二维码样式 */
.invite-qrcode {
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(135deg, #F0F4FF 0%, #E8EEFF 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.invite-info {
    background: #F9FAFB;
    border-radius: 10px;
    padding: 12px;
}

.invite-info .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #E5E7EB;
}

.invite-info .info-row:last-child {
    border-bottom: none;
}

.invite-info .label {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
}

.invite-info .value {
    flex: 1;
    font-size: 14px;
    color: #1a1a1a;
}

.copy-btn-sm {
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.invite-tip {
    text-align: center;
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 16px;
}

/* ========== 智能体菜单 ========== */
.smart-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.smart-menu {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
}

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

.smart-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #F3F4F6;
}

.smart-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.smart-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.smart-menu-content {
    padding: 15px;
}

.smart-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FAFB;
}

.smart-option:hover {
    background: #F3F4F6;
    transform: translateY(-2px);
}

.smart-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.smart-info {
    flex: 1;
}

.smart-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.smart-info p {
    margin: 0;
    font-size: 13px;
    color: #667eea;
}

/* ========== 摄像头拍照模态框 ========== */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.camera-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.camera-title {
    color: white;
    font-size: 17px;
    font-weight: 600;
}

.camera-close-btn,
.camera-switch-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.camera-close-btn:active,
.camera-switch-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.camera-preview-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.camera-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 拍照引导框 */
.camera-guide-frame {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.camera-guide-frame.tongue-frame {
    width: 70%;
    height: 40%;
    border-radius: 50% 50% 50% 50%;
}

.camera-guide-frame.face-frame {
    width: 65%;
    height: 55%;
    border-radius: 50%;
}

.camera-tips {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

.camera-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 24px 40px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.5);
}

.camera-gallery-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.camera-gallery-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.camera-capture-btn {
    width: 72px;
    height: 72px;
    background: white;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.camera-capture-btn:active {
    transform: scale(0.92);
}

.camera-capture-btn .capture-inner {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    transition: background 0.15s;
}

.camera-capture-btn:active .capture-inner {
    background: #E5E7EB;
}

.camera-placeholder {
    width: 50px;
    height: 50px;
}

/* 前置摄像头预览镜像 */
.camera-preview-container video.mirror {
    transform: scaleX(-1);
}

/* ========== 消息操作按钮样式 ========== */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    justify-content: flex-start;
}

/* 底部显示样式 */
.message-actions-bottom {
    border-top: none;
    margin-top: 8px;
    padding-top: 0;
}

.message-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-height: 36px;
}

.message-action-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.message-action-btn:active {
    transform: scale(0.95);
    background: #ddd;
}

.message-action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 导出菜单 */
.export-action-menu {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 140px;
    z-index: 9999;
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.export-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    color: #333;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.export-menu-item:hover {
    background: #f5f5f5;
}

.export-menu-item:active {
    background: #eee;
}

.export-menu-icon {
    font-size: 16px;
}

/* 导出对话框 */
.export-dialog-overlay,
.export-image-preview-overlay {
    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;
    padding: 20px;
    animation: overlayFadeIn 0.2s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.export-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: dialogSlideIn 0.3s ease;
}

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

.export-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 16px;
}

.export-dialog-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.export-dialog-content {
    flex: 1;
    padding: 16px 20px;
    overflow: hidden;
}

.export-dialog-textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
}

.export-dialog-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.export-dialog-tip {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.export-dialog-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 图片预览 */
.export-image-preview-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dialogSlideIn 0.3s ease;
}

.export-image-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
}

.export-preview-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-image-preview-content {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-image-preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.export-image-preview-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.export-preview-btn {
    padding: 10px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Toast样式（备用） */
.export-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.export-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.export-toast-success {
    background: rgba(46, 125, 50, 0.9);
}

.export-toast-warning {
    background: rgba(237, 108, 2, 0.9);
}

.export-toast-info {
    background: rgba(2, 136, 209, 0.9);
}

/* 诊断结果中的操作按钮位置调整 */
.diagnosis-result .message-actions {
    padding: 12px 16px;
    margin-top: 0;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .message-action-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .message-action-btn span {
        display: inline;
    }
    
    .export-dialog {
        max-width: none;
        margin: 10px;
        border-radius: 12px;
    }
    
    .export-image-preview-container {
        max-width: none;
        margin: 10px;
        max-height: calc(100vh - 40px);
    }
}

