:root {
  --app-bg: #f7f9ff;
  --card-bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --brand: #6d5efc;
  --brand-2: #8a7cff;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius: 18px;
  --stroke: rgba(17, 24, 39, 0.06);
  --accent: #ff7a2f;
  --accent-2: #ffa15d;
}

html[data-bs-theme="dark"] {
  --app-bg: #0b1220;
  --card-bg: #0f1a30;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --brand: #8a7cff;
  --brand-2: #b2a9ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --stroke: rgba(255, 255, 255, 0.08);
  --accent: #ff8b44;
  --accent-2: #ffb07a;
}

* {
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.app-bg {
  background: radial-gradient(1200px 500px at 60% -40%, rgba(109, 94, 252, 0.16), transparent 60%),
    radial-gradient(1000px 400px at 20% 0%, rgba(138, 124, 255, 0.12), transparent 55%),
    var(--app-bg);
  color: var(--text);
}

main.pb-bottom-nav {
  padding-top: 22px;
}

.section-wide {
  padding: 26px 0;
}

.section-stats {
  background: transparent;
  border-top: 1px solid color-mix(in srgb, var(--stroke) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--stroke) 55%, transparent);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.stats-panel {
  padding: 14px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--stroke) 75%, transparent);
  backdrop-filter: blur(12px);
}

.content-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.text-secondary {
  color: var(--muted) !important;
}

.text-brand {
  color: var(--brand) !important;
}

.shadow-soft {
  box-shadow: var(--shadow);
}

.app-card {
  background: color-mix(in srgb, var(--card-bg) 96%, transparent);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.app-card .card-body {
  padding: 1rem;
}

@media (min-width: 768px) {
  .app-card .card-body {
    padding: 1.25rem;
  }
}

.hero {
  position: relative;
  min-height: clamp(520px, 70vh, 760px);
  display: flex;
  align-items: stretch;
  padding: 18px 0 28px;
  overflow: hidden;
  color: #eef2ff;
  background: #0b1220;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.10), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.06), transparent 60%);
  filter: blur(6px);
  opacity: 0.85;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.35), rgba(10, 16, 30, 0.65));
  pointer-events: none;
}

/* ===== Statistics Page (Dark) ===== */
.stats-page {
  background: radial-gradient(900px 420px at 70% -10%, rgba(109, 94, 252, 0.22), transparent 60%),
    radial-gradient(900px 420px at 20% 0%, rgba(138, 124, 255, 0.16), transparent 62%),
    var(--app-bg);
}

.stats-header {
  position: relative;
}

.stats-header .hero-brand {
  color: rgba(238, 242, 255, 0.92);
}

html[data-bs-theme="light"] .stats-header .hero-brand {
  color: var(--text);
}

