/* ═══════════════════════════════════════════════════════
   群友语录应援会 — 白色主题设计系统
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Outfit:wght@300;400;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────── */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-modal: rgba(0, 0, 0, 0.4);

  --accent: #1a73e8;
  --accent-dim: rgba(26, 115, 232, 0.08);
  --accent-glow: rgba(26, 115, 232, 0.15);
  --accent-hover: #1557b0;

  --text-primary: #1a1a2e;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;
  --text-accent: #1a73e8;

  --border: #e0e0e0;
  --border-active: #1a73e8;
  --border-light: #f0f0f0;

  --like-color: #e8384f;
  --success: #34a853;
  --danger: #ea4335;
  --warning: #fbbc04;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-cn: 'Noto Sans SC', sans-serif;
  --font-en: 'Outfit', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --bg-navbar: rgba(255, 255, 255, 0.92);
}

/* ── Dark Mode ────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2940;
    --bg-card-hover: #263350;
    --bg-modal: rgba(0, 0, 0, 0.6);
    --bg-navbar: rgba(26, 26, 46, 0.92);

    --accent: #4da3ff;
    --accent-dim: rgba(77, 163, 255, 0.12);
    --accent-glow: rgba(77, 163, 255, 0.2);
    --accent-hover: #3b8de8;

    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #6b7280;
    --text-accent: #4da3ff;

    --border: #2d3748;
    --border-active: #4da3ff;
    --border-light: #2d3748;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.2);
  }
}

[data-theme="dark"] {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2940;
  --bg-card-hover: #263350;
  --bg-modal: rgba(0, 0, 0, 0.6);
  --bg-navbar: rgba(26, 26, 46, 0.92);

  --accent: #4da3ff;
  --accent-dim: rgba(77, 163, 255, 0.12);
  --accent-glow: rgba(77, 163, 255, 0.2);
  --accent-hover: #3b8de8;

  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #6b7280;
  --text-accent: #4da3ff;

  --border: #2d3748;
  --border-active: #4da3ff;
  --border-light: #2d3748;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* ── Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--text-accent);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea,
select {
  font-family: inherit;
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-navbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 0.3s var(--ease);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.navbar-brand .logo-icon {
  font-size: 1.4rem;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #d32f2f;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ── User avatar ───────────────────────────────────── */
.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.user-avatar-btn:hover {
  border-color: var(--accent);
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 52px;
  right: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}

.user-dropdown.show {
  display: block;
  animation: fadeIn 0.15s var(--ease);
}

.user-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}

