/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    -webkit-text-size-adjust: 100%;
}

:root {
    --primary-color: #6366F1;
    --primary-hover: #4F46E5;
    --secondary-color: #8B5CF6;
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh; /* 动态视口高度，适配移动端地址栏 */
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* 欢迎页面 */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.welcome-content {
    max-width: 800px;
    text-align: center;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.welcome-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.welcome-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

.start-btn {
    padding: 16px 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.start-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* 对话界面 */
.chat-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.chat-header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--background);
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.logo-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.logo-inline h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chat-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

#roundCounter {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
}

.progress-bar {
    width: 120px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
    background: var(--background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 页面切换按钮 */
.page-switch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.page-switch-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-switch-btn svg {
    flex-shrink: 0;
}

/* 消息容器 */
.message-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

/* 基本信息卡片 */
.info-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 8px;
    box-shadow: 0 0 25px rgba(16, 1, 42, 0.033);
    border: 1px solid #F3F4F6;
}

.info-card-title {
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.info-card-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    color: #6B7280;
    font-size: 13px;
    font-weight: 400;
}

.info-value {
    color: #111827;
    font-size: 16px;
    font-weight: 600;
}

.message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
    width: 100%;
    max-width: 100%;
    flex-direction: row; /* 所有消息都靠左 */
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移除用户消息的反向布局 */
.message.user {
    flex-direction: row; /* 改为左对齐 */
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: var(--border);
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.message.user .message-avatar {
    background: var(--text-secondary);
}

.message-content {
    max-width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    display: inline-block;
    width: auto;
}

/* Markdown渲染样式 */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: inherit;
}

.message-content h1 { font-size: 18px; }
.message-content h2 { font-size: 17px; }
.message-content h3 { font-size: 16px; }
.message-content h4 { font-size: 15px; }

.message-content h1:first-child,
.message-content h2:first-child,
.message-content h3:first-child,
.message-content h4:first-child {
    margin-top: 0;
}

.message-content p {
    margin: 8px 0;
    line-height: 1.6;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 4px 0;
    line-height: 1.6;
}

.message-content strong {
    font-weight: 600;
}

.message-content em {
    font-style: italic;
}

.message-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.message.assistant .message-content {
    background: var(--background);
    color: var(--text-primary);
    border-radius: 4px 12px 12px 12px;
}

.message.user .message-content {
    background: #E8E5FF;
    color: var(--text-primary);
    border-radius: 4px 12px 12px 12px;
}

/* 报告卡片样式 */
.message.report-card .message-content {
    max-width: 650px;
    padding: 24px;
    background: white;
    color: #333;
    border-radius: 4px 12px 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-card-header {
    display: none;
}

.report-card-body {
    padding: 0;
    background: white;
    color: #333;
}

/* 报告元信息 */
.report-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.report-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-meta-label {
    color: #6B7280;
    font-size: 13px;
    font-weight: 400;
}

.report-meta-value {
    color: #111827;
    font-size: 15px;
    font-weight: 500;
}

.report-card-body .report-section {
    margin-bottom: 28px;
}

.report-card-body .report-section:last-child {
    margin-bottom: 0;
}

.report-card-body h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 0;
    border-bottom: none;
}

.report-card-body p {
    margin: 0 0 12px 0;
    line-height: 1.8;
    color: #666;
    font-size: 14px;
}

.report-card-body p:last-child {
    margin-bottom: 0;
}

/* 报告卡片底部 */
.report-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.confirm-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.confirm-btn.confirmed {
    background: var(--success);
    cursor: default;
}

.confirm-btn.confirmed:hover {
    transform: none;
    box-shadow: none;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.message-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* 输入区域 */
.input-area {
    padding: 20px 32px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background: var(--surface);
    flex-shrink: 0;
    flex-grow: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* 输入框上方的渐隐效果 */
.input-area::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--surface), transparent);
    pointer-events: none;
    z-index: 1;
}

.input-area-inner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
}

/* 图片上传按钮 */
.image-upload-btn {
    position: absolute;
    left: 12px;
    bottom: 12px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 1;
}

.image-upload-btn:hover {
    background: var(--background);
    color: var(--primary-color);
}

/* 图片预览容器 */
.image-preview-container {
    margin-top: 8px;
    padding: 8px;
    background: var(--background);
    border-radius: 8px;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-image-btn:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    resize: none;
    outline: none;
    max-height: 120px;
    min-height: 80px;
    font-family: inherit;
    padding: 6px 60px 12px 12px;
    line-height: 1.5;
    display: block;
    border-radius: 12px;
    vertical-align: top;
    width: 100%;
    box-sizing: border-box;
}

#messageInput::placeholder {
    color: var(--text-tertiary);
    text-align: left;
}

.send-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: left;
}

/* 报告界面 */
.report-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.report-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
}

.report-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.report-actions {
    display: flex;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.report-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--surface);
}

.report-section {
    margin-bottom: 32px;
}

