/* Casino Advantage Play Directory v1 — original UI */
:root {
  --bg: #0b0e14;
  --panel: #121824;
  --panel-2: #0f1520;
  --line: #263247;
  --text: #e8eef8;
  --muted: #9aa8bd;
  --gold: #f5b342;
  --gold-2: #d99a27;
  --green: #10b981;
  --green-2: #0b7f5a;
  --amber: #f0a63a;
  --red: #ef6b6b;
  --blue: #6fb7ff;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .35);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(245, 179, 66, .12), transparent 62%),
    radial-gradient(900px 480px at 88% 0%, rgba(16, 185, 129, .10), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--gold); text-underline-offset: 2px; }
a:hover { color: #ffd07a; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--gold);
  color: #1a1305;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 20, .78);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .2px;
}
.brand img { height: 38px; width: 38px; border-radius: 50%; }
.brand span { font-size: 1.02rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  padding: 8px 10px;
  border-radius: 9px;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav a[aria-current="page"] { color: var(--gold); background: rgba(245, 179, 66, .10); }

.hero {
  padding: 56px 0 30px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}
h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 0 0 14px;
  max-width: 900px;
}
.hero p {
  color: var(--muted);
  font-size: 1.04rem;
  max-width: 760px;
  margin: 0;
}
.hero strong { color: var(--text); }

.notice {
  margin: 22px 0 0;
  border: 1px solid rgba(245, 179, 66, .28);
  background: rgba(245, 179, 66, .07);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #f6dfb4;
  font-size: .92rem;
}
.notice strong { color: #ffe7b8; }

.controls {
  margin: 28px 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.controls-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.field input::placeholder { color: #6f7f95; }
.field input:focus, .field select:focus {
  outline: 3px solid rgba(245, 179, 66, .35);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field .hint { color: var(--muted); font-size: .76rem; }

.controls-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  min-height: 42px;
}
.btn:hover { border-color: #3a4c68; background: #162033; }
.btn:focus-visible { outline: 3px solid rgba(245, 179, 66, .45); outline-offset: 2px; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1305; }
.btn.primary:hover { background: #ffc65c; border-color: #ffc65c; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: .84rem; }

.result-count {
  color: var(--muted);
  font-size: .9rem;
  margin-left: auto;
}
.result-count strong { color: var(--text); }

.tier-explainer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 36, .55);
  padding: 14px 16px;
  margin: 0 0 22px;
}
.tier-explainer summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}
.tier-explainer .tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.tier-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel-2);
}
.tier-card h3 { margin: 0 0 4px; font-size: .95rem; }
.tier-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.tier-good h3 { color: var(--blue); }
.tier-better h3 { color: var(--gold); }
.tier-best h3 { color: var(--green); }

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

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.card:hover { border-color: #35455e; }
.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}
.card h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.card .meta {
  color: var(--muted);
  font-size: .86rem;
  margin: 4px 0 0;
}
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}
.badge.region { color: var(--blue); border-color: rgba(111, 183, 255, .25); background: rgba(111, 183, 255, .08); }
.badge.good { color: var(--blue); border-color: rgba(111, 183, 255, .3); background: rgba(111, 183, 255, .08); }
.badge.better { color: var(--gold); border-color: rgba(245, 179, 66, .32); background: rgba(245, 179, 66, .09); }
.badge.best { color: var(--green); border-color: rgba(16, 185, 129, .32); background: rgba(16, 185, 129, .10); }
.badge.stale { color: var(--red); border-color: rgba(239, 107, 107, .35); background: rgba(239, 107, 107, .09); }
.badge.unknown { color: var(--amber); border-color: rgba(240, 166, 58, .35); background: rgba(240, 166, 58, .09); }
.badge.fresh { color: var(--green); border-color: rgba(16, 185, 129, .28); background: rgba(16, 185, 129, .08); }

.verify-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
}
.verify-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.verify-line .dot.stale { background: var(--red); }
.verify-line .dot.unknown { background: var(--amber); }

