:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(17, 21, 30, 0.92);
  --panel-strong: #111722;
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf2f7;
  --muted: #9aa6b2;
  --mint: #76ffd1;
  --blue: #4da3ff;
  --blue-deep: #2563eb;
  --warning: rgba(118, 255, 209, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.18), transparent 30%),
    radial-gradient(circle at right 20%, rgba(118, 255, 209, 0.14), transparent 26%),
    linear-gradient(180deg, #0a0d12 0%, #090b10 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px 16px 36px;
  display: grid;
  gap: 18px;
}

.hero-panel,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(20, 24, 34, 0.95), rgba(12, 15, 20, 0.95));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 26px 22px 24px;
}

.hero-panel::after,
.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -42% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 163, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(118, 255, 209, 0.2);
  color: var(--mint);
  background: rgba(118, 255, 209, 0.08);
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-panel h1 {
  margin: 18px 0 10px;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.hero-copy {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.legal-pill,
.inline-note,
.footer-note {
  color: #d9e8ef;
  line-height: 1.5;
}

.legal-pill {
  margin-top: 18px;
  display: inline-flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--warning);
  border: 1px solid rgba(118, 255, 209, 0.15);
  color: #d8fff1;
}

.onboarding-card {
  padding: 20px;
}

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

.card-header h2 {
  margin: 8px 0 0;
  font-size: clamp(1.25rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.ghost-button,
.primary-button,
.tab {
  border: 0;
  border-radius: 14px;
  font: inherit;
  cursor: pointer;
}

.ghost-button {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.nickname-box {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.12), rgba(118, 255, 209, 0.08));
  border: 1px solid rgba(118, 255, 209, 0.14);
}

.nickname-label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.nickname-value {
  display: block;
  margin: 8px 0 2px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.nickname-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.tab {
  padding: 14px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.2), rgba(118, 255, 209, 0.15));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(118, 255, 209, 0.16);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #dbe4ea;
  font-size: 0.95rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  font: inherit;
}

.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  font: inherit;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(118, 255, 209, 0.45);
  box-shadow: 0 0 0 4px rgba(118, 255, 209, 0.12);
}

.inline-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(118, 255, 209, 0.22);
  background: rgba(118, 255, 209, 0.06);
  color: var(--muted);
  font-size: 0.95rem;
}

.form-feedback {
  margin: 0;
  min-height: 1.5rem;
  color: #c8f7d8;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-feedback.error {
  color: #ffb4b4;
}

.primary-button {
  margin-top: 4px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: white;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (min-width: 920px) {
  .app-shell {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
    min-height: 100vh;
    padding: 36px 24px;
  }

  .hero-panel {
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
  }

  .onboarding-card {
    padding: 28px;
    margin-top: 0;
  }
}

.auth-shell {
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 16px 36px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  padding: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 16px;
}

.auth-hero {
  margin-bottom: 18px;
}

.auth-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.auth-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.mini-warning {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(118, 255, 209, 0.15);
  background: rgba(118, 255, 209, 0.06);
  color: #d8fff1;
}

.split-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

@media (min-width: 720px) {
  .auth-card {
    padding: 28px 30px;
  }

  .split-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.feed-shell,
.post-shell,
.ban-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px 16px 36px;
}

.feed-shell {
  display: grid;
  gap: 18px;
}

.feed-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.feed-banner {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(118, 255, 209, 0.14);
  background: rgba(118, 255, 209, 0.06);
  color: #d8fff1;
  display: grid;
  gap: 4px;
}

.feed-status,
.empty-state,
.story-card,
.ban-card,
.post-card {
  padding: 22px;
}

.feed-list {
  display: grid;
  gap: 14px;
}

.story-card {
  display: grid;
  gap: 14px;
}

.story-meta,
.story-footer,
.ban-details {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.story-content {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--text);
}

.story-footer {
  align-items: center;
}

.story-footer .ghost-button {
  padding-inline: 14px;
}

.empty-state {
  text-align: center;
  display: grid;
  gap: 14px;
}

.empty-state h2,
.ban-panel h2,
.ban-card h1,
.post-card h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.ban-panel {
  display: grid;
  gap: 10px;
}

.ban-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.ban-card {
  width: min(640px, 100%);
  display: grid;
  gap: 16px;
  text-align: center;
}

.ban-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: rgba(255, 100, 100, 0.1);
  color: #ff9e9e;
  font-size: 2rem;
}

.sticky-warning {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(118, 255, 209, 0.18);
  background: rgba(118, 255, 209, 0.06);
  color: #d8fff1;
  position: sticky;
  top: 14px;
  z-index: 5;
}

.post-card {
  width: min(760px, 100%);
  margin: 0 auto;
}

@media (min-width: 920px) {
  .feed-shell {
    grid-template-columns: 1fr;
  }

  .feed-hero {
    padding: 28px;
  }

  .post-card {
    padding: 30px;
  }
}