.report-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.report-section p, .report-section ul {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.report-section ul {
    list-style: none;
    padding-left: 0;
}

.report-section li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.report-section li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

/* 加载骨架屏 */
.loading-skeleton {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.skeleton-header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--background);
}

.skeleton-logo {
    width: 200px;
    height: 32px;
    background: var(--border);
    border-radius: 8px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.skeleton-progress {
    width: 180px;
    height: 24px;
    background: var(--border);
    border-radius: 6px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-btn {
    width: 36px;
    height: 36px;
    background: var(--border);
    border-radius: 8px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-messages {
    flex: 1;
    padding: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 基本信息卡片骨架 */
.skeleton-info-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease;
}

.skeleton-info-title {
    width: 80px;
    height: 20px;
    background: var(--border);
    border-radius: 4px;
    margin-bottom: 16px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-info-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skeleton-info-item {
    height: 40px;
    background: var(--border);
    border-radius: 6px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.5s ease;
    flex-direction: row; /* 左对齐 */
}

.skeleton-message-left {
    justify-content: flex-start;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    background: var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-bubble {
    width: 400px;
    max-width: 100%;
    height: 60px;
    background: var(--border);
    border-radius: 4px 12px 12px 12px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-bubble-left {
    border-bottom-left-radius: 4px;
}

.skeleton-input {
    padding: 20px 32px;
    background: var(--surface);
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
    justify-content: center;
}

.skeleton-input-box {
    width: 100%;
    max-width: 800px;
    height: 80px;
    background: var(--border);
    border-radius: 12px;
    animation: skeleton-loading 1.5s infinite;
    position: relative;
}

.skeleton-send-btn {
    position: absolute;
    right: calc(50% - 400px + 8px);
    bottom: 28px;
    width: 40px;
    height: 40px;
    background: var(--border);
    border-radius: 8px;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    html, body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        overscroll-behavior: none;
        touch-action: pan-y;
    }
    
    .app-container {
        height: 100vh;
        height: 100dvh;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
    }
    
    .chat-screen {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    .chat-header {
        padding: 12px 12px;
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .chat-info {
        flex: 1;
        min-width: 0;
    }
    
    .logo-inline {
        gap: 8px;
    }
    
    .logo-inline svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .logo-inline h2 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .chat-status {
        font-size: 12px;
    }
    
    .chat-actions {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .welcome-screen {
        padding: 20px 12px;
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .welcome-icon {
        font-size: 60px;
        margin-bottom: 16px;
    }
    
    .welcome-content h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
        padding: 0;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .start-btn {
        padding: 14px 40px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
    }
    
    .message-content {
        max-width: 100%;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .message-container {
        padding: 12px 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
        gap: 16px;
        margin: 0;
    }
    
    /* 移动端基本信息卡片 */
    .info-card {
        padding: 16px;
        margin-bottom: 4px;
    }
    
    .info-card-title {
        font-size: 16px;
        margin-bottom: 14px;
    }
    
    .info-card-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .info-item {
        gap: 4px;
    }
    
    .info-label {
        font-size: 12px;
    }
    
    .info-value {
        font-size: 15px;
        font-weight: 600;
    }
    
    .message {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        gap: 8px;
        flex-direction: row; /* 移动端也保持左对齐 */
    }
    
    .message.user {
        flex-direction: row; /* 移动端用户消息也左对齐 */
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
        flex-shrink: 0;
    }
    
    /* 报告卡片在移动端的样式 */
    .message.report-card .message-content {
        max-width: 100%;
        padding: 14px;
        font-size: 13px;
    }
    
    .report-meta {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    
    .report-meta-label {
        font-size: 12px;
    }
    
    .report-meta-value {
        font-size: 14px;
    }
    
    .report-card-body h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .report-card-body p {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .report-card-footer {
        padding-top: 16px;
        margin-top: 16px;
    }
    
    .confirm-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .input-area {
        padding: 10px 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 10px));
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        position: relative;
        display: block;
    }
    
    .input-area-inner {
        width: 100%;
        max-width: 100%;
    }
    
    .input-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #messageInput {
        font-size: 14px;
        padding: 10px 48px 10px 10px;
        min-height: 44px;
        max-height: 100px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .send-btn {
        width: 36px;
        height: 36px;
        right: 4px;
        bottom: 4px;
    }
    
    .send-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .input-hint {
        display: none;
    }
    
    .progress-indicator {
        display: none;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* 报告界面移动端优化 */
    .report-screen {
        width: 100%;
        max-width: 100%;
    }
    
    .report-header {
        padding: 12px 12px;
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .report-header h2 {
        font-size: 18px;
        width: 100%;
    }
    
    .report-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .btn-primary, .btn-secondary {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .report-content {
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .report-section {
        margin-bottom: 24px;
    }
    
    .report-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .report-section p, .report-section ul {
        font-size: 14px;
    }
}

/* 滚动条样式 - 隐藏滚动条但保持功能 */
.message-container::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.message-container {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}
