/* ---------- TOKENS ---------- */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #f0f2f5;
  --surface-elev: #ffffff;
  --border: #e4e7ec;
  --border-strong: #d4d8df;
  --text: #1a1d23;
  --text-muted: #5e6573;
  --text-soft: #8a909c;

  --accent: #0a8754;
  --accent-hover: #086c43;
  --accent-soft: #e6f4ee;
  --accent-strong: #065c39;

  --gold: #c2890d;
  --gold-soft: #fff4d6;
  --gold-strong: #92670a;

  --danger: #b91c1c;

  --logo-coin-start: #10b981;
  --logo-coin-end: #0a8754;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.1);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --container: 1180px;
  --header-h: 64px;
  --t-base: 0.18s;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-alt: #1f242b;
  --surface-elev: #20262e;
  --border: #2a313b;
  --border-strong: #3a4250;
  --text: #e6edf3;
  --text-muted: #b1bac4;
  --text-soft: #8b949e;

  --accent: #1ab788;
  --accent-hover: #14a37a;
  --accent-soft: rgba(26, 183, 136, 0.14);
  --accent-strong: #2dd4a7;

  --gold: #f0c14b;
  --gold-soft: rgba(240, 193, 75, 0.14);
  --gold-strong: #ffd770;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- BASE ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base), color var(--t-base);
}

body.menu-open { overflow: hidden; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text);
}

.brand-logo { height: 32px; width: auto; display: block; }

[data-theme="dark"] .brand-logo .brand-accent { fill: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}

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

.nav-links a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--t-base), background var(--t-base);
}

.nav-links a:hover { color: var(--text); background: var(--surface-alt); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.social-icon,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--t-base), background var(--t-base);
  position: relative;
}

.social-icon:hover,
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }

.social-icon svg,
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.icon-btn .icon-moon { display: none; }
[data-theme="dark"] .icon-btn .icon-sun { display: none; }
[data-theme="dark"] .icon-btn .icon-moon { display: block; }

.lang-toggle {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--t-base), border-color var(--t-base), background var(--t-base);
  min-width: 44px;
  height: 32px;
}

.lang-toggle:hover { color: var(--text); border-color: var(--text-muted); }

/* Burger */

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  color: var(--text);
  margin-left: auto;
}

.menu-toggle:hover { background: var(--surface-alt); }

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--t-base), opacity var(--t-base);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- SECTIONS ---------- */

.section { padding: 64px 0 20px; }
.section:first-of-type { padding-top: 48px; }

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
  text-transform: uppercase;
}

.section-subtle {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  margin-top: 10px;
  text-transform: uppercase;
}

.section-divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
  margin: 18px auto 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
  font-size: 15px;
}

/* ---------- GRIDS ---------- */

.grid { display: grid; gap: 20px; }
.grid-recommended { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-crypto      { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-fiat        { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- CARDS ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--surface) 60%, var(--bg)) 0%,
    var(--surface-alt) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.card-rec    .card-logo { height: 160px; }
.card-crypto .card-logo { height: 100px; }
.card-fiat   .card-logo { height: 90px; }

.card-rec    .card-logo img { max-height: 90px; width: auto; object-fit: contain; }
.card-crypto .card-logo img { max-height: 56px; width: auto; object-fit: contain; }
.card-fiat   .card-logo img { max-height: 48px; width: auto; object-fit: contain; }

.card-logo .logo-fallback {
  display: none;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.card-logo img[data-broken="1"] { display: none; }
.card-logo img[data-broken="1"] + .logo-fallback { display: block; }

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-rec    .card-body { padding: 20px; gap: 14px; }
.card-fiat   .card-body { padding: 14px; gap: 10px; }

.card-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

.card-fiat .card-name { font-size: 15px; }

/* ---------- NO-DEPOSIT CHIP ---------- */

.no-deposit-chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: var(--gold-soft);
  color: var(--gold-strong);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  max-width: 100%;
}

[data-theme="dark"] .no-deposit-chip { color: var(--gold-strong); }

.no-deposit-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent);
}

.no-deposit-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- BONUS BLOCK ---------- */