.stats-hero {
  background: rgba(15, 26, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.stats-hero-graphic {
  width: min(340px, 100%);
  aspect-ratio: 2.1 / 1;
  opacity: 0.95;
}

.stats-tabs {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.tab-pill {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tab-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tab-pill.is-active {
  border-color: rgba(138, 124, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(109, 94, 252, 0.15), 0 10px 30px rgba(109, 94, 252, 0.18);
  background: rgba(109, 94, 252, 0.18);
  color: #fff;
}

.hint-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.stats-table-head {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 12px;
  padding: 0 6px 10px;
}

.stats-row {
  background: rgba(15, 26, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.rank-badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #0b1220;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.avatar-lg {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
}

.verified {
  color: rgba(138, 124, 255, 0.95);
}

.metric-num {
  font-weight: 900;
  color: rgba(138, 124, 255, 0.95);
  font-size: 22px;
}

.sparkline {
  opacity: 0.95;
}

.growth {
  font-weight: 900;
  letter-spacing: 0.01em;
}

.growth.up {
  color: #22c55e;
}

.stats-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-btn,
.pager-page {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.pager-page.is-active {
  background: rgba(109, 94, 252, 0.22);
  border-color: rgba(138, 124, 255, 0.55);
  color: #fff;
}

.select-dark {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
}

.select-dark:focus {
  border-color: rgba(138, 124, 255, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(109, 94, 252, 0.15);
}

/* Light mode overrides for statistics page */
html[data-bs-theme="light"] .stats-page {
  background: radial-gradient(900px 420px at 70% -10%, rgba(109, 94, 252, 0.14), transparent 62%),
    radial-gradient(900px 420px at 20% 0%, rgba(138, 124, 255, 0.10), transparent 64%),
    var(--app-bg);
}

html[data-bs-theme="light"] .stats-hero {
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
}

html[data-bs-theme="light"] .stats-page .text-white {
  color: var(--text) !important;
}

html[data-bs-theme="light"] .stats-page .text-white-50 {
  color: var(--muted) !important;
}

/* Light mode overrides for explore page */
html[data-bs-theme="light"] .explore-page {
  background: radial-gradient(900px 420px at 70% -10%, rgba(109, 94, 252, 0.14), transparent 62%),
    radial-gradient(900px 420px at 20% 0%, rgba(138, 124, 255, 0.10), transparent 64%),
    var(--app-bg);
}

html[data-bs-theme="light"] .explore-page .text-white {
  color: var(--text) !important;
}

html[data-bs-theme="light"] .explore-page .text-white-50 {
  color: var(--muted) !important;
}

html[data-bs-theme="light"] .explore-panel,
html[data-bs-theme="light"] .composer,
html[data-bs-theme="light"] .post-card {
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
}

html[data-bs-theme="light"] .chip {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

html[data-bs-theme="light"] .chip.is-active {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  color: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 10%, transparent),
    0 10px 30px rgba(109, 94, 252, 0.12);
}

html[data-bs-theme="light"] .composer-input {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text);
}

html[data-bs-theme="light"] .composer-input::placeholder {
  color: var(--muted);
}

html[data-bs-theme="light"] .btn-ghost,
html[data-bs-theme="light"] .composer-btn,
html[data-bs-theme="light"] .tag-pill {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  color: var(--muted);
}

html[data-bs-theme="light"] .avatar-sm {
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
  color: var(--text);
}

html[data-bs-theme="light"] .status-dot {
  border-color: color-mix(in srgb, var(--card-bg) 92%, transparent);
}

html[data-bs-theme="light"] .post-action {
  color: var(--muted);
}

html[data-bs-theme="light"] .post-action.like-toggle {
  color: var(--muted);
}

html[data-bs-theme="light"] .post-action.like-toggle.is-like {
  color: #2563eb;
}

html[data-bs-theme="light"] .tab-pill {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

html[data-bs-theme="light"] .tab-pill.is-active {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  color: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 10%, transparent),
    0 10px 30px rgba(109, 94, 252, 0.12);
}

html[data-bs-theme="light"] .hint-bar {
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  color: var(--muted);
}

html[data-bs-theme="light"] .stats-row {
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
}

html[data-bs-theme="light"] .rank-badge {
  color: var(--text);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
}

html[data-bs-theme="light"] .avatar-lg {
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
  color: var(--muted);
}

html[data-bs-theme="light"] .metric-num {
  color: var(--brand);
}

html[data-bs-theme="light"] .pager-btn,
html[data-bs-theme="light"] .pager-page {
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
  color: var(--muted);
}

html[data-bs-theme="light"] .pager-page.is-active {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  color: var(--text);
}

html[data-bs-theme="light"] .select-dark {
  background-color: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
  color: var(--text);
}

/* Theme toggle icon visibility */
.btn-hero i,
.btn-soft i {
  font-size: 18px;
}

html[data-bs-theme="dark"] .btn-hero {
  color: rgba(238, 242, 255, 0.95);
}

html[data-bs-theme="light"] .btn-hero {
  border-color: color-mix(in srgb, var(--stroke) 85%, transparent);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  color: var(--text);
}

@media (max-width: 575.98px) {
  .stats-table .stats-row .metric-num {
    font-size: 20px;
  }
}

.hero-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #0b1220;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.55));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-hero {
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(238, 242, 255, 0.95);
  backdrop-filter: blur(10px);
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(238, 242, 255, 1);
}

.btn-accent {
  border: 0;
  color: #0b1220;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(255, 122, 47, 0.26);
}

.btn-accent:hover {
  filter: brightness(1.02);
  color: #0b1220;
}

.btn-outline-hero {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(238, 242, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.btn-outline-hero:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(238, 242, 255, 1);
}

.hero-body {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 6vh, 70px) 0 0;
  text-align: center;
}

.hero-title {
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.12;
  font-size: clamp(44px, 7vw, 84px);
  margin: 0 0 26px;
}

.hero-title-accent {
  background: linear-gradient(135deg, #dbeafe, #a5b4fc 45%, #fed7aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 24px;
  color: rgba(238, 242, 255, 0.80);
  font-size: clamp(15px, 1.2vw + 11px, 18px);
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.stat-pill {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(10, 16, 30, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.stat-number {
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 0.01em;
}

.stat-label {
  color: rgba(238, 242, 255, 0.70);
  font-weight: 700;
  font-size: 12px;
  margin-top: 2px;
}

.btn-soft {
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.btn-soft:hover {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand);
}

.btn-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1.3 / 1;
}

.hero-card {
  width: 72%;
  height: 72%;
  border-radius: 22px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.2), rgba(138, 124, 255, 0.05));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.hero-card i {
  font-size: 64px;
  color: var(--brand);
}

.hero-badge {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06);
  color: var(--brand);
}

.hero-badge-1 {
  top: 8%;
  right: 8%;
}
.hero-badge-2 {
  top: 18%;
  left: 8%;
}
.hero-badge-3 {
  bottom: 14%;
  right: 12%;
}
.hero-badge-4 {
  bottom: 18%;
  left: 10%;
}

.stat-card {
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--stroke);
}

.stat-value {
  font-weight: 900;
  font-size: 22px;
  margin-top: 10px;
  letter-spacing: 0.01em;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.stat-purple {
  color: #7c3aed;
}
.stat-pink {
  color: #ec4899;
}
.stat-indigo {
  color: #6366f1;
}
.stat-green {
  color: #22c55e;
}

.stat-change {
  font-weight: 700;
}
.stat-up {
  color: #16a34a;
}

.review {
  background: var(--card-bg);
  border-radius: 18px;
  height: 100%;
  border: 1px solid var(--stroke);
}

.review-quote {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}

.review-stars {
  color: #fbbf24;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}
.bg-purple {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}
.bg-pink {
  background: linear-gradient(135deg, #ec4899, #f9a8d4);
}
.bg-indigo {
  background: linear-gradient(135deg, #6366f1, #a5b4fc);
}
.bg-green {
  background: linear-gradient(135deg, #22c55e, #86efac);
}

.link-card {
  text-decoration: none;
  border-radius: 18px;
  background: var(--card-bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--text);
  border: 1px solid var(--stroke);
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.link-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 10%, transparent);
  font-size: 22px;
}

.icon-purple {
  color: #7c3aed;
}
.icon-pink {
  color: #ec4899;
}
.icon-indigo {
  color: #6366f1;
}
.icon-green {
  color: #22c55e;
}

.footer-illustration {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1.2 / 1;
}

.footer-card {
  width: 78%;
  height: 78%;
  border-radius: 22px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.2), rgba(138, 124, 255, 0.05));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.footer-card i {
  font-size: 52px;
  color: var(--brand);
}

.footer-shield {
  position: absolute;
  bottom: 10%;
  left: 10%;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid color-mix(in srgb, var(--stroke) 75%, transparent) !important;
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 0;
}

.bottom-item {
  text-decoration: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  padding: 8px 6px;
  border-radius: 14px;
}

.bottom-item i {
  font-size: 18px;
}

.bottom-item[aria-current="page"] {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}

.pb-bottom-nav {
  padding-bottom: 96px;
}

@media (min-width: 768px) {
  .content-wrap {
    max-width: 1240px;
  }

  .bottom-nav {
    position: sticky;
    border-radius: var(--radius);
    margin: 0 auto 24px;
    max-width: none;
    bottom: 16px;
    left: auto;
    right: auto;
  }

  .pb-bottom-nav {
    padding-bottom: 24px;
  }
}

@media (min-width: 992px) {
  .content-wrap {
    max-width: 1320px;
  }
}

@media (min-width: 1400px) {
  .content-wrap {
    max-width: 1360px;
  }
}

@media (max-width: 575.98px) {
  .hero-body {
    padding-top: 24px;
  }

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

  .hero-illustration {
    width: min(260px, 100%);
  }
}

/* ===== Explore Page (Dark) ===== */
.explore-page {
  background: radial-gradient(900px 420px at 70% -10%, rgba(109, 94, 252, 0.22), transparent 60%),
    radial-gradient(900px 420px at 20% 0%, rgba(138, 124, 255, 0.16), transparent 62%),
    var(--app-bg);
}

.explore-header .hero-brand {
  color: rgba(238, 242, 255, 0.92);
}

.btn-post {
  border: 1px solid rgba(138, 124, 255, 0.45);
  background: rgba(109, 94, 252, 0.16);
  color: #fff;
  font-weight: 800;
  border-radius: 14px;
  padding: 10px 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.btn-post:hover {
  background: rgba(109, 94, 252, 0.22);
  color: #fff;
}

.avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.avatar-sm.lg {
  width: 46px;
  height: 46px;
}

.status-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  bottom: -1px;
  left: -1px;
  border: 2px solid rgba(11, 18, 32, 0.85);
}

.chips {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;
  font-weight: 700;
}

.chip code {
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  padding: 0;
}

.chip.is-active {
  border-color: rgba(138, 124, 255, 0.55);
  background: rgba(109, 94, 252, 0.18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(109, 94, 252, 0.15), 0 10px 30px rgba(109, 94, 252, 0.18);
}

.explore-panel {
  background: rgba(15, 26, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.explore-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  gap: 14px;
  overflow: auto;
  padding-bottom: 6px;
}

.trend {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  min-height: 160px;
  overflow: hidden;
}

.trend-img {
  height: 92px;
  width: 92px;
  border-radius: 999px;
  margin: 0 auto;
  background:
    radial-gradient(120px 60px at 40% 40%, rgba(138, 124, 255, 0.35), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(138, 124, 255, 0.25);
}

.trend-img.alt {
  background:
    radial-gradient(120px 60px at 60% 40%, rgba(34, 197, 94, 0.25), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.trend-img.person {
  background:
    radial-gradient(120px 60px at 50% 40%, rgba(255, 122, 47, 0.22), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.trend-img.person2 {
  background:
    radial-gradient(120px 60px at 50% 40%, rgba(255, 255, 255, 0.10), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.trend-img.rocket {
  background:
    radial-gradient(120px 60px at 50% 40%, rgba(109, 94, 252, 0.32), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.trend-img.landscape {
  background:
    radial-gradient(120px 60px at 40% 40%, rgba(59, 130, 246, 0.22), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.trend-meta {
  margin-top: 10px;
  text-align: center;
}

.trend-num {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 124, 255, 0.35);
  background: rgba(109, 94, 252, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: 12px;
  width: fit-content;
}

.trend-title {
  font-weight: 900;
  color: #fff;
  margin-top: 8px;
}

.online-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  bottom: 10px;
  left: 10px;
  border: 2px solid rgba(11, 18, 32, 0.85);
}

.composer {
  background: rgba(15, 26, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.composer-input {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.92);
}

.composer-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.composer-input:focus {
  outline: none;
  border-color: rgba(138, 124, 255, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(109, 94, 252, 0.15);
}

.composer-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.composer-btn {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.post-card {
  border-radius: 22px;
  border: 1px solid rgba(138, 124, 255, 0.28);
  background: rgba(15, 26, 48, 0.55);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-card.accent-gold {
  border-color: rgba(245, 158, 11, 0.28);
}

.post-card.accent-teal {
  border-color: rgba(45, 212, 191, 0.28);
}

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
}

.post-body {
  padding: 10px 14px 12px;
}

.post-media {
  height: 190px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(260px 140px at 40% 35%, rgba(109, 94, 252, 0.34), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.post-media.alt {
  background:
    radial-gradient(260px 140px at 55% 35%, rgba(245, 158, 11, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.post-media.teal {
  background:
    radial-gradient(260px 140px at 45% 35%, rgba(45, 212, 191, 0.24), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.post-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-pill {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  padding: 8px 12px;
  font-weight: 800;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.tag-pill.gold {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.10);
}

.post-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-action {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.post-action.like-toggle {
  color: rgba(148, 163, 184, 0.92);
}

.post-action.like-toggle.is-like {
  color: rgba(59, 130, 246, 0.98);
}

.post-action.like-toggle.is-dislike {
  color: rgba(148, 163, 184, 0.92);
  opacity: 1;
}

.comments {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  margin-bottom: 12px;
}

.comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
  flex: 0 0 auto;
}

.comment-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-input {
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.92);
}

.comment-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.comment-input:focus {
  outline: none;
  border-color: rgba(138, 124, 255, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(109, 94, 252, 0.15);
}

.comment-send {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-bs-theme="light"] .comments,
html[data-bs-theme="light"] .comment-send,
html[data-bs-theme="light"] .avatar-xs {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
}

html[data-bs-theme="light"] .avatar-xs {
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  color: var(--text);
}

html[data-bs-theme="light"] .comment-input {
  border-color: color-mix(in srgb, var(--stroke) 80%, transparent);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text);
}

html[data-bs-theme="light"] .comment-input::placeholder {
  color: var(--muted);
}
