:root {
  --bg: #050816;
  --bg-card: #111827;
  --bg-card-soft: #020617;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #06b6d4);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 0.9rem;
  margin-left: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.18);
}

.nav-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.nav-meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-buttons {
  display: flex;
  gap: 0.4rem;
}

.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn-primary {
  background-image: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn.small {
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
}

.btn.full {
  width: 100%;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.65);
}

.page {
  flex: 1;
  max-width: 1100px;
  margin: 1.6rem auto 2.4rem;
  padding: 0 1rem;
}

.hero {
  padding: 2.4rem 1.6rem 2.1rem;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.24), transparent 55%),
    var(--bg-card-soft);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-content h1 {
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: var(--muted);
  max-width: 30rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 1rem;
}

.hero-checklist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: #020617;
  border-radius: var(--radius-xl);
  padding: 1.7rem 1.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.card-wide {
  margin-top: 1.6rem;
}

.card-narrow {
  margin: 1.8rem auto 0;
  max-width: 420px;
}

.card-header {
  margin-bottom: 1.1rem;
}

.profile-header {
  display: flex;
  gap: 1.3rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.avatar-large {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #38bdf8, #1d4ed8);
  border: 3px solid rgba(248, 250, 252, 0.08);
}

.avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #38bdf8, #1d4ed8);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 0.88);
  color: #e0f2fe;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.member-card {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 65%),
    #020617;
  border-radius: 20px;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 0.75rem;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #38bdf8, #1d4ed8);
  flex-shrink: 0;
}

.member-avatar.blurred {
  filter: blur(6px);
}

.member-main {
  flex: 1;
}

.member-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.member-location {
  font-size: 0.78rem;
  color: var(--muted);
}

.member-tags {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.1rem;
  margin-top: 1.8rem;
}

.chat-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}

.conversation-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.conversation {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem;
  border-radius: 14px;
  cursor: pointer;
}

.conversation.active {
  background: rgba(15, 23, 42, 0.9);
}

.chat-main {
  display: flex;
  flex-direction: column;
}

.chat-header {
  margin-bottom: 0.75rem;
}

.chat-messages {
  flex: 1;
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bubble {
  max-width: 75%;
  padding: 0.55rem 0.8rem;
  border-radius: 18px;
  font-size: 0.9rem;
}

.bubble-them {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.9);
}

.bubble-you {
  align-self: flex-end;
  background-image: var(--accent-gradient);
}

.chat-input-row {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.5rem;
}

.chat-input-row input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.form input,
.form textarea {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.55rem 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox input {
  margin-top: 0.15rem;
}

.reward-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.reward-card {
  background: #020617;
  border-radius: 18px;
  padding: 1rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.site-footer {
  padding: 1rem 1.2rem 1.3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile-first adjustments */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0.55rem 0.9rem;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    inset: 100% 0 auto;
    background: rgba(15, 23, 42, 0.98);
    flex-direction: column;
    padding: 0.6rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-auth {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
  .hero {
    padding: 2.1rem 1.2rem 1.9rem;
  }
  .card {
    padding: 1.5rem 1.3rem;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    margin-bottom: 0.9rem;
  }
}

.hidden {
  display: none !important;
}

.vip-blur {
  filter: blur(6px);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.profile-facts ul {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: grid;
  gap: 0.35rem;
}

.profile-facts .label {
  display: inline-block;
  min-width: 110px;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Stack on mobile */
@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.admin-row {
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
