/* Nova Spins — demo casino site. Self-contained; no framework. */
:root {
  --bg: #0b0a1a;
  --bg-2: #141130;
  --panel: #1b1740;
  --panel-2: #241e55;
  --line: #312a66;
  --text: #f4f2ff;
  --muted: #a9a3d6;
  --brand: #8b5cff;
  --brand-2: #b388ff;
  --gold: #ffd36e;
  --gold-2: #ffb43a;
  --green: #35d07f;
  --red: #ff6b6b;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, #2a1d5e 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #3a1d57 0%, transparent 55%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 10, 26, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--gold) 120%);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.brand b {
  color: var(--gold);
}
.nav {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}
.nav a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}
.nav a:hover {
  color: var(--text);
  background: var(--panel);
}
.nav a.active {
  color: var(--text);
  background: var(--panel-2);
}
.spacer {
  flex: 1;
}

/* ---- Buttons ---- */
.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  font-family: inherit;
}
.btn:hover {
  background: var(--panel-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: transparent;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7a44f0 0%, #a978ff 100%);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%);
  border-color: transparent;
  color: #2a1c00;
}
.btn-ghost {
  background: transparent;
}

/* ---- Inbox bell ---- */
.bell {
  position: relative;
}
.bell-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.bell-btn:hover {
  background: var(--panel-2);
}
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.badge.show {
  display: flex;
}
.inbox {
  position: absolute;
  right: 0;
  top: 54px;
  width: 340px;
  max-width: 86vw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
}
.inbox.open {
  display: block;
}
.inbox-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inbox-head .count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.inbox-list {
  max-height: 360px;
  overflow-y: auto;
}
.inbox-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.msg {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.msg:last-child {
  border-bottom: 0;
}
.msg:hover {
  background: var(--panel-2);
}
.msg.unseen::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
}
.msg h4 {
  margin: 0 0 3px;
  font-size: 15px;
  padding-left: 12px;
}
.msg p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  padding-left: 12px;
}
.msg .dismiss {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
}
.msg .dismiss:hover {
  color: var(--text);
  background: var(--line);
}

/* ---- Session pill ---- */
.session {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.session .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.session.live .dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.18);
}

/* ---- Banner slots ---- */
.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
}
.banner .inner {
  padding: 22px 26px;
  width: 100%;
}
.banner .eyebrow {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
.banner .headline {
  font-size: 26px;
  font-weight: 900;
  margin: 8px 0 6px;
}
.banner .sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}
.banner .tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.banner.hero .headline {
  font-size: 34px;
}
.banner.loading .inner {
  opacity: 0.35;
}
.banner.sidebar {
  min-height: 250px;
}
.banner.footer .headline {
  font-size: 22px;
}
.banner.empty {
  border-style: dashed;
}
.banner.empty .headline {
  color: var(--muted);
  font-weight: 700;
  font-size: 18px;
}

/* ---- Layout ---- */
.hero-row {
  margin: 26px 0;
}
.content-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  margin-bottom: 26px;
}
.section-title {
  font-size: 22px;
  font-weight: 900;
  margin: 6px 0 16px;
}
.section-title .muted {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* ---- Games grid ---- */
.games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.game {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}
.game:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
}
.game .art {
  height: 128px;
  display: grid;
  place-items: center;
  font-size: 40px;
}
.game .meta {
  padding: 12px 14px;
}
.game .meta .cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold);
  font-weight: 800;
}
.game .meta h3 {
  margin: 4px 0 0;
  font-size: 16px;
}
.art.slots {
  background: linear-gradient(135deg, #3b2b7a, #5a3bb0);
}
.art.table {
  background: linear-gradient(135deg, #1f5c43, #2c8a5f);
}
.art.live {
  background: linear-gradient(135deg, #7a2b4e, #b03b6a);
}

/* ---- Side card ---- */
.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.side-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.side-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.side-card .btn {
  width: 100%;
  margin-bottom: 8px;
}
.side-card .btn:last-child {
  margin-bottom: 0;
}

/* ---- Toast ---- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 13px 15px;
  box-shadow: var(--shadow);
  animation: slidein 0.25s ease;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.toast .ic {
  font-size: 20px;
}
.toast h4 {
  margin: 0 0 2px;
  font-size: 14px;
}
.toast p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.toast.err {
  border-left-color: var(--red);
}
.toast.ok {
  border-left-color: var(--green);
}
@keyframes slidein {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Demo ribbon ---- */
.ribbon {
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.18), rgba(255, 211, 110, 0.14));
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 7px 12px;
}
.ribbon b {
  color: var(--text);
}

@media (max-width: 860px) {
  .content-row {
    grid-template-columns: 1fr;
  }
  .games {
    grid-template-columns: 1fr;
  }
  .nav {
    display: none;
  }
}

/* ===== Generic tester: connect screen + header bits (#B115) ===== */
/* The `hidden` attribute must beat author display rules (id/class selectors
   otherwise override the UA `[hidden]{display:none}`). */
[hidden] {
  display: none !important;
}
.engine-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 999px;
}
.engine-pill .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.18);
}
.engine-pill .who {
  color: var(--text);
  font-weight: 700;
}
.engine-pill .link {
  background: transparent;
  border: 0;
  color: var(--brand-2);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 4px;
  font-family: inherit;
}
.engine-pill .link:hover {
  text-decoration: underline;
}

.connect-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1000px 500px at 50% -10%, #2a1d5e 0%, transparent 60%), rgba(6, 5, 16, 0.92);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
.connect-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.connect-head {
  text-align: center;
  margin-bottom: 18px;
}
.logo.big {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--gold) 120%);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 12px;
}
.connect-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
}
.connect-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
}
.tab.active {
  background: var(--panel-2);
  color: var(--text);
}

.pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.pane.active {
  display: flex;
}
.pane label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.pane .opt {
  color: var(--muted);
  font-weight: 500;
}
.pane input,
.pane select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.pane input:focus,
.pane select:focus {
  outline: none;
  border-color: var(--brand);
}
.pane select {
  cursor: pointer;
}
#siEngineWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn.wide {
  width: 100%;
  justify-content: center;
}
.hint {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.connect-err {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffb0b0;
  font-size: 13px;
}

@media (max-width: 560px) {
  .connect-card {
    padding: 20px;
  }
}
