/* ===== 全局变量与重置 ===== */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #222533;
    --bg-hover: #2a2e3d;
    --border: #2f3344;
    --text-primary: #e8eaf0;
    --text-secondary: #9ca3b8;
    --text-muted: #6b7280;
    --accent: #5b8cff;
    --accent-hover: #4a7aee;
    --accent-glow: rgba(91, 140, 255, 0.25);
    --success: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* ===== 导航栏 ===== */
.nav-link-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}
.nav-link-btn:hover { color: var(--accent); }
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; }
.nav-links a:hover { color: var(--text-primary); }
.nav-user { color: var(--text-secondary); font-size: 14px; }
.badge-admin {
    background: linear-gradient(135deg, var(--warn), #f59e0b);
    color: #000;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===== 主内容 ===== */
.main-content {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px;
}
.container { width: 100%; }

.page-header { text-align: center; margin-bottom: 28px; }
.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #9ca3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.subtitle { color: var(--text-secondary); font-size: 14px; }

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
input[type="text"], input[type="password"], textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
input:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; min-height: 60px; }

/* 密码显示/隐藏按钮 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 42px; }
.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.pwd-toggle:hover { color: #e5e7eb; background: rgba(255,255,255,0.06); }
.pwd-toggle:active { background: rgba(255,255,255,0.1); }
.pwd-toggle svg { width: 18px; height: 18px; display: block; }
.pwd-wrap input::-ms-reveal { display: none; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c6bff);
    color: #fff;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border); }
.btn-warn { background: var(--warn); color: #000; }
.btn-warn:hover:not(:disabled) { background: #f59e0b; }
.btn-success { background: var(--success); color: #000; }
.btn-success:hover:not(:disabled) { background: #10b981; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #ef4444; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-text:hover { color: var(--accent); background: var(--bg-hover); }
.form-actions { display: flex; justify-content: flex-end; }

/* ===== 认证页面 ===== */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
}
.auth-card h2 { margin-bottom: 20px; font-size: 24px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }

/* ===== 文件上传 ===== */
.file-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: background 0.2s;
}
.file-label:hover { background: var(--border); }
.file-label input[type="file"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.file-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-primary);
}
.file-preview-item img, .file-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-preview-item .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.file-preview-item .file-type-tag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ===== 留言列表 ===== */
.messages-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.count { color: var(--text-muted); font-size: 14px; font-weight: 400; }

.message-card { padding: 16px 20px; }
.msg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.msg-avatar, .reply-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}
.msg-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msg-username { font-weight: 600; font-size: 14px; }
.msg-time, .msg-ip { font-size: 12px; color: var(--text-muted); }
.msg-body { margin-left: 46px; }
.msg-content { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.recalled { color: var(--text-muted); font-style: italic; font-size: 13px; }
.deactivated-user { color: var(--text-muted) !important; font-style: italic; }
.badge-deactivated { background: var(--text-muted); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }

.msg-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.file-thumb {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.file-thumb:hover img { transform: scale(1.05); }
.file-video {
    max-width: 320px;
    max-height: 240px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.msg-actions {
    margin-left: 46px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.reply-count { font-size: 12px; color: var(--text-muted); }

/* 回复 */
.replies {
    margin-left: 46px;
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    text-align: left;
}
.reply-item {
    padding: 6px 0;
    border-bottom: none;
    text-align: left !important;
    display: block;
}
.reply-item.hidden-reply { display: none; }
.reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.reply-avatar { width: 24px; height: 24px; font-size: 11px; }
.msg-avatar img, .reply-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
img.msg-avatar, img.reply-avatar { object-fit: cover; }
.reply-username { font-weight: 600; font-size: 12px; }
.reply-to { font-size: 11px; color: var(--accent); }
.reply-time { font-size: 11px; color: var(--text-muted); }
.reply-body { margin-left: 30px; font-size: 13px; white-space: pre-wrap; word-break: break-word; text-align: left !important; line-height: 1.5; display: block; }
.reply-actions { margin-left: 30px; margin-top: 2px; text-align: left !important; display: block; }
.expand-replies-btn {
    margin-left: 30px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: inherit;
}
.expand-replies-btn:hover { text-decoration: underline; }

.reply-form-wrap { margin-top: 12px; margin-left: 46px; }
.reply-form textarea { background: var(--bg-primary); margin-bottom: 8px; }
.reply-form .btn { margin-top: 8px; }
.reply-form-tools { margin-bottom: 8px; }
.file-label-sm { padding: 5px 12px; font-size: 12px; }
.reply-file-preview { margin-bottom: 8px; }
.reply-file-preview .file-preview-item { width: 60px; height: 60px; }
.reply-progress { margin: 8px 0; padding: 8px 10px; }

.login-tip { text-align: center; color: var(--text-secondary); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ===== 滑块验证码（完全响应式） ===== */
.captcha-wrap {
    user-select: none;
    -webkit-user-select: none;
    margin: 10px 0;
    width: 100%;
    max-width: 300px;
}
.captcha-bg {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 2 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-primary);
    margin-bottom: 10px;
}
.captcha-bg img.bg-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.captcha-piece {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    z-index: 2;
}
.slider-track {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    touch-action: none;
}
.slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(91,140,255,0.3), rgba(124,107,255,0.3));
    width: 0;
    transition: background 0.2s;
}
.slider-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}
.slider-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #7c6bff);
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background 0.2s;
    z-index: 2;
}
.slider-arrow {
    display: inline-block;
    line-height: 1;
    margin-left: 2px;
}
.slider-btn:active { cursor: grabbing; }
.slider-track.success .slider-fill { background: rgba(52,211,153,0.3); }
.slider-track.success .slider-btn { background: var(--success); }
.slider-track.fail .slider-fill { background: rgba(248,113,113,0.3); }
.slider-track.fail .slider-btn { background: var(--danger); }
.captcha-refresh {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}
.captcha-refresh:hover { color: var(--accent); }
.captcha-loading {
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.captcha-status {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}
.captcha-status.ok { color: var(--success); }
.captcha-status.err { color: var(--danger); }

/* ===== 主页 Hero ===== */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #5b8cff 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px !important;
}
.hero-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto 24px !important;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.hero-stat .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 4px 0 20px;
}

