:root {
  color-scheme: dark;
  --bg: #06070d;
  --panel: rgba(16, 20, 34, .72);
  --panel-strong: rgba(22, 28, 46, .92);
  --line: rgba(255, 255, 255, .14);
  --text: #f7f8ff;
  --muted: #a7b0c8;
  --cyan: #4de8ff;
  --pink: #ff4fb8;
  --lime: #a8ff60;
  --amber: #ffc857;
  --danger: #ff5a6a;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(77, 232, 255, .24), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(255, 79, 184, .18), transparent 30rem),
    radial-gradient(circle at 50% 95%, rgba(168, 255, 96, .10), transparent 28rem),
    linear-gradient(135deg, #06070d 0%, #12131d 52%, #070912 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 82%);
}

.pixel-sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle, var(--cyan) 1px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 2px);
  background-size: 120px 120px, 180px 180px;
  animation: drift 18s linear infinite;
  opacity: .45;
}

@keyframes drift {
  to { transform: translate3d(-60px, 60px, 0); }
}

.shell, .legal-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-block;
  background:
    linear-gradient(135deg, var(--cyan), var(--pink) 50%, var(--amber));
  box-shadow: 0 0 28px rgba(77, 232, 255, .45);
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(620px, 760px);
  gap: 52px;
  align-items: center;
  padding: 24px 0 72px;
}

.seo-section {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 28px;
  padding: 34px 0 82px;
  border-top: 1px solid var(--line);
}

.seo-section h2 {
  margin: 0;
  font-size: 32px;
}

.seo-copy {
  color: var(--muted);
  line-height: 1.75;
}

.seo-copy p:first-child { margin-top: 0; }

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: .94;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.eyebrow, .panel-kicker {
  margin: 0 0 10px;
  color: var(--lime);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .14em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-row span, .status-pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  padding: 9px 12px;
  border-radius: 999px;
  color: #dfe5ff;
  font-size: 13px;
}

.app-panel, .entry-card, .chat-card, .legal-card, .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
}

.app-panel { padding: 10px; width: 100%; }
.entry-card, .chat-card, .legal-card { padding: 26px; }
.entry-card h2, .chat-card h2, .legal-card h1 { margin: 0; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 14px;
}

.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.segmented input:checked + span {
  color: var(--text);
  border-color: rgba(77, 232, 255, .72);
  box-shadow: 0 0 20px rgba(77, 232, 255, .22);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin: 14px 0 18px;
}

.primary, .send-btn, .icon-btn, .chat-actions button, table button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  color: var(--text);
  min-height: 42px;
  padding: 0 16px;
}

.primary, .send-btn {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #050712;
  font-weight: 800;
}

.glow { box-shadow: 0 0 30px rgba(77, 232, 255, .35), 0 0 44px rgba(255, 79, 184, .18); }
.privacy-note { color: var(--muted); font-size: 13px; line-height: 1.5; }

.chat-header, .chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.match-stage {
  position: relative;
  height: 130px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
}

.signal-ring {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 1px solid rgba(77,232,255,.55);
  animation: pulse 1.8s infinite;
}
.connection-line {
  position: absolute;
  width: 58%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--pink), transparent);
}
.avatar-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #101827;
  border: 1px solid rgba(77,232,255,.55);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(77,232,255,.26);
}
.avatar-orb.ghost { border-color: rgba(255,79,184,.55); box-shadow: 0 0 28px rgba(255,79,184,.23); }

@keyframes pulse {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.messages {
  height: 420px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,.18);
}

.msg {
  width: fit-content;
  max-width: 76%;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #eef2ff;
  line-height: 1.45;
}
.msg.me { margin-left: auto; background: linear-gradient(135deg, rgba(77,232,255,.22), rgba(255,79,184,.18)); }
.msg.system { margin-inline: auto; color: var(--muted); font-size: 13px; background: transparent; }
.typing { min-height: 22px; color: var(--lime); font-size: 13px; margin-top: 6px; }

.composer {
  display: grid;
  grid-template-columns: 76px 82px 82px minmax(0, 1fr) 86px;
  gap: 10px;
  margin-top: 12px;
}
.composer input, .inline-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  outline: none;
  background: rgba(255,255,255,.07);
  color: var(--text);
}
.send-btn { min-height: 44px; padding: 0; }
.next-btn {
  padding: 0;
  font-weight: 800;
  color: var(--cyan);
}
.photo-btn {
  padding: 0;
  font-weight: 800;
  color: var(--lime);
}
.upload-btn {
  padding: 0;
  font-weight: 800;
  color: var(--amber);
}
.photo-offer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.photo-offer button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(77, 232, 255, .12);
  color: var(--text);
  padding: 8px 10px;
}
.photo-offer.camera-offer {
  border-color: rgba(168, 255, 96, .4);
}
.photo-offer.upload-offer {
  border-color: rgba(255, 200, 87, .4);
}
.live-photo-note {
  margin: 10px 0 0;
}
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(18px);
}
.photo-frame {
  max-width: min(92vw, 720px);
  max-height: 88vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-strong);
  user-select: none;
}
.photo-frame.camera-frame {
  box-shadow: 0 0 34px rgba(168, 255, 96, .18);
}
.photo-frame.upload-frame {
  box-shadow: 0 0 34px rgba(255, 200, 87, .16);
}
.photo-badge {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,.07);
}
.photo-frame img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  pointer-events: none;
}
.photo-frame p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.chat-actions { margin-top: 12px; justify-content: flex-start; }
.chat-actions form { margin: 0; }

.legal-shell { padding: 24px 0 70px; }
.legal-card { max-width: 820px; margin: 44px auto 0; line-height: 1.75; color: #dce3f8; }
.legal-card.narrow { max-width: 520px; }
.legal-card .primary { display: inline-grid; place-items: center; width: auto; padding: 0 18px; color: #050712; }
.stack-form { margin-top: 20px; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.stat { padding: 20px; }
.stat span { color: var(--muted); }
.stat strong { display: block; font-size: 38px; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 10px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 10px; }
  .seo-section { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 46px; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .chat-header { align-items: stretch; flex-direction: column; }
  .admin-grid, .inline-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .shell, .legal-shell { width: min(100% - 20px, 1180px); }
  .entry-card, .chat-card, .legal-card { padding: 18px; }
  .hero-copy h1 { font-size: 40px; }
  .lead { font-size: 16px; }
  .composer { grid-template-columns: repeat(3, 1fr); }
  .composer input { grid-column: 1 / -1; }
  .send-btn { grid-column: 1 / -1; }
  .messages { height: 340px; }
  .msg { max-width: 92%; }
}