.user-dropdown-header .dropdown-username {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-dropdown-header .dropdown-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-dropdown button {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: 0.85rem;
  transition: background 0.15s var(--ease);
}

.user-dropdown button:hover {
  background: var(--accent-dim);
}

/* ══════════════════════════════════════════════════════
   HERO — 简洁标题区
   ══════════════════════════════════════════════════════ */
.hero {
  padding: 96px 32px 24px;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ══════════════════════════════════════════════════════
   GROUP TABS
   ══════════════════════════════════════════════════════ */
.group-tabs {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
  margin: 0;
  padding: 12px 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-secondary, #f0f2f5);
  border-bottom: 1px solid var(--border-light);
}

.group-tabs::-webkit-scrollbar {
  display: none;
}

.group-tab {
  flex-shrink: 0;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.group-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.group-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

/* ══════════════════════════════════════════════════════
   QUOTES GRID
   ══════════════════════════════════════════════════════ */
.quotes-section {
  max-width: 100%;
  margin: 110px auto 0;
  padding: 0 48px 80px;
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.quotes-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.quotes-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.quotes-empty .empty-text {
  font-size: 0.95rem;
}

/* ── Quote Card ────────────────────────────────────── */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease);
  opacity: 0;
  transform: translateY(16px);
  animation: cardIn 0.45s var(--ease) forwards;
}

.quote-card:nth-child(1) {
  animation-delay: 0s;
}

.quote-card:nth-child(2) {
  animation-delay: 0.04s;
}

.quote-card:nth-child(3) {
  animation-delay: 0.08s;
}

.quote-card:nth-child(4) {
  animation-delay: 0.12s;
}

.quote-card:nth-child(5) {
  animation-delay: 0.16s;
}

.quote-card:nth-child(6) {
  animation-delay: 0.2s;
}

.quote-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quote-card .card-quote-mark {
  font-size: 1.6rem;
  color: var(--accent-dim);
  font-family: Georgia, serif;
  line-height: 1;
  margin-bottom: 6px;
  user-select: none;
  color: var(--accent);
  opacity: 0.25;
}

.quote-card .card-content {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.quote-card .card-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  max-height: 300px;
  object-fit: cover;
}

.quote-card .card-context {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

.quote-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.quote-card .card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.quote-card .card-author-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-accent);
}

.quote-card .card-date {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.quote-card .card-group-tag {
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
}

.quote-card .card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Like / Delete ─────────────────────────────────── */
.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
}

.like-btn:hover {
  color: var(--like-color);
  background: rgba(232, 56, 79, 0.06);
}

.like-btn.liked {
  color: var(--like-color);
  border-color: rgba(232, 56, 79, 0.2);
  background: rgba(232, 56, 79, 0.06);
}

.like-btn .like-icon {
  font-size: 0.95rem;
}

.delete-btn {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: all 0.2s var(--ease);
}

.delete-btn:hover {
  color: var(--danger);
  background: rgba(234, 67, 53, 0.06);
}

/* ── Pagination ────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination button {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: all 0.2s var(--ease);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination .page-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.15s var(--ease);
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s var(--ease);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all 0.15s var(--ease);
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
}

.form-row .btn {
  height: 42px;
  flex-shrink: 0;
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Auth tabs ─────────────────────────────────────── */
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s var(--ease);
  text-align: center;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ══════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.info {
  border-left: 3px solid var(--accent);
}

.toast.leaving {
  animation: slideOutRight 0.25s var(--ease) forwards;
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 28px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Loading ───────────────────────────────────────── */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(80px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .navbar-brand span.brand-text {
    display: none;
  }

  .hero {
    padding: 80px 16px 16px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .group-tabs {
    padding: 0 16px;
  }

  .quotes-section {
    padding: 0 16px 60px;
  }

  .quotes-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .quotes-section {
    padding: 0 16px 80px;
  }

  /* Mobile bottom nav */
  .mobile-nav {
    display: flex;
  }

  .navbar-actions .btn,
  .navbar-actions #authButtons,
  .navbar-actions #userSection {
    /* keep visible on mobile */
  }
}

/* ══════════════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════════════ */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
  margin-bottom: 10px;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.long {
  width: 100%;
}

.skeleton-line.title {
  height: 20px;
  width: 60%;
  margin-bottom: 14px;
}

.skeleton-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -120%) scale(2);
  }
}

/* ══════════════════════════════════════════════════════
   QUOTE DETAIL MODAL
   ══════════════════════════════════════════════════════ */
.qd-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(6px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qd-overlay.show {
  display: flex;
  animation: fadeIn 0.15s var(--ease);
}

.qd-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s var(--ease);
}

.qd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.qd-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.qd-body {
  padding: 16px 24px 24px;
}

.qd-content {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.qd-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  max-height: 400px;
  object-fit: cover;
  cursor: zoom-in;
}

.qd-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qd-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.qd-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.qd-tab:hover {
  color: var(--text-primary);
}

.qd-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.qd-tab-content {
  display: none;
}

.qd-tab-content.active {
  display: block;
}

.qd-like-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.qd-like-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.qd-like-item .like-user {
  font-size: 0.85rem;
  font-weight: 500;
}

.qd-like-item .like-time {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════
   TAGS
   ══════════════════════════════════════════════════════ */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
}

.tag-pill:hover {
  background: var(--accent);
  color: #fff;
}

.tag-pill.active {
  background: var(--accent);
  color: #fff;
}

.tags-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 48px;
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ══════════════════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-navbar);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  z-index: 100;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 0.7rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.mobile-nav-item .nav-icon {
  font-size: 1.2rem;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }

  .footer {
    padding-bottom: 70px;
  }

  .quotes-section {
    padding-bottom: 80px;
  }

  .tags-bar {
    padding: 0 16px;
  }
}

/* ══════════════════════════════════════════════════════
   USER PROFILE MODAL
   ══════════════════════════════════════════════════════ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-dim);
}

.profile-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-info .profile-role {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}