:root {
  --bg: #050505;
  --bg-soft: #0e0e12;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8f7fb;
  --muted: #a4a2b3;
  --pink: #ff4fa3;
  --pink-soft: rgba(255, 79, 163, 0.18);
  --green: #2dd36f;
  --green-soft: rgba(45, 211, 111, 0.16);
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.16);
  --white-soft: rgba(255, 255, 255, 0.72);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 163, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(45, 211, 111, 0.12), transparent 22%),
    linear-gradient(180deg, #060607 0%, #0b0a10 45%, #050505 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 90%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:disabled,
.button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.tiny-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.page-shell {
  position: relative;
  padding: 24px;
}

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: "Anton", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(255, 79, 163, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 24px rgba(255, 79, 163, 0.14);
}

.brand-copy strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-link,
.chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white-soft);
  transition: 180ms ease;
}

.nav-link:hover,
.chip:hover {
  border-color: rgba(255, 79, 163, 0.32);
  background: rgba(255, 79, 163, 0.12);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  padding: 32px 0 34px;
}

.hero-copy,
.glass-card,
.stat-card,
.info-card,
.form-card,
.message-card,
.panel-card,
.cta-strip {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 79, 163, 0.24);
  background: rgba(255, 79, 163, 0.12);
  color: #ffd0e6;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display {
  margin: 22px 0 14px;
  font-family: "Anton", sans-serif;
  font-size: clamp(3.8rem, 10vw, 8rem);
  line-height: 0.94;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy p {
  margin: 0;
  color: var(--white-soft);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 60ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.meta-pill {
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 140px;
}

.meta-pill strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.button,
.ghost-button,
.danger-button {
  border: 0;
  cursor: pointer;
  padding: 14px 20px;
  border-radius: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button {
  background: linear-gradient(135deg, var(--pink), #ff7ebd);
  color: #15070d;
  font-weight: 700;
  box-shadow: 0 20px 40px rgba(255, 79, 163, 0.26);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.danger-button {
  background: rgba(255, 59, 48, 0.16);
  color: #ffe7e5;
  border: 1px solid rgba(255, 59, 48, 0.26);
}

.button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-2px);
}

.is-loading {
  position: relative;
}

.hero-side {
  display: grid;
  gap: 18px;
}

.card-title {
  margin: 0 0 12px;
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
}

.glass-card,
.info-card,
.form-card,
.panel-card {
  padding: 24px;
}

.stack {
  display: grid;
  gap: 18px;
}

.hero-list,
.info-list,
.rules-list,
.status-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-list li,
.info-list li,
.rules-list li,
.status-list li {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-list strong,
.info-list strong {
  display: block;
  margin-bottom: 4px;
}

.section {
  padding: 46px 0;
}

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

.section-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.message-card {
  padding: 24px;
}

.stat-card h3,
.message-card h3,
.panel-card h3 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
}

.stat-card p,
.message-card p,
.panel-card p,
.form-help,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.kicker {
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.bracelet-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  width: fit-content;
}

.bracelet-pill.green,
.status-pill.green {
  background: var(--green-soft);
  color: #d5ffe4;
  border-color: rgba(45, 211, 111, 0.32);
}

.bracelet-pill.red,
.status-pill.red {
  background: var(--red-soft);
  color: #ffe1de;
  border-color: rgba(255, 59, 48, 0.3);
}

.status-pill.pink {
  background: var(--pink-soft);
  color: #ffd8e9;
  border-color: rgba(255, 79, 163, 0.32);
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.92rem;
  color: var(--white-soft);
}

.input,
.textarea,
.select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 16px;
  color: var(--text);
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(255, 79, 163, 0.44);
  box-shadow: 0 0 0 4px rgba(255, 79, 163, 0.12);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice {
  flex: 1;
  min-width: 140px;
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.choice span {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: 180ms ease;
}

.choice input:checked + span {
  border-color: rgba(255, 79, 163, 0.34);
  background: rgba(255, 79, 163, 0.14);
}

.checkbox {
  display: flex;
  align-items: start;
  gap: 12px;
  color: var(--white-soft);
}

.checkbox input {
  margin-top: 5px;
}

.field-caption,
.photo-note,
.counter-row {
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-preview {
  min-height: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 79, 163, 0.08), rgba(45, 211, 111, 0.05)),
    rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top left, rgba(255, 79, 163, 0.28), transparent 55%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.06);
}

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

.avatar-sm {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}

.avatar-md {
  width: 88px;
  height: 88px;
}

.avatar-lg {
  width: 120px;
  height: 120px;
}

.avatar-xl {
  width: 156px;
  height: 156px;
}

.avatar-fallback {
  font-family: "Anton", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

.message-list,
.participant-list,
.screen-list,
.code-list {
  display: grid;
  gap: 14px;
}

.message-card {
  border-radius: 22px;
}

.message-card header,
.participant-card header,
.code-card header,
.screen-card header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.participant-card,
.code-card,
.screen-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.participant-card img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 18px;
}

.participant-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.participant-meta.copy-start {
  align-items: start;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

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

.profile-copy h2 {
  text-wrap: balance;
}

.stat-grid-tight {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.message-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.message-person .kicker {
  margin-bottom: 6px;
}

.message-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.inline-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  padding: 28px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-align: center;
}

.cta-strip {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer {
  padding: 24px 0 48px;
  color: var(--muted);
  text-align: center;
}

.flash {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  display: none;
}

.flash.show {
  display: block;
}

.flash.success {
  background: var(--green-soft);
  border: 1px solid rgba(45, 211, 111, 0.28);
  color: #dcffe8;
}

.flash.error {
  background: var(--red-soft);
  border: 1px solid rgba(255, 59, 48, 0.25);
  color: #ffe5e2;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: floatUp 500ms ease both;
}

@media (max-width: 980px) {
  .hero,
  .grid.cols-2,
  .grid.cols-3,
  .form-grid,
  .cta-strip,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px;
  }

  .hero-copy,
  .glass-card,
  .info-card,
  .form-card,
  .message-card,
  .panel-card,
  .cta-strip {
    padding: 20px;
  }

  .display {
    font-size: clamp(3.1rem, 22vw, 5rem);
  }

  .profile-hero,
  .stat-grid-tight {
    grid-template-columns: 1fr;
  }

  .meta-pill,
  .button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }
}
