/* ===============================================
   GAME ACCENT - one colour for each game, used next to the brand colours
     Race  green  #00ff92   (the brand green itself)
     Dice  gold   #f5c542
     Coin  cyan   #4de1ff
     Card  pink   #ff5fa8
     Slot  violet #b48cff
   Loaded LAST on every page of a game (<body data-game="race|dice|coin|card|slot">).
   The split is the same on every game, so each page feels balanced:
     the game colour = who you are playing: title line, steps, chosen option, cards and boxes, guide headings, scrollbars
     the brand green = what you do and what you win: NEXT / FIX / confirm buttons, toasts, win window
     the brand crimson = the dark stage behind (not touched here)
   Looks only. To go back, remove this one <link> from the page.
   =============================================== */

body[data-game="race"] { --ga: #00ff92; --ga-rgb: 0, 255, 146; }
body[data-game="dice"] { --ga: #f5c542; --ga-rgb: 245, 197, 66; }
body[data-game="coin"] { --ga: #4de1ff; --ga-rgb: 77, 225, 255; }
body[data-game="card"] { --ga: #ff5fa8; --ga-rgb: 255, 95, 168; }
body[data-game="slot"] { --ga: #b48cff; --ga-rgb: 180, 140, 255; }
body[data-game="tale"] { --ga: #ff6a00; --ga-rgb: 255, 106, 0; }

/* ---------- title: glow and the short line under it ---------- */
body[data-game] main[class$="-body"] h1,
body[data-game] h1[class$="-title-d"],
body[data-game] h1[class$="-title-p"] {
  text-shadow: 0 0 18px rgba(var(--ga-rgb), 0.22), 0 1px 1px rgba(0, 0, 0, 0.6);
}

body[data-game] main[class$="-body"] h1::after,
body[data-game] h1[class$="-title-d"]::after,
body[data-game] h1[class$="-title-p"]::after {
  background: linear-gradient(90deg, var(--ga), rgba(var(--ga-rgb), 0));
  box-shadow: 0 0 10px rgba(var(--ga-rgb), 0.55);
}

/* ---------- the four steps (Choose / Bet / Roll / Win): the step you are on; the steps done stay brand green ---------- */
body[data-game] .kd-flow-step.is-now .kd-flow-dot {
  background: var(--ga);
  border-color: var(--ga);
  box-shadow: 0 0 0 4px rgba(var(--ga-rgb), 0.16), 0 0 16px rgba(var(--ga-rgb), 0.65);
}
body[data-game] .kd-flow-step.is-now .kd-flow-name {
  color: var(--ga);
  text-shadow: 0 0 10px rgba(var(--ga-rgb), 0.45);
}

/* ---------- choose page: the option you picked and the switch ---------- */
body[data-game] .kd-opt.is-active,
body[data-game] .kc-opt.is-active,
body[data-game] .kcard-opt.is-active,
body[data-game] .kslot-opt.is-active {
  border-color: var(--ga);
  background: rgba(var(--ga-rgb), 0.12);
  box-shadow: 0 0 16px rgba(var(--ga-rgb), 0.3);
}
body[data-game] .kd-knob,
body[data-game] .kc-knob,
body[data-game] .kcard-knob,
body[data-game] .kslot-knob {
  box-shadow: 0 0 14px rgba(var(--ga-rgb), 0.55);
}

/* ---------- bet pages: the cards, the multiplier tag, the chosen type, the amount ---------- */
body[data-game] .db-card,
body[data-game] .db-card-p {
  border-top-color: rgba(var(--ga-rgb), 0.55);
}
body[data-game] .db-card.db-card-active,
body[data-game] .db-card-p.db-card-active {
  border-color: rgba(var(--ga-rgb), 0.45);
  border-top-color: rgba(var(--ga-rgb), 0.8);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(var(--ga-rgb), 0.2);
}
body[data-game] .db-card.db-card-active:hover,
body[data-game] .db-card-p.db-card-active:hover {
  border-color: rgba(var(--ga-rgb), 0.6);
}
body[data-game] .db-card-mult {
  border-color: rgba(var(--ga-rgb), 0.4);
  background: rgba(var(--ga-rgb), 0.09);
  color: var(--ga);
  text-shadow: 0 0 10px rgba(var(--ga-rgb), 0.5);
}
body[data-game] button.db-type-btn.db-type-selected {
  border-color: rgba(var(--ga-rgb), 0.75);
  background: rgba(var(--ga-rgb), 0.12);
  box-shadow: 0 0 12px rgba(var(--ga-rgb), 0.3);
}
body[data-game] .db-amount-value.db-active {
  text-shadow: 0 0 14px rgba(var(--ga-rgb), 0.45);
}
body[data-game] .db-sign:hover {
  background: rgba(var(--ga-rgb), 0.1);
  box-shadow: 0 0 12px rgba(var(--ga-rgb), 0.35);
}
body[data-game] .cb-prediction,
body[data-game] .cp-prediction,
body[data-game] .c6-prediction {
  text-shadow: 0 0 12px rgba(var(--ga-rgb), 0.45);
}

/* ---------- roll / flip / spin pages: the fairness box, the placed bets, the boxes of the game ---------- */
body[data-game] .tb-trust-box,
body[data-game] .tb-trust-box-p,
body[data-game] .dr-dice-box,
body[data-game] [class*="-coin-card"] {
  border-top-color: rgba(var(--ga-rgb), 0.55);
}
body[data-game] .dr-placed-row,
body[data-game] .cf-placed-row.kd-bt-target,
body[data-game] [class*="placed-box"],
body[data-game] [class*="-field-value"] {
  border-left-color: rgba(var(--ga-rgb), 0.65);
}
body[data-game] button[class*="-coin-card"]:not(:disabled):hover {
  border-color: rgba(var(--ga-rgb), 0.5);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(var(--ga-rgb), 0.2);
}

/* ---------- text pages of the game (the guide) ---------- */
body[data-game] [class$="-heading"] {
  color: var(--ga);
  border-bottom-color: rgba(var(--ga-rgb), 0.2);
}
body[data-game] [class$="-highlight"] {
  color: rgba(var(--ga-rgb), 0.6);
}
body[data-game] [class$="-scrollbar-thumb"] {
  background: var(--ga);
  box-shadow: 0 0 8px rgba(var(--ga-rgb), 0.65);
}
body[data-game] main[class$="-body"] [class$="guide-scroll"] {
  border-top-color: rgba(var(--ga-rgb), 0.55);
}

/* ---------- Knight Race: the green is the game colour, the cards keep it; the timers stay green as before ---------- */

/* ---------- the guide hub: each game card in its own colour ---------- */
body .gameguide-card.gg-dice,
body .gameguide-card.gg-coin,
body .gameguide-card.gg-card,
body .gameguide-card.gg-slot,
body .gameguide-card.gg-tale,
body .gameguide-card.gg-race { --gg-rgb: 0, 255, 146; }
body .gameguide-card.gg-dice { --gg-rgb: 245, 197, 66; }
body .gameguide-card.gg-coin { --gg-rgb: 77, 225, 255; }
body .gameguide-card.gg-card { --gg-rgb: 255, 95, 168; }
body .gameguide-card.gg-slot { --gg-rgb: 180, 140, 255; }
body .gameguide-card.gg-tale { --gg-rgb: 255, 106, 0; }
body .gameguide-card { border-top-color: rgba(var(--gg-rgb), 0.6); }
body .gameguide-card::after { border-color: rgba(var(--gg-rgb), 0.4); }
body .gameguide-card:hover {
  border-color: rgba(var(--gg-rgb), 0.5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6), 0 0 22px rgba(var(--gg-rgb), 0.28);
}
body .gameguide-card:hover::after { background: rgba(var(--gg-rgb), 0.14); }

/* ---------- the play page: the light under every poster and its glow follow the game ---------- */
.play-card[href$="knight-race"] { --pc-rgb: 0, 255, 146; }
.play-card[href$="knight-dice"] { --pc-rgb: 245, 197, 66; }
.play-card[href$="knight-coin"] { --pc-rgb: 77, 225, 255; }
.play-card[href$="knight-card"] { --pc-rgb: 255, 95, 168; }
.play-card[href$="knight-slot"] { --pc-rgb: 180, 140, 255; }
.play-card[href$="knight-tale"] { --pc-rgb: 255, 106, 0; }
.play-card::after {
  background: radial-gradient(ellipse at center, rgba(var(--pc-rgb, 0, 255, 146), 0.55), rgba(var(--pc-rgb, 0, 255, 146), 0) 70%);
}
.play-card:focus-visible { outline-color: rgb(var(--pc-rgb, 0, 255, 146)); }
/* hover: the glow around the poster takes the colour of its game (the poster picture keeps its own border) */
.play-card:hover img,
.play-card:focus-visible img {
  filter: drop-shadow(3px 3px 0px #000) drop-shadow(0 0 calc(var(--play-glow-blur) * 2.4) rgba(var(--pc-rgb, 0, 255, 146), 0.75));
}

/* ---------- phone: the page itself may scroll on a short screen; its own scroll bar is hidden so only the thin site bar of the lists shows (same on every game page) ---------- */
@media (max-width: 768px) {
  body[data-game] main[class$="-body"] {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  body[data-game] main[class$="-body"]::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}