.bonus-block {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.bonus-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.bonus-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.welcome-mini {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ---------- PROMO ---------- */

.promo-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.promo-input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  background: transparent;
  letter-spacing: 0.05em;
  min-width: 0;
  text-transform: uppercase;
}

.promo-input:focus { outline: none; background: var(--surface-alt); }

.promo-copy {
  padding: 0 14px;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color var(--t-base), background var(--t-base), transform 0.08s;
  position: relative;
  overflow: hidden;
}

.promo-copy:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.promo-copy:active:not(:disabled) { transform: scale(0.97); }
.promo-copy:disabled { opacity: 0.55; cursor: not-allowed; }

.promo-copy .icon-copy,
.promo-copy .icon-check { width: 14px; height: 14px; fill: currentColor; }
.promo-copy .icon-check { display: none; }

.promo-copy.copied {
  color: #fff;
  background: var(--accent);
  border-left-color: var(--accent);
}

.promo-copy.copied .icon-copy { display: none; }
.promo-copy.copied .icon-check { display: inline-block; animation: checkPop 0.34s ease; }

@keyframes checkPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.promo-copy.copied [data-copy-label] { animation: labelSlide 0.34s ease; }

@keyframes labelSlide {
  0%   { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---------- BUTTONS ---------- */

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: background var(--t-base), transform 0.06s, box-shadow var(--t-base);
  width: 100%;
  text-align: center;
}

.btn-play:hover { background: var(--accent-hover); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn-play:active { transform: scale(0.99); }

.card-fiat   .btn-play { padding: 10px 16px; font-size: 13px; }
.card-crypto .btn-play { margin-top: auto; }

.review-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: color var(--t-base), text-decoration-color var(--t-base);
}

.review-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

.tc-link {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 4px 0 0;
  transition: color var(--t-base);
}

.tc-link:hover { color: var(--text); }

/* ---------- INFO LINES (crypto) ---------- */

.info-line {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.info-line strong {
  color: var(--text);
  font-weight: 700;
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 2px;
  opacity: 0.85;
}

.info-line + .info-line { margin-top: 6px; }

/* ---------- SEARCH ---------- */

.search-wrap {
  padding: 8px 0 0;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--bg);
  transition: background var(--t-base);
}

.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-soft);
  pointer-events: none;
}

#casino-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
  -webkit-appearance: none;
}

#casino-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#casino-search::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- MODAL ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 18, 0.55);
  backdrop-filter: blur(2px);
}

[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.65); }

.modal-content {
  position: relative;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--t-base), background var(--t-base);
}

.modal-close:hover { color: var(--text); background: var(--surface-alt); }

.modal-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  padding-right: 32px;
  color: var(--text);
}

.modal-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.modal-body em { color: var(--text-muted); font-style: italic; }

/* ---------- TOAST ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: 200;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast[hidden] { display: none; }

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- FOOTER ---------- */

.site-footer {
  margin-top: 60px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer p { margin: 0; }

/* ---------- HIDDEN ---------- */

.card[data-hidden="1"] { display: none; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1000px) {
  .grid-crypto, .grid-fiat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav { gap: 6px; }

  .menu-toggle { display: inline-flex; }

  .nav-socials { margin-left: auto; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-base), opacity var(--t-base), visibility var(--t-base);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    gap: 2px;
    width: 100%;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: var(--radius-sm);
  }

  .nav-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .section { padding: 48px 0 16px; }
  .section:first-of-type { padding-top: 32px; }
  .section-title { font-size: 24px; letter-spacing: 0.05em; }
  .section-subtle { font-size: 11px; letter-spacing: 0.12em; }

  .grid-recommended { grid-template-columns: 1fr; }

  .card-rec .card-logo { height: 130px; }
  .card-rec .card-logo img { max-height: 76px; }
}

@media (max-width: 560px) {
  .container { padding: 0 14px; }

  .grid-crypto, .grid-fiat { grid-template-columns: 1fr; }

  .grid { gap: 14px; }

  .card-fiat { display: grid; grid-template-columns: 100px 1fr; }
  .card-fiat .card-logo {
    height: auto;
    min-height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .card-fiat .card-logo img { max-height: 40px; }
  .card-fiat .card-body { padding: 12px; gap: 8px; }
  .card-fiat .card-name { font-size: 14px; }

  .section-title { font-size: 20px; letter-spacing: 0.04em; }
  .section-head { margin-bottom: 24px; }

  #casino-search { font-size: 16px; }
}

/* ---------- A11y: reduce motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
