/* ============================================
   至叻粵語論壇 - 樣式表
   ============================================ */

:root {
    --primary: #C41E3A;
    --primary-dark: #9B1B30;
    --primary-light: #E8405A;
    --secondary: #D4A843;
    --secondary-light: #F0D078;
    --bg: #FFF8F0;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --text: #2C2C2C;
    --text-light: #666;
    --text-muted: #999;
    --border: #E8E0D5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-display: "STSong", "Songti SC", "Noto Serif SC", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-cn); color: var(--text); background: var(--bg); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   Header
   ============================================ */
.bbs-header {
    background: var(--bg-dark);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}
.bbs-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.bbs-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}
.bbs-logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; font-weight: bold;
}
.bbs-nav-list {
    display: flex; list-style: none; gap: 4px;
}
.bbs-nav-list a {
    display: block; padding: 8px 16px; border-radius: 6px;
    color: rgba(255,255,255,0.8); font-size: 0.9rem; transition: var(--transition);
}
.bbs-nav-list a:hover { background: var(--primary); color: #fff; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #fff; }

/* ============================================
   User Bar
   ============================================ */
.user-bar {
    background: #fff; border-bottom: 1px solid var(--border); padding: 10px 0;
}
.user-bar-inner {
    display: flex; align-items: center; justify-content: space-between;
}
.user-bar-left { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.user-bar-right { display: flex; align-items: center; gap: 16px; }
.user-avatar-sm {
    width: 32px; height: 32px; background: var(--primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: bold;
}
.user-stat { color: var(--text-muted); }
.notify-badge {
    background: #FFF3CD; color: #856404; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb-bar { padding: 12px 0; }
.breadcrumb-nav { font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb-nav a { color: var(--text-light); }
.breadcrumb-sep { margin: 0 8px; }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; border-radius: 8px; font-size: 0.95rem;
    font-weight: 600; border: none; cursor: pointer;
    transition: var(--transition); font-family: var(--font-cn);
    background: #f0f0f0; color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(196,30,58,0.3); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; justify-content: center; }
.btn-sm { padding: 4px 12px; font-size: 0.82rem; border-radius: 4px; background: #f0f0f0; border: none; cursor: pointer; }
.btn-post { background: var(--primary); color: #fff; padding: 8px 20px; border-radius: 8px; font-size: 0.9rem; }

/* ============================================
   Flash Messages
   ============================================ */
.flash-message {
    padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.95rem;
}
.flash-success { background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB; }
.flash-error { background: #F8D7DA; color: #721C24; border: 1px solid #F5C6CB; }
.flash-warning { background: #FFF3CD; color: #856404; border: 1px solid #FFEEBA; }
.flash-info { background: #D1ECF1; color: #0C5460; border: 1px solid #BEE5EB; }

/* ============================================
   Main Layout
   ============================================ */
.bbs-main { padding: 24px 0 48px; min-height: 60vh; }
.bbs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.bbs-content-full { grid-column: 1 / -1; }

/* ============================================
   Sidebar
   ============================================ */
.sidebar-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.sidebar-card h3 {
    font-size: 1rem; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 2px solid var(--primary); color: var(--text);
}
.category-list { list-style: none; }
.category-list li { margin-bottom: 2px; }
.category-list a {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border-radius: 8px; color: var(--text); font-size: 0.9rem; transition: var(--transition);
}
.category-list a:hover, .category-list a.active {
    background: rgba(196,30,58,0.08); color: var(--primary); font-weight: 600;
}
.cat-count { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }
.sidebar-login { text-align: center; }
.sidebar-login p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 14px; }

/* Stats Mini */
.stats-mini { display: flex; justify-content: space-around; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.stat-lbl { display: block; font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   Category Header
   ============================================ */
.category-header {
    background: #fff; border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.category-header h2 { font-size: 1.3rem; margin-bottom: 6px; }
.category-header p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }

/* ============================================
   Thread List
   ============================================ */
.thread-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.thread-item {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
    border-bottom: 1px solid var(--border); transition: var(--transition);
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: rgba(196,30,58,0.02); }
.thread-item.pinned { background: rgba(212,168,67,0.06); }
.thread-avatar { flex-shrink: 0; }
.avatar-circle {
    width: 40px; height: 40px; background: var(--primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: bold;
}
.avatar-circle-sm {
    width: 24px; height: 24px; background: var(--primary); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: bold; vertical-align: middle; margin-right: 4px;
}
.avatar-circle-xl {
    width: 80px; height: 80px; background: var(--primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: bold; flex-shrink: 0;
}
.thread-main { flex: 1; min-width: 0; }
.thread-title {
    font-size: 1rem; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-title a { color: var(--text); }
.thread-title a:hover { color: var(--primary); }
.thread-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-muted); }
.thread-cat {
    background: rgba(196,30,58,0.08); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-size: 0.78rem;
}
.thread-stats { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--text-muted); text-align: center; flex-shrink: 0; }
.thread-last-reply { font-size: 0.8rem; color: var(--text-muted); text-align: right; flex-shrink: 0; min-width: 80px; }
.last-reply-user { display: block; }
.last-reply-time { display: block; font-size: 0.75rem; }

/* Badges */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; margin-right: 4px;
}
.badge-pin { background: #FFF3CD; color: #856404; }
.badge-essence { background: #D4EDDA; color: #155724; }
.badge-hot { background: #F8D7DA; color: #721C24; }
.badge-locked { background: #E2E3E5; color: #383D41; }

/* ============================================
   Thread Detail
   ============================================ */
.thread-detail {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px;
}
.thread-header h2 { font-size: 1.4rem; margin-bottom: 14px; line-height: 1.5; }
.thread-info-bar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
    font-size: 0.85rem; color: var(--text-muted);
}
.thread-author { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.thread-content { line-height: 2; font-size: 1rem; padding: 8px 0; }
.thread-content p { margin-bottom: 12px; }
.thread-footer {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
    font-size: 0.85rem; color: var(--text-muted);
}

/* ============================================
   Reply Section
   ============================================ */
.reply-section { margin-bottom: 32px; }
.reply-section h3 { font-size: 1.15rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.reply-item {
    display: flex; gap: 16px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; margin-bottom: 12px;
}
.reply-sidebar {
    width: 80px; flex-shrink: 0; text-align: center; padding-top: 4px;
}
.reply-sidebar .avatar-circle { margin: 0 auto 8px; }
.reply-username { font-size: 0.85rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 4px; }
.reply-user-stats { font-size: 0.7rem; color: var(--text-muted); }
.reply-body { flex: 1; min-width: 0; }
.reply-meta { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.reply-floor { font-weight: 600; color: var(--primary); }
.reply-content { line-height: 1.9; font-size: 0.95rem; }
.reply-signature { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.8rem; color: var(--text-muted); }
.reply-form-section {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.reply-form-section h3 { font-size: 1.1rem; margin-bottom: 14px; }

/* ============================================
   New Thread Page
   ============================================ */
.new-thread-page { max-width: 960px; margin: 0 auto; padding: 24px 0 48px; }
.new-thread-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px 40px;
}
.new-thread-header { margin-bottom: 28px; }
.new-thread-header h2 { font-size: 1.5rem; margin-bottom: 8px; font-family: var(--font-display); }
.new-thread-header p { color: var(--text-light); font-size: 0.9rem; }

.form-row { display: flex; gap: 16px; margin-bottom: 18px; }
.form-row .form-group { margin-bottom: 0; }

/* Editor Toolbar */
.editor-toolbar {
    display: flex; align-items: center; gap: 4px; padding: 8px 12px;
    background: #f8f6f0; border: 1px solid var(--border); border-radius: 10px 10px 0 0;
    border-bottom: none; flex-wrap: wrap;
}
.tb-btn {
    padding: 6px 12px; border: 1px solid transparent; border-radius: 6px;
    background: transparent; cursor: pointer; font-size: 0.88rem; font-weight: 600;
    color: var(--text-light); transition: var(--transition); font-family: var(--font-cn);
}
.tb-btn:hover { background: #fff; border-color: var(--border); color: var(--primary); }
.tb-btn em { font-family: Georgia, serif; }
.tb-divider { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.tb-hint { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); }

/* Editor Area */
.editor-area {
    position: relative;
    border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px;
    transition: var(--transition);
}
.editor-area:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,30,58,0.1); }
.editor-area.drag-over { border-color: var(--primary); background: rgba(196,30,58,0.03); }
.editor-area.drag-over::after {
    content: '鬆開滑鼠上傳圖片'; position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem; color: var(--primary);
    background: rgba(196,30,58,0.06); z-index: 10; pointer-events: none;
}
.editor-area textarea {
    display: block; width: 100%; padding: 16px; border: none; border-radius: 0 0 10px 10px;
    font-size: 0.95rem; font-family: var(--font-cn); line-height: 1.8;
    resize: vertical; background: transparent; color: var(--text);
}
.editor-area textarea:focus { outline: none; }

/* Upload Preview */
.upload-preview {
    display: flex; gap: 8px; padding: 8px 16px 12px; flex-wrap: wrap;
    border-top: 1px dashed var(--border);
}
.preview-item { height: 50px; border-radius: 6px; object-fit: cover; }
.preview-loading {
    display: flex; align-items: center; padding: 0 12px;
    background: #f0f0f0; color: var(--text-muted); font-size: 0.82rem;
}

/* Form Actions */
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.btn-lg { padding: 12px 32px; font-size: 1.05rem; }
.btn-ghost {
    padding: 10px 20px; border-radius: 8px; font-size: 0.95rem;
    color: var(--text-light); background: transparent; border: 1px solid var(--border);
    transition: var(--transition);
}
.btn-ghost:hover { background: #f0f0f0; color: var(--text); }

/* Form group shared */
.new-thread-card .form-group { margin-bottom: 18px; }
.new-thread-card .form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.new-thread-card .form-group select,
.new-thread-card .form-group input[type="text"] {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.95rem; font-family: var(--font-cn); transition: var(--transition); background: #fff;
}
.new-thread-card .form-group select:focus,
.new-thread-card .form-group input:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,30,58,0.1);
}

/* Content Images */
.content-img {
    max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: block;
}
.thread-content .content-img { max-width: 100%; }
.reply-content .content-img { max-width: 100%; }

/* ============================================
   Markdown Content Styles
   ============================================ */
.thread-content h1, .reply-content h1 { font-size: 1.6rem; margin: 1.2em 0 0.6em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
.thread-content h2, .reply-content h2 { font-size: 1.4rem; margin: 1.1em 0 0.5em; padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
.thread-content h3, .reply-content h3 { font-size: 1.2rem; margin: 1em 0 0.4em; }
.thread-content h4, .reply-content h4 { font-size: 1.05rem; margin: 0.9em 0 0.35em; }
.thread-content h5, .reply-content h5 { font-size: 0.95rem; margin: 0.8em 0 0.3em; }
.thread-content h6, .reply-content h6 { font-size: 0.88rem; color: var(--text-muted); margin: 0.7em 0 0.25em; }

.thread-content ul, .reply-content ul,
.thread-content ol, .reply-content ol {
    padding-left: 1.8em; margin: 8px 0;
}
.thread-content li, .reply-content li { margin: 3px 0; line-height: 1.7; }

.thread-content blockquote, .reply-content blockquote {
    margin: 10px 0; padding: 10px 16px;
    border-left: 4px solid var(--primary);
    background: #FFF5F5; color: #7F1D1D;
    border-radius: 0 8px 8px 0;
}
.thread-content blockquote p, .reply-content blockquote p { margin: 4px 0; }

.thread-content code, .reply-content code {
    background: #F3F4F6; color: #D63031;
    padding: 2px 6px; border-radius: 4px;
    font-size: 0.9em; font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-word;
}
.thread-content pre, .reply-content pre {
    background: #1E293B; color: #E2E8F0;
    padding: 16px; border-radius: 10px;
    overflow-x: auto; margin: 12px 0;
    font-size: 0.88rem; line-height: 1.6;
}
.thread-content pre code, .reply-content pre code {
    background: none; color: inherit; padding: 0; border-radius: 0; font-size: inherit;
}

.thread-content del, .reply-content del {
    color: var(--text-muted); text-decoration: line-through;
}

.thread-content hr, .reply-content hr {
    border: none; border-top: 2px dashed var(--border);
    margin: 16px 0;
}

.thread-content table, .reply-content table {
    width: 100%; border-collapse: collapse; margin: 12px 0;
    font-size: 0.9rem;
}
.thread-content th, .reply-content th,
.thread-content td, .reply-content td {
    border: 1px solid var(--border); padding: 8px 12px;
    text-align: left;
}
.thread-content th, .reply-content th {
    background: #F8F7F4; font-weight: 600;
}
.thread-content tr:nth-child(even) td, .reply-content tr:nth-child(even) td {
    background: #FAFAF8;
}

.thread-content a, .reply-content a {
    color: var(--primary); text-decoration: underline;
    word-break: break-all;
}
.thread-content a:hover, .reply-content a:hover {
    color: #A01830;
}

/* ============================================
   Media Player
   ============================================ */
.media-wrapper { margin: 14px 0; }
.video-container {
    position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
    background: #000; border-radius: 10px; overflow: hidden;
}
.video-container iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.media-video {
    width: 100%; max-width: 100%; border-radius: 10px;
    background: #000; display: block;
}
.media-audio {
    width: 100%; max-width: 480px; display: block; outline: none;
    border-radius: 8px;
}
/* 自定義音訊播放器樣式 */
.media-audio::-webkit-media-controls-panel {
    background: #f5f2eb;
}
.media-audio::-webkit-media-controls-play-button {
    filter: invert(12%) sepia(78%) saturate(4532%) hue-rotate(345deg) brightness(93%) contrast(97%);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page { max-width: 440px; margin: 48px auto; padding: 0 20px; }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 { font-size: 1.5rem; margin-bottom: 8px; font-family: var(--font-display); }
.auth-header p { color: var(--text-light); font-size: 0.9rem; }
.auth-form .form-group { margin-bottom: 18px; }
.auth-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.95rem; font-family: var(--font-cn); transition: var(--transition);
}
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,30,58,0.1); }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-light); }

/* ============================================
   Profile
   ============================================ */
.profile-card {
    display: flex; gap: 28px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 32px; margin-bottom: 28px; align-items: center;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 1.4rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.profile-stats { display: flex; gap: 18px; font-size: 0.9rem; color: var(--text-light); margin-bottom: 14px; flex-wrap: wrap; }
.profile-signature { color: var(--text-muted); font-size: 0.9rem; }
.signature-form { display: flex; gap: 8px; }
.profile-section { margin-bottom: 28px; }
.profile-section h3 { font-size: 1.1rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.text-muted { color: var(--text-muted); }
.role-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.role-admin { background: #C41E3A; color: #fff; }
.role-user { background: #E8E0D5; color: #666; }

/* ============================================
   Notifications
   ============================================ */
.page-header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.notify-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.notify-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 20px;
    border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.notify-item.unread { background: rgba(196,30,58,0.03); }
.notify-item:last-child { border-bottom: none; }
.notify-type { flex-shrink: 0; font-size: 0.82rem; color: var(--text-muted); min-width: 130px; }
.notify-msg { flex: 1; min-width: 0; }
.notify-time { flex-shrink: 0; font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-state p { font-size: 1.1rem; margin-bottom: 16px; }

/* ============================================
   Pagination
   ============================================ */
.pagination { margin-top: 24px; }
.pagination ul { display: flex; list-style: none; gap: 4px; justify-content: center; }
.pagination li a, .pagination li span {
    display: block; padding: 8px 14px; border-radius: 6px;
    font-size: 0.9rem; background: #fff; border: 1px solid var(--border);
    color: var(--text); transition: var(--transition);
}
.pagination li a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination li.active span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   Admin
   ============================================ */
.admin-header { background: var(--bg-dark); padding: 20px 0 0; }
.admin-header h1 { color: #fff; font-size: 1.4rem; margin-bottom: 12px; }
.admin-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.admin-nav a {
    display: block; padding: 10px 20px; color: rgba(255,255,255,0.7); font-size: 0.9rem;
    border-radius: 8px 8px 0 0; transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { background: #fff; color: var(--primary); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat-card {
    display: flex; gap: 16px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px; align-items: center;
}
.stat-icon { font-size: 2rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-light); }
.stat-today { font-size: 0.78rem; color: #2A9D8F; margin-top: 4px; }
.admin-section { margin-bottom: 32px; }
.admin-section h3 { font-size: 1.1rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }

/* Data Table */
.data-table {
    width: 100%; border-collapse: collapse; background: #fff;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { background: var(--bg-dark); color: #fff; font-weight: 600; }
.data-table tr:hover td { background: rgba(196,30,58,0.02); }

/* ============================================
   Footer
   ============================================ */
.bbs-footer {
    background: var(--bg-dark); color: rgba(255,255,255,0.6); padding: 28px 0; text-align: center;
}
.footer-stats { margin-bottom: 10px; display: flex; justify-content: center; gap: 24px; font-size: 0.85rem; }
.footer-copy { font-size: 0.8rem; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .bbs-layout { grid-template-columns: 1fr; }
    .bbs-sidebar { display: none; }
    .thread-item { flex-wrap: wrap; }
    .thread-stats { flex-direction: row; gap: 12px; }
    .thread-last-reply { display: none; }
    .profile-card { flex-direction: column; text-align: center; }
    .profile-stats { justify-content: center; }
}
@media (max-width: 640px) {
    .menu-toggle { display: block; }
    .bbs-nav {
        position: fixed; top: 60px; left: 0; right: 0;
        background: var(--bg-dark); padding: 12px;
        transform: translateY(-100%); opacity: 0; pointer-events: none;
        transition: var(--transition); z-index: 99;
    }
    .bbs-nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .bbs-nav-list { flex-direction: column; }
    .thread-info-bar { gap: 8px; }
    .reply-item { flex-direction: column; }
    .reply-sidebar { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; }
    .reply-sidebar .avatar-circle { margin: 0; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-nav { overflow-x: auto; }
    .admin-nav a { white-space: nowrap; font-size: 0.82rem; padding: 8px 12px; }
    .user-bar-left { display: none; }
    .new-thread-card { padding: 20px 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .form-row .form-group:first-child { margin-bottom: 12px; }
    .editor-toolbar { gap: 2px; padding: 6px 8px; }
    .tb-btn { padding: 4px 8px; font-size: 0.8rem; }
    .tb-hint { display: none; }
}
