/* ============================================
   无畏契约时刻 - 主题样式
   配色: Valorant 风格 (深色 + 红色)
   ============================================ */

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

:root {
    --bg-base: #0f1923;
    --bg-card: #1a2530;
    --bg-elevated: #243240;
    --border: #2a3a4a;
    --accent: #ff4655;
    --accent-hover: #e03e4d;
    --text: #ece8e1;
    --text-muted: #8b978f;
    --success: #4caf50;
    --warning: #ffa726;
    --info: #42a5f5;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

body {
    background: var(--bg-base);
    color: var(--text);
    font-family: 'Segoe UI', 'Noto Sans CJK SC', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* ----- 布局 ----- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    flex: 1;
}

/* ----- 页头 ----- */
.site-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 18px;
    font-weight: bold;
}

.logo-mark {
    color: var(--accent);
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.main-nav a:hover {
    background: var(--bg-elevated);
    color: var(--accent);
}

.main-nav .btn-register,
.main-nav .nav-admin {
    background: var(--accent);
    color: #fff;
}

.main-nav .btn-register:hover,
.main-nav .nav-admin:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ----- Flash 消息 ----- */
.flash-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

.flash-success { background: rgba(76, 175, 80, 0.1); border-color: var(--success); color: #81c784; }
.flash-error   { background: rgba(255, 70, 85, 0.1); border-color: var(--accent); color: #ff8a95; }
.flash-warning { background: rgba(255, 167, 38, 0.1); border-color: var(--warning); color: #ffb74d; }
.flash-info    { background: rgba(66, 165, 245, 0.1); border-color: var(--info); color: #64b5f6; }

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

/* ----- 页面标题 ----- */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 4px;
}

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

/* ----- 按钮 ----- */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    text-align: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* ----- 筛选栏 ----- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-upload {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
}

.btn-upload:hover {
    background: var(--accent-hover);
    color: #fff;
}

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

.empty-icon {
    font-size: 48px;
    color: var(--border);
    margin-bottom: 16px;
}

/* ----- 帖子网格 ----- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
    display: block;
    color: var(--text);
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: var(--text);
}

.post-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-base);
}

.post-media img,
.post-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 48px;
}

.media-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.post-info {
    padding: 14px;
}

.post-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.post-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ----- 分页 ----- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
}

.page-btn {
    padding: 6px 12px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all var(--transition);
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ----- 认证页面 ----- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-mark {
    display: inline-block;
    color: var(--accent);
    font-size: 32px;
    margin-bottom: 8px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

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

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    transition: border-color var(--transition);
}

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

.auth-form .btn-primary {
    width: 100%;
    margin-top: 8px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ----- 表单通用 ----- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

.form-group .required {
    color: var(--accent);
}

.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group input[type=number],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ----- 上传页面 ----- */
.upload-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.upload-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(255, 70, 85, 0.05);
}

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

.upload-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.upload-hint {
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.8;
}

.upload-preview img,
.upload-preview video {
    max-height: 200px;
    border-radius: var(--radius);
    margin: 0 auto;
}

/* ----- 提示框 ----- */
.notice {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    border-left: 4px solid;
    margin-bottom: 20px;
}

.notice-info    { background: rgba(66, 165, 245, 0.08); border-color: var(--info); color: #64b5f6; }
.notice-warning { background: rgba(255, 167, 38, 0.08); border-color: var(--warning); color: #ffb74d; }

/* ----- 帖子详情 ----- */
.post-detail {
    max-width: 900px;
    margin: 0 auto;
}

.post-detail-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
}

.post-media-view {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-media {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.post-detail-info {
    padding: 24px;
}

.post-detail-title {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 600;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ----- 互动按钮 ----- */
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.like-btn.liked {
    background: rgba(255, 70, 85, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.like-btn.liked .like-count {
    color: var(--accent);
}

.delete-btn:hover {
    background: rgba(255, 70, 85, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* ----- 评论区 ----- */
.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.comments-title {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.login-prompt {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    position: relative;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}

.comment-author {
    font-weight: 600;
    color: var(--text);
}

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

.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
}

.comment-delete {
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.comment-delete:hover {
    color: var(--accent);
}

/* ----- 徽章 ----- */
.badge-admin {
    display: inline-block;
    padding: 1px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.badge-user {
    display: inline-block;
    padding: 1px 8px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 11px;
    vertical-align: middle;
}

.badge-banned {
    display: inline-block;
    padding: 1px 8px;
    background: #f44336;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    vertical-align: middle;
}

.badge-self {
    display: inline-block;
    padding: 1px 6px;
    background: var(--info);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
}

.badge-count {
    display: inline-block;
    padding: 1px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

/* ----- 帖子状态标记 ----- */
.post-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.status-pending  { background: rgba(255, 167, 38, 0.85); color: #fff; }
.status-rejected { background: rgba(244, 67, 54, 0.85); color: #fff; }

/* ----- 用户主页 ----- */
.profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--accent);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.profile-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ----- 管理后台 ----- */
.admin-page,
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.admin-page-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.admin-page-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

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

/* 后台分区 */
.admin-section {
    margin-bottom: 32px;
}

.admin-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-link {
    font-size: 14px;
    font-weight: normal;
    margin-left: auto;
}

/* 状态分布条 */
.status-bars {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    flex-wrap: wrap;
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.status-bar-item strong {
    color: var(--text);
    font-size: 18px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.approved { background: var(--success); }
.status-dot.pending  { background: var(--warning); }
.status-dot.rejected { background: #f44336; }

/* 后台表格 */
.admin-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg-elevated);
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 70, 85, 0.03);
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag-approved { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.status-tag-pending  { background: rgba(255, 167, 38, 0.15); color: #ffa726; }
.status-tag-rejected { background: rgba(244, 67, 54, 0.15); color: #ef5350; }

/* 帖子行缩略图 */
.post-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.post-thumb-placeholder {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 18px;
}

.post-row-excerpt {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 操作按钮 */
.action-cell {
    white-space: nowrap;
}

.btn-action {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
    transition: all var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-view    { background: var(--bg-elevated); color: var(--text-muted); }
.btn-view:hover { color: var(--text); border-color: var(--border); }

.btn-approve { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.btn-approve:hover { background: rgba(76, 175, 80, 0.25); }

.btn-reject  { background: rgba(255, 167, 38, 0.15); color: #ffa726; }
.btn-reject:hover { background: rgba(255, 167, 38, 0.25); }

.btn-delete  { background: rgba(244, 67, 54, 0.15); color: #ef5350; }
.btn-delete:hover { background: rgba(244, 67, 54, 0.25); }

/* IP 代码标签 */
.ip-code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

/* ----- 设置页 ----- */
.settings-sections {
    max-width: 800px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
}

.settings-card-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.settings-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.settings-form .setting-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.settings-form .setting-row:last-of-type {
    border-bottom: none;
}

.setting-label strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

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

.setting-label-inline {
    font-size: 14px;
    color: var(--text);
    min-width: 120px;
}

.input-number {
    width: 80px;
    padding: 6px 10px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.input-text {
    width: 240px;
    padding: 6px 10px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

/* 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: var(--transition);
}

.slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.switch input:checked + .slider {
    background: rgba(255, 70, 85, 0.3);
    border-color: var(--accent);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
    background: var(--accent);
}

.settings-form .btn-primary {
    margin-top: 20px;
}

/* 审核流程 */
.audit-flow {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.flow-step {
    text-align: center;
    width: 140px;
}

.flow-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.flow-step h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.flow-step p {
    font-size: 12px;
    color: var(--text-muted);
}

.flow-arrow {
    color: var(--border);
    font-size: 20px;
    margin-top: 6px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ----- 页脚 ----- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 20px;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

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

    .main-nav {
        width: 100%;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .main-nav a {
        padding: 4px 10px;
        font-size: 13px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .container {
        padding: 16px 12px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .post-detail-meta {
        justify-content: center;
    }

    .auth-card {
        padding: 24px 20px;
        margin: 0 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 28px;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }

    .action-cell .btn-action {
        margin-bottom: 4px;
    }

    .audit-flow {
        flex-direction: column;
        align-items: center;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .settings-form .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        justify-content: center;
    }
}
