:root {
  --bg: #0f1118;
  --bg-2: #141a2b;
  --surface: #171b2a;
  --surface-2: #1d2335;
  --surface-3: #111524;
  --text: #eef1ff;
  --text-muted: #aab2d2;
  --text-soft: #c7ceea;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #4c86ff;
  --accent-2: #6333cc;
  --accent-3: #4dcc80;
  --danger: #f39aa0;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 5%, rgba(99, 51, 204, 0.18), transparent 30%),
    radial-gradient(circle at 90% 2%, rgba(76, 134, 255, 0.2), transparent 28%),
    radial-gradient(circle at 50% 105%, rgba(77, 204, 128, 0.08), transparent 42%),
    linear-gradient(180deg, #0f1118 0%, #101426 50%, #0d101b 100%);
}

.app-root {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #1b2444 0%, #182a4c 45%, #1e2150 100%);
  border: 1px solid var(--line);
  color: #ffffff;
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -90px;
  bottom: -140px;
  border-radius: 50%;
  background: rgba(77, 204, 128, 0.12);
}

.hero-eyebrow {
  position: relative;
  display: inline-flex;
  margin: 0 0 10px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #dbe4ff;
}

.hero h1 {
  position: relative;
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.95rem, 5vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.hero p {
  position: relative;
  margin: 10px 0 0;
  color: rgba(236, 240, 255, 0.92);
  max-width: 58ch;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.button-link:hover {
  transform: translateY(-1px);
}

.button-link-primary {
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  border-color: rgba(255, 255, 255, 0.15);
}

.button-link-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
}

.button-link-tertiary {
  color: #e9eeff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(10, 14, 24, 0.34);
}

.subtle-note {
  margin: 12px 0 0;
  color: #c8d2f8;
  font-size: 0.84rem;
}

.promo-banner {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(143, 168, 255, 0.35);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(25, 37, 66, 0.92), rgba(20, 31, 55, 0.92));
  padding: 14px 16px;
}

.promo-text {
  margin: 0;
  color: #d7def8;
  font-size: 0.9rem;
}

.auth-panel {
  margin-top: 14px;
}

.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface-3);
}

.text-input:focus {
  outline: 2px solid rgba(76, 134, 255, 0.45);
  outline-offset: 1px;
}

.text-area {
  min-height: 96px;
  resize: vertical;
}

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.action-button {
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.action-button:hover {
  transform: translateY(-1px);
}

.action-button-secondary {
  background: transparent;
  color: #c7d5ff;
  border-color: rgba(143, 168, 255, 0.5);
}

.action-button-small {
  padding: 7px 10px;
  font-size: 0.8rem;
}

.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.status-text {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-success {
  color: #9be3b5;
}

.status-error {
  color: var(--danger);
}

.layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.card {
  background: linear-gradient(180deg, rgba(23, 27, 42, 0.95), rgba(17, 21, 36, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

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

.identity-cluster {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(76, 134, 255, 0.18);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #dce6ff;
}

.meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.username {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #eef1ff;
}

.username-link {
  color: #eef1ff;
  text-decoration: none;
}

.username-link:hover {
  color: #b8c9ff;
  text-decoration: underline;
}

.badge-row {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.anonymous-tag,
.verse-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid transparent;
}

.anonymous-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #d6def8;
  border-color: rgba(255, 255, 255, 0.2);
}

.verse-tag {
  background: rgba(77, 204, 128, 0.16);
  color: #9ff0be;
  border-color: rgba(77, 204, 128, 0.35);
}

.post-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text-soft);
}

.card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #d4dcff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.inline-link {
  color: #9fb7ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.inline-link:hover {
  color: #c9d6ff;
  text-decoration: underline;
}

.empty,
.loading,
.error {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-muted);
}

.error {
  color: var(--danger);
  border-color: rgba(243, 154, 160, 0.45);
  background: rgba(105, 38, 45, 0.22);
}

.section-title {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  color: #edf1ff;
}

.comments-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-2);
}

.comment-item p {
  margin: 6px 0 0;
  line-height: 1.45;
  white-space: pre-wrap;
  color: var(--text-soft);
}

.post-shell {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: rgba(76, 134, 255, 0.2);
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.18rem;
  color: #dce6ff;
}

.profile-content {
  min-width: 0;
}

.profile-name {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  color: #edf1ff;
}

.profile-subline {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.profile-bio {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text-soft);
}

.profile-meta-grid {
  display: grid;
  gap: 8px;
}

.profile-meta-item {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.profile-posts {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.feed-controls {
  display: grid;
  gap: 10px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.field-wrap {
  display: grid;
  gap: 5px;
}

.field-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toggle-chip {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe3ff;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.toggle-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toggle-chip-active {
  border-color: rgba(76, 134, 255, 0.85);
  background: rgba(76, 134, 255, 0.23);
  color: #e8eeff;
}

.helper-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 640px) {
  .app-root {
    padding: 14px 12px 30px;
  }

  .hero {
    border-radius: 20px;
    padding: 22px 16px;
  }

  .card {
    padding: 14px;
  }

  .promo-banner {
    padding: 12px;
  }

  .card-header {
    gap: 8px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }
}
