/**
 * Objector Community Styles
 */

/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --surface: #252545;
  --surface2: #2d2d50;
  --hover: #3a3a5c;
  --text: #e8e8f0;
  --text2: #a0a0c0;
  --muted: #6a6a90;
  --border: #3a3a5c;
  --accent: #89b4fa;
  --accent2: #a29bfe;
  --green: #a6e3a1;
  --red: #f38ba8;
  --yellow: #f9e2af;
  --radius: 10px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent2); }

/* ============================================================
   Navigation
   ============================================================ */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.nav-logo:hover { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 14px;
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: var(--hover); }
.nav-link.active { color: var(--accent); background: rgba(137, 180, 250, 0.1); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.nav-user:hover { background: var(--hover); }
.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.nav-username { font-size: 13px; color: var(--text); }
.nav-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  color: var(--text);
  display: inline-block;
}
.nav-btn:hover { background: var(--hover); }
.nav-btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.nav-btn-primary:hover { background: var(--accent2); }
.nav-btn-accent { background: var(--green); color: var(--bg); border-color: var(--green); font-weight: 600; }
.nav-btn-accent:hover { background: #8dd39a; border-color: #8dd39a; }
.nav-btn-ghost { background: transparent; }

/* ============================================================
   Layout
   ============================================================ */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text2);
  font-size: 15px;
}
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: inherit;
}
.card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg2);
  position: relative;
}
.card-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
  z-index: 2;
}
.card:hover .card-delete-btn { opacity: 1; }
.card-delete-btn:hover { background: rgba(220,50,50,0.85); }
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.3;
}
.card-body {
  padding: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-preview {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.card-author { color: var(--text2); }
.card-stats { display: flex; gap: 12px; }
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bg);
}
.card-time { font-size: 11px; color: var(--muted); }

/* ============================================================
   Grid Layouts
   ============================================================ */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title a {
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  margin-left: auto;
}
.section { margin-bottom: 48px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.btn:hover { background: var(--hover); border-color: var(--accent); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); color: var(--bg); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 10px 28px; font-size: 15px; }

/* ============================================================
   Forms
   ============================================================ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  line-height: 1.6;
}
.form-select option { background: var(--bg2); }
.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.md-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.md-btn:hover { border-color: var(--accent); color: var(--accent); }
.md-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ============================================================
   Comments
   ============================================================ */
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.comment-author:hover { color: var(--accent2); }
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.comment-time { font-size: 11px; color: var(--muted); }
.comment-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}
.comment-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
.comment-input:focus { border-color: var(--accent); }
.comment-submit { align-self: flex-end; }
.comment-form-locked {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   Like Button
   ============================================================ */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.like-btn:hover { border-color: var(--red); color: var(--red); }
.like-btn.liked { border-color: var(--red); color: var(--red); background: rgba(243, 139, 168, 0.1); }
.like-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.page-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ============================================================
   Empty State & Loading
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 15px; color: var(--muted); }
.empty-hint {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px;
  color: var(--muted);
  font-size: 14px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px 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;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-info { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.toast-success { background: rgba(166, 227, 161, 0.15); color: var(--green); border: 1px solid var(--green); }
.toast-error { background: rgba(243, 139, 168, 0.15); color: var(--red); border: 1px solid var(--red); }

/* ============================================================
   Detail Page
   ============================================================ */
.detail-header {
  margin-bottom: 32px;
}
.detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text2);
  font-size: 14px;
  flex-wrap: wrap;
}
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-content h1, .detail-content h2, .detail-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--accent);
}
.detail-content code {
  background: var(--bg2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Cascadia Code', monospace;
  font-size: 13px;
}
.detail-content pre {
  background: var(--bg2);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 12px 0;
}
.detail-content pre code {
  background: transparent;
  padding: 0;
}
.detail-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}
.detail-main { min-width: 0; }
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.side-card h3 {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 12px;
}

/* ============================================================
   Profile Page
   ============================================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info h1 {
  font-size: 24px;
  margin-bottom: 4px;
}
.profile-info p { color: var(--text2); font-size: 14px; }
.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.profile-stats span strong { color: var(--text); }

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .form-input {
  width: auto;
  min-width: 200px;
  padding: 6px 12px;
  font-size: 13px;
}
.filter-bar .form-select {
  width: auto;
  padding: 6px 12px;
  font-size: 13px;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-tab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Post List */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-list .card {
  display: block;
}
.post-list .card-body {
  padding: 16px 20px;
}

