/* ============================================
   留言板系统 - 样式表
   ============================================ */

/* CSS 变量 */
:root {
    --primary: #4f6ef7;
    --primary-dark: #3b54d4;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --success: #27ae60;
    --warning: #f39c12;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

/* 基础重置 */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 40px;
}

/* ========== 顶部导航栏 ========== */
.header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 20px;
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    text-decoration: none;
}

.logo:hover { opacity: 0.8; }

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
}

.search-box .search-btn {
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

.logout-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    display: none;
}

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

/* ========== 主容器 ========== */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== 状态提示 ========== */
.status-banner {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.status-banner.show { display: block; }

.status-banner.closed {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-banner.blocked {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* ========== 留言区域 ========== */
.messages-section {
    margin-bottom: 30px;
}

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

.messages-header h2 {
    font-size: 18px;
    color: var(--text);
}

.messages-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* 管理员批量操作栏 */
.admin-toolbar {
    display: none;
    padding: 10px 16px;
    background: #f8f9ff;
    border: 1px solid #d5dbff;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    align-items: center;
    gap: 12px;
}

.admin-toolbar.show { display: flex; }

.select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}

.batch-delete-btn {
    padding: 6px 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.batch-delete-btn:hover {
    background: var(--danger-dark);
}

.batch-delete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ========== 留言卡片 ========== */
.message-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.message-card:hover {
    box-shadow: var(--shadow-hover);
}

.message-card.reply-card {
    margin-left: 40px;
    border-left: 3px solid var(--primary);
    background: #fafbff;
}

.message-card .checkbox-col {
    display: none;
    position: absolute;
    left: 16px;
    top: 20px;
}

.message-card.admin-mode .checkbox-col {
    display: block;
}

.message-card.admin-mode {
    padding-left: 48px;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 15px;
}

.author-name.anonymous {
    color: var(--text-muted);
    font-style: italic;
}

.ip-badge {
    display: none;
    font-size: 11px;
    background: #f0f0f0;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: monospace;
}

.ip-badge.show { display: inline-block; }

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-content {
    font-size: 15px;
    line-height: 1.8;
    word-break: break-word;
    margin-bottom: 12px;
}

.message-content img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    margin: 8px 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-content img:hover {
    transform: scale(1.02);
}

/* 图片网格 */
.message-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.message-images .img-wrapper {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: #f5f5f5;
}

.message-images .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

/* 文件附件 */
.message-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f5f7ff;
    border: 1px solid #e0e5ff;
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.file-link:hover {
    background: #e8ecff;
    border-color: var(--primary);
}

.file-link .file-icon {
    font-size: 18px;
}

.file-link .file-size {
    color: var(--text-muted);
    font-size: 11px;
}

/* 回复按钮 */
.message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.reply-btn, .delete-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reply-btn {
    background: #f0f4ff;
    color: var(--primary);
}

.reply-btn:hover {
    background: #dde4ff;
}

.delete-btn {
    display: none;
    background: #fff0f0;
    color: var(--danger);
}

.delete-btn.show { display: inline-flex; }

.delete-btn:hover {
    background: #ffe0e0;
}

/* 展开回复按钮 */
.show-replies-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: none;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.show-replies-btn:hover {
    background: #f8f9ff;
    border-color: var(--primary);
}

/* 回复区域 */
.replies-container {
    margin-top: 10px;
}

/* 图片灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.show { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1;
}

/* ========== 输入区域 ========== */
.input-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    position: sticky;
    bottom: 20px;
}

.input-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

/* 昵称输入行 */
.nickname-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.nickname-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
}

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

.anonymous-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
    white-space: nowrap;
}

.anonymous-toggle input {
    accent-color: var(--primary);
}

/* 工具栏 */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.toolbar-group {
    display: flex;
    gap: 3px;
    align-items: center;
    padding: 0 8px;
    border-right: 1px solid var(--border-light);
}

.toolbar-group:last-child { border-right: none; }

.toolbar button, .toolbar .color-input-wrap, .toolbar select {
    height: 34px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.toolbar button:hover {
    background: #f0f0f0;
    border-color: var(--border);
}

.toolbar button.active {
    background: #e8ecff;
    color: var(--primary);
    border-color: var(--primary);
}

.toolbar .color-input-wrap {
    position: relative;
    width: 34px;
    padding: 0;
}

.toolbar .color-input-wrap input[type="color"] {
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
    background: transparent;
}

.toolbar select {
    font-size: 13px;
    padding: 4px 4px;
}

.toolbar .btn-bold { font-weight: 700; }
.toolbar .tool-label { font-size: 11px; color: var(--text-muted); padding: 0 4px; white-space: nowrap; }

/* 可编辑内容区 */
.editor-area {
    min-height: 60px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.2s;
    word-break: break-word;
}

.editor-area:focus {
    border-color: var(--primary);
}

.editor-area:empty::before {
    content: '输入文字或上传图片/文件...';
    color: #bbb;
}

.editor-area img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    margin: 4px;
    vertical-align: middle;
    display: inline-block;
}

