/* Fizzy Bubbly — Subtle Neon theme (names4games clone, 2026-05-21 UI refresh) */

:root {
  --bg: #0c0b12;
  --card: #16141f;
  --card-2: #100e1a;
  --line: #2a2540;
  --line-2: #3a3357;
  --accent: #a855f7;
  --accent-hi: #b878f9;
  --bright: #c084fc;
  --muted: #8b8597;
  --txt: #ece9f5;
  --low: #3fc56b;
  --med: #e0a52e;
  --high: #f0556a;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(168, 85, 247, 0.32); }

/* faint purple atmosphere behind everything */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(64% 38% at 50% -4%, rgba(168, 85, 247, 0.16), transparent 72%),
    radial-gradient(40% 30% at 88% 8%, rgba(192, 132, 252, 0.07), transparent 70%);
}

header, main, footer { position: relative; z-index: 1; }

/* ---- header ---- */
header {
  max-width: 880px;
  margin: 0 auto;
  padding: 38px 24px 6px;
  animation: rise 0.5s ease both;
}
.brand { display: flex; align-items: center; gap: 11px; }
.reel { width: 30px; height: 30px; flex: none; }
.reel text {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wordmark {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wordmark .b { color: var(--bright); }
.tag {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
.tag .dash { color: var(--line-2); }

/* ---- layout ---- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 24px 56px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-top: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 48px -30px rgba(0, 0, 0, 0.9);
  animation: rise 0.45s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

/* ---- form controls ---- */
textarea, input {
  width: 100%;
  background: var(--card-2);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 92px; }
textarea::placeholder, input::placeholder { color: #5b566b; }
textarea:focus, input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

/* ---- region selector ---- */
fieldset#regions {
  border: none;
  margin: 16px 0 0;
  padding: 0;
}
fieldset#regions legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 9px;
}
.regions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.region {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 9px 13px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.region:hover { border-color: var(--line-2); }
.region:has(input:checked) {
  border-color: #51427e;
  background: #1c1530;
}
.region input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.box {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid #483f66;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.region input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
}
.box::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.16s ease;
}
.region input:checked + .box::after { transform: rotate(45deg) scale(1); }
.region input:focus-visible + .box {
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35);
}
.rlabel { font-size: 13.5px; color: var(--muted); }
.rlabel b {
  color: var(--txt);
  font-weight: 700;
  margin-right: 5px;
}
.region-note {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin: 9px 0 0;
  opacity: 0.85;
}

/* ---- actions / button ---- */
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
}
button:hover {
  background: var(--accent-hi);
  box-shadow: 0 8px 22px -8px rgba(168, 85, 247, 0.65);
}
button:active { transform: translateY(1px); }
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}
.status { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

/* ---- loading state ---- */
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  padding: 46px 24px;
}
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #271f3e;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress {
  width: 210px;
  max-width: 60%;
  height: 4px;
  background: #221c37;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--bright), transparent);
  animation: slide 1.3s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(360%); }
}
.phrase {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}

/* ---- results ---- */
.context {
  color: var(--muted);
  font-size: 12.5px;
  margin: 2px 0 16px;
  letter-spacing: 0.01em;
}
.table-wrap { width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom-color: var(--line-2);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(168, 85, 247, 0.045); }
.c-name { font-weight: 600; }
td .factors {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}
.muted-cell { color: var(--muted); }

/* ---- "Similar games" block (Why cell) ---- */
.similar {
  margin-top: 11px;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid #2d2547;
  border-radius: 9px;
}
.similar .src-group { margin: 0 0 6px; color: var(--bright); }
.similar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.similar-list li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--txt);
}
.sim-supplier {
  color: var(--muted);
  font-size: 12px;
}

/* ---- "Sources" dropdown (Why cell) ---- */
.sources { margin-top: 9px; }
.sources > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  cursor: pointer;
  font-size: 12px;
  color: var(--bright);
  list-style: none;
  user-select: none;
}
.sources > summary::-webkit-details-marker { display: none; }
.sources > summary::before {
  content: "▸";
  font-size: 9px;
  transition: transform 0.15s ease;
}
.sources[open] > summary::before { transform: rotate(90deg); }
.sources > summary:hover { color: var(--txt); }
.src-count {
  background: rgba(168, 85, 247, 0.18);
  color: var(--bright);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}