/* ===== 管理后台 ===== */
.admin-section { padding: 20px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.section-header h2 { font-size: 18px; margin: 0; }
.header-actions { display: flex; gap: 8px; align-items: center; }
#refreshBtn { font-size: 13px; transition: opacity 0.2s; }
#refreshBtn:disabled { opacity: 0.6; cursor: default; }
.batch-actions { display: flex; gap: 8px; }

.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    background: var(--bg-primary);
}
.data-table tr:hover { background: var(--bg-hover); }
.row-banned { opacity: 0.6; }
.msg-content-cell { max-width: 300px; }

/* 自定义复选框 */
.checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    width: 20px;
    height: 20px;
}
.checkbox-label input { opacity: 0; position: absolute; width: 0; height: 0; }
.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.checkbox-label input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-label input:checked ~ .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
.checkbox-label input:disabled ~ .checkmark { opacity: 0.4; cursor: not-allowed; }

.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.status-normal { background: rgba(52,211,153,0.15); color: var(--success); }
.status-banned { background: rgba(248,113,113,0.15); color: var(--danger); }

/* ===== 弹窗 ===== */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
}
.modal-content h3 { margin-bottom: 8px; }
.modal-content p { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ===== 加载动画 ===== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15,17,23,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}
.loading-overlay p { color: var(--text-secondary); margin-top: 16px; font-size: 14px; }
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 3000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: slideDown 0.3s ease;
    max-width: 90%;
}
.toast.success { background: var(--success); color: #000; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--accent); color: #fff; }
@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.hidden { display: none !important; }

/* ===== 上传进度条 ===== */
.upload-progress {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.progress-bar-wrap {
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 3px;
    transition: width 0.2s ease;
}
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}
.btn-cancel-upload {
    color: var(--danger);
    font-size: 12px;
}
.btn-cancel-upload:hover { color: #ef4444; background: rgba(248,113,113,0.1); }

/* ===== 搜索框 ===== */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-input {
    width: 200px;
    padding: 7px 12px !important;
    font-size: 13px !important;
    min-height: auto !important;
}
.section-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.section-header .search-form .btn { white-space: nowrap; }

/* ===== 404/403 页面 ===== */
.error-page {
    text-align: center;
    padding: 100px 20px;
}
.error-code {
    font-size: 120px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}
.error-page h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.error-page p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== 已撤回行样式 ===== */
.row-recalled { opacity: 0.5; }
.status-recalled { background: rgba(156,163,184,0.15); color: var(--text-muted); }

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text-secondary); }

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .nav-container { padding: 0 12px; }
    .nav-links { gap: 12px; }
    .main-content { padding: 16px 12px; }
    .card { padding: 14px; }
    .msg-body, .msg-actions, .replies, .reply-form-wrap { margin-left: 0; }
    .file-thumb { width: 90px; height: 90px; }
    .file-video { max-width: 100%; }
    .page-header h1 { font-size: 24px; }
    .hero { padding: 50px 0 36px; min-height: 35vh; }
    .hero h1 { font-size: 30px; }
    .hero-subtitle { font-size: 17px; }
    .hero-desc { font-size: 14px; }
    .hero-stats { gap: 24px; margin-top: 28px; }
    .hero-stat .num { font-size: 22px; }
    .search-input { width: 140px; }
    .section-tools { width: 100%; }
    .error-code { font-size: 80px; }
    .auth-container { margin: 20px auto; }
    .captcha-wrap { max-width: 100%; }
    .header-actions { flex-direction: column; align-items: stretch; width: 100%; }
    .search-form { width: 100%; }
    .search-input { width: 100% !important; }
}