/* ============================================================
   Login Page
   ============================================================ */
.auth-container {
  max-width: 420px;
  margin: 80px auto;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.auth-container h1 {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}
.auth-container p {
  color: var(--text2);
  text-align: center;
  margin-bottom: 24px;
  font-size: 14px;
}
.auth-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.auth-toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.auth-toggle-btn.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

/* ============================================================
   Post / Article Detail
   ============================================================ */
.post-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.post-header {
  margin-bottom: 24px;
}
.post-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 12px 0;
  line-height: 1.3;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text2);
  font-size: 14px;
  flex-wrap: wrap;
}
.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.post-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bg);
}
.badge-general { background: #89b4fa; }
.badge-question { background: #f9e2af; }
.badge-tutorial { background: #a6e3a1; }
.badge-showcase { background: #f38ba8; }
.badge-learn { background: #cba6f7; }
.user-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
}
.user-link:hover { color: var(--accent2); }
.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-list {
  margin-top: 16px;
}
.comments-section h3 {
  margin-bottom: 16px;
}

/* ============================================================
   Markdown Rendered Content
   ============================================================ */
.markdown-body {
  font-size: 15px;
  line-height: 1.8;
}
.markdown-body h1 { font-size: 24px; margin: 24px 0 12px; }
.markdown-body h2 { font-size: 20px; margin: 20px 0 10px; }
.markdown-body h3 { font-size: 17px; margin: 16px 0 8px; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin-bottom: 12px; }
.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text2);
}
.markdown-body img { max-width: 100%; border-radius: var(--radius-sm); }
.markdown-body a { color: var(--accent); }
.markdown-body a:hover { text-decoration: underline; }

/* ============================================================
   Hero Banner
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 24px 64px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 50%, var(--bg2) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(137, 180, 250, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.hero-content h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero-content p {
  font-size: 17px;
  color: var(--text2);
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(137, 180, 250, 0.06);
}

/* ============================================================
   Section Headers
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.view-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.view-all:hover { color: var(--accent2); }

/* ============================================================
   Card List (for posts on homepage)
   ============================================================ */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-list .card {
  display: block;
}

/* ============================================================
   Load More 加载更多
   ============================================================ */
.card-wrapper {
  display: block;
}
.card-wrapper.card-hidden {
  display: none !important;
}
/* 网格布局中卡片填满包装容器 */
.card-grid > .card-wrapper > .card {
  width: 100%;
  height: 100%;
}
.load-more-wrap {
  text-align: center;
  padding: 16px 0;
  grid-column: 1 / -1;
}
.load-more-btn {
  min-width: 180px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.load-more-btn:hover {
  background: var(--hover);
  border-color: var(--accent);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* ============================================================
   User Card
   ============================================================ */
.user-card {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 14px;
}
.user-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.user-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.user-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.user-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.user-card-bio {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-joined {
  font-size: 11px;
  color: var(--muted);
}

/* Search input focus */
#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(137,180,250,0.15);
}

/* ============================================================
   Utility
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   Avatar Upload (Profile)
   ============================================================ */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.profile-avatar-wrap:hover .profile-avatar-overlay {
  opacity: 1;
}
.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-danger-text {
  color: #f38ba8 !important;
  border-color: #f38ba8 !important;
}
.btn-danger-text:hover {
  background: rgba(243,139,168,0.1) !important;
}

/* ============================================================
   Modal Overlay
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border, #313244);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.modal-content h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.modal-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg, #181825);
  border: 1px solid var(--border, #313244);
  border-radius: 6px;
  color: var(--text, #cdd6f4);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.modal-input:focus {
  border-color: var(--accent, #89b4fa);
}

/* Avatar preview modal */
.avatar-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}
.avatar-preview-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent, #89b4fa);
}

/* Delete account modal */
.delete-modal ul {
  line-height: 1.6;
}

/* Thumb preview modal */
.thumb-modal {
  max-width: 480px;
}
.thumb-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  background: var(--bg, #181825);
  border-radius: 8px;
  padding: 12px;
}
.thumb-preview-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 6px;
  object-fit: contain;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-links { display: none; }
  .page-container { padding: 20px 16px; }
  .detail-sidebar { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; padding: 24px; }
  .card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .card-grid-2 { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 22px; }
}