.src-group {
  margin: 11px 0 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.src-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.src-list li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.45;
}
.src-list a {
  color: var(--txt);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.src-list a:hover {
  color: var(--bright);
  border-bottom-color: var(--bright);
}
.src-list li.is-conflict a,
.src-list li.is-conflict .src-plain {
  font-weight: 600;
}
.src-warn {
  flex: none;
  color: var(--high);
  font-size: 11px;
}
.src-plain { color: var(--muted); }
.src-host {
  color: var(--muted);
  font-size: 11px;
}
.ext {
  color: var(--muted);
  font-size: 10px;
  margin-left: 4px;
}

/* risk badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.badge.Low { background: rgba(63, 197, 107, 0.14); color: var(--low); }
.badge.Medium { background: rgba(224, 165, 46, 0.15); color: var(--med); }
.badge.High { background: rgba(240, 85, 106, 0.15); color: var(--high); }

/* Film/TV informational chip (2026-07-21) — informational only, never a rating */
.media-chip {
  display: inline-block;
  font-size: 10px;
  background: rgba(147, 114, 255, 0.16);
  color: var(--bright, #c9b8ff);
  border: 1px solid rgba(147, 114, 255, 0.35);
  border-radius: 9px;
  padding: 2px 7px;
  white-space: nowrap;
  vertical-align: middle;
}
.badge.Low i { background: var(--low); }
.badge.Medium i { background: var(--med); }
.badge.High i { background: var(--high); }

/* score + mini-bar */
.score-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.scorebar {
  display: block;
  width: 56px;
  height: 5px;
  margin-top: 6px;
  background: #221c37;
  border-radius: 99px;
  overflow: hidden;
}
.scorebar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  min-width: 2px;
}
.scorebar i.Low { background: var(--low); }
.scorebar i.Medium { background: var(--med); }
.scorebar i.High { background: var(--high); }

/* score tooltip */
.score-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.info {
  width: 15px;
  height: 15px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
}
.info:hover {
  color: var(--txt);
  border-color: var(--txt);
  background: none;
  box-shadow: none;
}
.tip {
  position: absolute;
  top: calc(100% + 9px);
  left: -4px;
  width: 272px;
  padding: 13px 14px;
  background: #1d1830;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.7);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 6;
}
.score-help:hover .tip,
.score-help:focus-within .tip,
.score-help.open .tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.tip strong {
  display: block;
  color: var(--txt);
  font-size: 13px;
  margin-bottom: 6px;
}
.tip-bands {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.tip-bands span { display: flex; align-items: baseline; gap: 7px; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  transform: translateY(1px);
}
.dot.Low { background: var(--low); }
.dot.Medium { background: var(--med); }
.dot.High { background: var(--high); }

/* mobile result cards (hidden on desktop) */
.result-cards { display: none; flex-direction: column; gap: 12px; }
.result-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  background: var(--card-2);
}
.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rc-name { font-weight: 700; font-size: 15px; }
.rc-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.rc-meta {
  display: flex;
  gap: 22px;
  margin: 0 0 10px;
}
.rc-meta div { margin: 0; }
.rc-meta dt {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.rc-meta dd { margin: 0; font-size: 13.5px; }
.rc-why { font-size: 13.5px; }

/* ---- chat ---- */
.chatlog {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.chatlog div {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  max-width: 88%;
}
.chatlog .q {
  align-self: flex-end;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid #3a2c5e;
}
.chatlog .a {
  align-self: flex-start;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.chatrow { display: flex; gap: 9px; }
.chatrow input { flex: 1; }

/* ---- footer ---- */
footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 24px 40px;
  color: #5b566b;
  font-size: 12px;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  header { padding-top: 28px; }
  .wordmark { font-size: 23px; }
  main { padding: 10px 16px 48px; }
  footer { padding: 8px 16px 36px; }
  .card { padding: 18px; border-radius: 12px; }
  .tag-full { display: none; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button { width: 100%; }
  .status { text-align: center; }
  .table-wrap { display: none; }
  .result-cards { display: flex; }
}