/* ===== 管理后台留言卡片 ===== */
.admin-msg-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.admin-msg-toolbar .checkbox-label {
    width: auto;
    height: auto;
    gap: 6px;
}
.admin-msg-toolbar .check-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.selected-count {
    font-size: 12px;
    color: var(--text-muted);
}
.admin-msg-list { display: flex; flex-direction: column; gap: 12px; }
.admin-msg-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.admin-msg-card.recalled-card { opacity: 0.6; }
.admin-msg-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.admin-check { flex-shrink: 0; }
.admin-msg-body { margin-left: 42px; }
.admin-msg-id {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}
.admin-replies {
    margin-left: 42px;
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-reply-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}
.admin-reply-item.recalled-card { opacity: 0.6; }
.reply-content-wrap { flex: 1; min-width: 0; }
.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.reply-body-text {
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 自定义确认弹窗 ===== */
.confirm-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.15s ease;
}
.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 340px;
    width: 85%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    animation: scaleIn 0.15s ease;
}
.confirm-box h3 {
    font-size: 17px;
    margin-bottom: 10px;
}
.confirm-box p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* 账户设置页 */
.settings-page { max-width: 600px; margin: 0 auto; }
.settings-page h2 { margin-bottom: 20px; }
.settings-section { background: var(--card-bg); border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); }
.danger-zone { border-color: var(--danger); }
.danger-zone h3 { color: var(--danger); }
.settings-section h3 { margin: 0 0 16px; font-size: 16px; }
.settings-hint { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 14px; }
.info-value { font-size: 14px; }
.avatar-preview { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--accent), #a78bfa); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 24px; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.security-questions .form-group { margin-bottom: 12px; }
.hint-text { color: var(--text-muted); font-size: 12px; font-weight: normal; }

/* 注册页密保问题 */
.sq-item { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.sq-item input { flex: 1; }
.sq-delete {
    width: 32px; height: 32px; min-width: 32px;
    border: none; border-radius: 50%;
    background: var(--danger); color: #fff;
    font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.7; transition: opacity 0.2s;
}
.sq-delete:hover { opacity: 1; }
@media (max-width: 600px) {
    .sq-item { flex-direction: column; gap: 4px; }
}

/* 设置页文件选择 */
.file-input-wrap { display: flex; align-items: center; gap: 10px; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }
.file-name { color: var(--text-muted); font-size: 13px; }

/* 点赞 */
.btn-like {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 6px; border: none; background: none;
    color: var(--text-muted); cursor: pointer; font-size: 14px;
    border-radius: var(--radius-sm); transition: color 0.15s, background 0.15s;
    line-height: 1.4;
}
.btn-like:hover { color: var(--danger); background: rgba(239,68,68,0.08); }
.btn-like.liked { color: var(--danger); }
.btn-like .heart-svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-like .heart-svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill 0.15s; }
.btn-like.liked .heart-svg path { fill: currentColor; stroke: none; }
.like-count {
    color: var(--text-muted); font-size: 13px; margin-right: 4px;
    user-select: none;
}
.like-count.clickable { cursor: pointer; }
.like-count.clickable:hover { color: var(--danger); text-decoration: underline; }
.msg-actions .like-count, .reply-actions .like-count { margin-right: 8px; }

/* 点赞列表弹窗 */
.like-list-box {
    background: var(--bg-card); border-radius: var(--radius);
    width: 90%; max-width: 380px; max-height: 70vh;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.like-list-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.like-list-header h3 { margin: 0; font-size: 16px; }
.like-list-close {
    width: 28px; height: 28px; border: none; background: none;
    color: var(--text-muted); font-size: 22px; cursor: pointer;
    line-height: 1; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.like-list-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.like-list-body { overflow-y: auto; padding: 8px 0; }
.like-user-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 20px;
}
.like-user-item:hover { background: var(--bg-hover); }
.like-user-avatar {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--text-secondary); flex-shrink: 0;
}
.like-avatar-text { font-weight: 600; }
.like-user-name { font-size: 14px; color: var(--text-primary); }
.like-user-name.deactivated-user { color: var(--text-muted); font-style: italic; }
.like-list-loading, .like-list-empty {
    text-align: center; padding: 24px; color: var(--text-muted); font-size: 14px;
}
.like-list-more {
    text-align: center; padding: 10px; color: var(--accent);
    cursor: pointer; font-size: 13px;
}
.like-list-more:hover { text-decoration: underline; }