/* 预览图片区 */
.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    min-height: 0;
}

.image-previews:empty { display: none; }

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-img {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 已选文件列表 */
.file-list {
    margin-top: 8px;
}

.file-list:empty { display: none; }

.file-list-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 16px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
}

.file-list-item .remove-file {
    cursor: pointer;
    color: var(--danger);
    font-weight: bold;
    background: none;
    border: none;
    font-size: 14px;
    line-height: 1;
}

/* 输入框底部操作栏 */
.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-buttons {
    display: flex;
    gap: 8px;
}

.upload-btn {
    padding: 8px 14px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.submit-btn {
    padding: 10px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========== 悬浮发布按钮 (FAB) ========== */
.fab-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79, 110, 247, 0.4);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.fab-toggle:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 24px rgba(79, 110, 247, 0.5);
    transform: scale(1.1);
}

.fab-toggle.hidden {
    display: none;
}

/* 输入框内的关闭按钮（椭圆形） */
.close-input-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 32px;
    border-radius: 50px;
    background: #f0f0f0;
    color: #666;
    border: 2px solid #ddd;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    z-index: 5;
}

.close-input-btn:hover {
    background: #ffebee;
    color: var(--danger);
    border-color: #ffcdd2;
}

/* 输入区域显示动画 */
.input-section.show {
    animation: slideUpIn 0.35s ease forwards;
}

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

/* ========== 回复输入框（浮层） ========== */
.reply-input-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
}

.reply-input-overlay.show { display: flex; }

.reply-input-panel {
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px 24px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
}

.reply-input-panel h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reply-input-panel .close-reply {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.reply-input-panel .close-reply:hover {
    color: var(--danger);
}

.reply-input-panel .editor-area {
    min-height: 40px;
    max-height: 200px;
}

/* ========== 分页器 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    width: 38px; height: 38px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========== 加载动画 ========== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    display: inline-block;
    width: 30px; height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

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

.empty-message .empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

/* ========== Toast 提示 ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    min-width: 200px;
}

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

.toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

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

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

/* ========== 内联上传进度条 ========== */
.upload-progress-item {
    padding: 10px 12px;
    background: #f8f9ff;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e0e5ff;
}
.upload-progress-item .up-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

/* 小文件上传：名字+百分比一行，进度条独立 */
.up-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.up-info .up-percent {
    font-size: 12px;
    font-weight: 700;
    color: #4f6ef7;
    white-space: nowrap;
}

/* 独立进度条（小文件用） */
.upload-progress-item > .up-track {
    width: 100%;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 2px;
}
.upload-progress-item > .up-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4f6ef7, #7b8cff);
    border-radius: 3px;
    transition: width 0.15s ease;
}

/* 进度条 + 百分比 + 按钮 同一行（大文件分片上传） */
.up-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.up-bar-row .up-track {
    flex: 1;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    min-width: 40px;
}
.up-bar-row .up-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4f6ef7, #7b8cff);
    border-radius: 3px;
    transition: width 0.15s ease;
}
.up-bar-row .up-percent {
    font-size: 12px;
    font-weight: 700;
    color: #4f6ef7;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 暂停/继续：蓝色胶囊，模仿 submit-btn */
.up-pause-btn {
    min-width: 48px;
    padding: 4px 10px;
    background: #4f6ef7;
    color: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
}
.up-pause-btn:hover {
    background: #3d5bd9;
    transform: translateY(-1px);
}

/* 取消：红色胶囊，模仿 submit-btn */
.up-cancel-btn {
    min-width: 48px;
    padding: 4px 10px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
}
.up-cancel-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

/* 速度文字 */
.up-speed {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        gap: 8px;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        flex: 100%;
    }

    .message-card.reply-card {
        margin-left: 16px;
    }

    .message-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .toolbar {
        gap: 2px;
    }

    .toolbar-group {
        padding: 0 4px;
    }

    .toolbar button {
        padding: 4px 6px;
        font-size: 13px;
    }

    .input-actions {
        flex-direction: column;
    }

    .upload-buttons {
        width: 100%;
        justify-content: center;
    }

    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }

    .message-card {
        padding: 14px 16px;
    }

    .message-card.reply-card {
        margin-left: 8px;
    }

    .toolbar .tool-label { display: none; }
}

/* ========== 底部文字 ========== */
.footer-text {
    text-align: center;
    padding: 16px 0;
    color: #999;
    font-size: 13px;
}