.options { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.option {
  border: 1px solid rgba(38, 50, 71, .9);
  border-radius: 10px;
  background: rgba(15, 21, 32, .72);
  padding: 10px 12px;
}
.option-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.option-game { font-weight: 800; font-size: .94rem; }
.option-min { color: var(--gold); font-weight: 800; font-size: .86rem; }
.option-min.unknown { color: var(--muted); font-weight: 700; }
.option-cats { display: flex; gap: 4px; flex-wrap: wrap; }
.cat {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, .25);
  background: rgba(16, 185, 129, .07);
  border-radius: 999px;
  padding: 2px 7px;
}
.option p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.option details { margin-top: 4px; }
.option summary { color: var(--muted); font-size: .78rem; cursor: pointer; }
.option code, .evidence code {
  color: #b9c8dc;
  font-size: .76rem;
  word-break: break-all;
  white-space: normal;
  background: rgba(255, 255, 255, .04);
  padding: 2px 5px;
  border-radius: 5px;
}
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.card-actions .btn { flex: 1 1 auto; }
.evidence { margin-top: 2px; }
.evidence summary { color: var(--muted); font-size: .82rem; cursor: pointer; }
.evidence ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .8rem; }
.evidence li { margin-bottom: 4px; }

.empty {
  border: 1px dashed #35455e;
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(18, 24, 36, .45);
  margin: 0 0 28px;
}
.empty h2 { color: var(--text); margin: 0 0 8px; font-size: 1.2rem; }
.empty p { margin: 0 auto 14px; max-width: 620px; }
.empty .filter-summary { color: var(--gold); font-weight: 700; }

.leads {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 36, .45);
  padding: 16px 18px;
  margin: 0 0 28px;
}
.leads h2 { margin: 0 0 6px; font-size: 1.05rem; }
.leads p { margin: 0; color: var(--muted); font-size: .88rem; }

.data-notes {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 36, .45);
  padding: 18px;
  margin: 0 0 28px;
}
.data-notes h2 { margin: 0 0 8px; font-size: 1.05rem; }
.data-notes p { margin: 0 0 8px; color: var(--muted); font-size: .88rem; }
.data-notes ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .86rem; }
.data-notes li { margin-bottom: 4px; }
.data-notes .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: .86rem;
}
.site-footer p { margin: 0 0 8px; }
.site-footer .links { display: flex; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--gold); }

/* Dialog */
dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(2, 5, 10, .72); backdrop-filter: blur(3px); }
.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  padding: 18px 20px 0;
}
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.dialog-body { padding: 16px 20px 20px; }
.dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dialog-grid .full { grid-column: 1 / -1; }
.dialog-body .field textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}
.dialog-body .field textarea:focus { outline: 3px solid rgba(245, 179, 66, .35); outline-offset: 1px; border-color: var(--gold); }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.dialog-note {
  border: 1px solid rgba(245, 179, 66, .28);
  background: rgba(245, 179, 66, .07);
  color: #f6dfb4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .84rem;
  margin: 0 0 14px;
}
.error {
  color: var(--red);
  font-size: .78rem;
  min-height: 1.1em;
}
.error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--red) !important; }
#report-preview {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0f17;
  color: #cfe0f5;
  font-size: .78rem;
  line-height: 1.5;
  overflow: auto;
  max-height: 260px;
  white-space: pre-wrap;
  word-break: break-word;
}
#report-preview:empty { display: none; }
.report-status { margin: 10px 0 0; font-size: .84rem; color: var(--muted); }
.report-status.ok { color: var(--green); }
.report-status.warn { color: var(--amber); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header .wrap { min-height: auto; padding: 10px 0; }
  .nav { margin-left: 0; width: 100%; }
  .nav a { padding: 8px 8px; }
  .hero { padding: 34px 0 20px; }
  .controls-grid { grid-template-columns: 1fr; }
  .dialog-grid { grid-template-columns: 1fr; }
  .card-top { flex-direction: column; }
  .badges { justify-content: flex-start; }
  .result-count { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
