/*
  Duel style for every game page (08.11.2026).

  Lukas: "I dont like the minecraft themes at all the games ... I want all games
  at donutdrop like at duel ... that style everywhere 1:1". Measured on
  duel.com/blackjack and /plinko with getComputedStyle (their Tailwind palette):

    dark-900 #070b23  game board ground          blue-600 #4558ff  primary, active segment
    dark-800 #0c102b                             blue-500 #5e6eff  primary hover
    dark-700 #121731  control column             green-500 #6de8bf win badge / outline
    dark-600 #181e3c  tab track, inputs, bar     green-600 #20d095
    dark-500 #1f2546  hairlines                  red-500  #e8305e  loss badge / outline
    dark-400 #343c64  keys (Hit, 1/2, 2x), active tab
    dark-300 #47507c  key hover
    dark-200 #767faa  labels (14px / 600, not uppercase)

  Flat: no bevels, no glow, 8px corners on keys, 12px on tracks and frames.
  Colours, fonts and shapes only; the logos, table art and card backs are ours.

  Linked from index.html after the season theme. Page sheets are linked later
  (app.js linkCss) and the shell (game-shell.css) later still, so every rule
  here starts with :root:not(#dd) - the id in :not() lifts it over any class
  selector of a page or the theme without !important. !important is used only
  against frame.css's bevel shadows, which carry it themselves.

  Off switch: remove the <link> in index.html. Old looks: docs/design-v2/vor-duel-20261108/.
*/

/* ---------- the palette, inside game pages only ---------- */
:root:not(#dd) :is(.gs-page, [class*="pg-"]:has(.v2-game-panel)) {
  --g900: #070b23;
  --g800: #0c102b;
  --g700: #121731;
  --g600: #161b38;
  --g500: #181e3c;
  --g400: #1f2546;
  --g300: #2a3156;
  --g200: #343c64;
  --g100: #3d4570;
  --g50: #47507c;
  --t1: #e8eaf4;
  --t2: #a4aac6;
  --t3: #8d94bb;
  --t4: #8088b0;
  --t5: #767faa;
  --t6: #767faa;
  --t7: #767faa;
  --purple: #4558ff;
  --purple-600: #2133dc;
  --purple-700: #2133dc;
  --purple-300: #8f9bff;
  --teal: #6de8bf;
  --green: #20d095;
  --green-400: #6de8bf;
  --green-700: #19a375;
  --red: #e8305e;
  --red-400: #ff5c85;
  --r-lg: 12px;
  --dd-blue: #4558ff;
  --dd-blue-hover: #5e6eff;
  --dd-key: #343c64;
  --dd-key-hover: #47507c;
  --dd-track: #181e3c;
  --dd-col: #121731;
  --dd-board: #070b23;
  --dd-label: #767faa;
  --dd-win: #6de8bf;
  --dd-loss: #e8305e;
}

/* ---------- the frame: one card, control column on the left, the board on the right ---------- */
:root:not(#dd) .gs { column-gap: 0; }
/* Blackjack is laid out like Duel's table instead (table on top, a bar under it): blackjack.css */
:root:not(#dd) .gs-panel:not(.bj-panel),
:root:not(#dd) .v2-game-panel:not(.bj-panel) {
  background: var(--dd-col);
  box-shadow: none;
  border: 0;
}
:root:not(#dd) .gs-panel:not(.bj-panel) { border-radius: 12px 0 0 12px; padding: 24px; gap: 16px; }
:root:not(#dd) .gs-stage:not(.is-bare):not(.bj-stage) { background: var(--dd-board); box-shadow: none; border: 0; }
:root:not(#dd) .gs-stage:not(.bj-stage) { border-radius: 0 12px 12px 0; }
:root:not(#dd) .gs-rail { background: var(--dd-col); border: 0; box-shadow: none; border-radius: 12px; }
:root:not(#dd) .gs-toolbar { border: 0; }
/* winter's snow caps stay on the rest of the site, not on the game frames */
:root:not(#dd) :is(.gs-panel, .gs-stage, .v2-game-panel)::after { content: none; display: none; }
@media (max-width: 900px) {
  :root:not(#dd) .gs-panel { border-radius: 12px; padding: 16px; }
  :root:not(#dd) .gs-stage { border-radius: 12px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  :root:not(#dd) body.v2-mode-dock.v2-chat-open .gs-panel { padding: 16px; }
}

/* ---------- keys: DonutDrop's 3D bevel stays (Lukas 08.11.2026: "die 3d knoepfe haben gepasst");
   wells, tracks and fields are flat like Duel ---------- */
:root:not(#dd) .v2-game-panel :is(.v2-bet, .v3-well, .v3-panel, input, [class$="-tab"], [class*="-tab "], [class$="-seg"] > button, [class*="-seg "] > button),
:root:not(#dd) .gs-rail :is(button, a, span, div) {
  box-shadow: none !important;
  text-shadow: none;
}
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "], [class$="-secondary"], [class*="-secondary "], .v3-key) {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .24), inset 0 -3px 0 rgba(0, 0, 0, .32) !important;
}
:root:not(#dd) .v2-game-panel :is(.v2-bet-btn, .v2-bet-clear, .v3-key-soft) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .35) !important;
}
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "], [class$="-secondary"], [class*="-secondary "], .v3-key, .v2-bet-btn, .v2-bet-clear, .v3-key-soft):active:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3) !important;
  transform: translateY(1px);
}
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "], [class$="-secondary"], [class*="-secondary "]):is(:disabled, [aria-disabled="true"]) { box-shadow: none !important; }

/* ---------- labels: "Bet Amount", "Risk", "Number of Rows" ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dd-label);
}
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) > * { text-transform: none; letter-spacing: 0; }
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) > :last-child:not(:first-child) { color: var(--dd-label); font-weight: 600; }

/* ---------- Manual / Auto: a dark track, the chosen tab a lighter key ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-tabs"], [class*="-tabs "]) {
  height: 48px;
  padding: 4px;
  gap: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--dd-track);
  box-shadow: none;
}
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "]) {
  height: 100%;
  border-radius: 8px;
  background: transparent;
  color: var(--dd-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  border: 0;
  transition: background-color .2s, color .2s;
}
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "]) svg { display: none; }
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "]):hover:not(:disabled) { color: #fff; }
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "]):is(.is-on, .on, .active, [aria-selected="true"]) {
  background: var(--dd-key);
  color: #fff;
}

/* ---------- segmented choices (Risk, Rows, Mines ...): the chosen one is blue ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-seg"], [class*="-seg "]) {
  min-height: 48px;
  padding: 4px;
  gap: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--dd-track);
  box-shadow: none;
}
:root:not(#dd) .v2-game-panel :is([class$="-seg"], [class*="-seg "]) > button {
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--dd-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .2s, color .2s;
}
:root:not(#dd) .v2-game-panel :is([class$="-seg"], [class*="-seg "]) > button:hover:not(:disabled) { color: #fff; }
:root:not(#dd) .v2-game-panel :is([class$="-seg"], [class*="-seg "]) > button:is(.is-on, .on, .active, [aria-pressed="true"], [aria-checked="true"]) {
  background: var(--dd-blue);
  color: #fff;
}

/* ---------- the amount field: dark well, small keys ½ 2x MAX ---------- */
:root:not(#dd) .v2-game-panel .v2-bet {
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--dd-track);
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color .15s;
}
:root:not(#dd) .v2-game-panel .v2-bet:focus-within { outline-color: var(--dd-key); }
:root:not(#dd) .v2-game-panel .v2-bet.bad { outline-color: var(--dd-loss); }
:root:not(#dd) .v2-game-panel .v2-bet-in { color: #fff; font-size: 16px; font-weight: 600; }
:root:not(#dd) .v2-game-panel .v2-bet-in::placeholder { color: var(--g50); }
:root:not(#dd) .v2-game-panel :is(.v2-bet-btn, .v2-bet-clear) {
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  background: var(--dd-key);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}
:root:not(#dd) .v2-game-panel .v2-bet-btn { width: auto; padding: 0 10px; }
:root:not(#dd) .v2-game-panel .v2-bet-clear { padding: 0 10px; }
:root:not(#dd) .v2-game-panel :is(.v2-bet-btn, .v2-bet-clear):hover:not(:disabled) { background: var(--dd-key-hover); color: #fff; }

/* other fields of the panels (target, rounds, stop win ...) */
:root:not(#dd) .v2-game-panel :is([class$="-field-box"], [class*="-field-box "], [class$="-field"], [class*="-field "]) {
  border: 0;
  border-radius: 8px;
  background: var(--dd-track);
  box-shadow: none;
}
:root:not(#dd) .v2-game-panel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.v2-bet-in) { color: #fff; }

/* ---------- the big action: Place Bet ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]) {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--dd-blue);
  background-image: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  filter: none;
  transition: background-color .15s, opacity .15s;
}
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--dd-blue-hover); }
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]):is(:disabled, [aria-disabled="true"]) { background: var(--dd-key); opacity: .5; }
/* a running autoplay turns the key into a stop key: keep the page's own red if it has one */
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]):is(.is-stop, .is-running) { background: var(--dd-loss); }

/* secondary keys of the panels */
:root:not(#dd) .v2-game-panel :is([class$="-secondary"], [class*="-secondary "]) {
  border: 0;
  border-radius: 8px;
  background: var(--dd-key);
  color: #fff;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
:root:not(#dd) .v2-game-panel :is([class$="-secondary"], [class*="-secondary "]):hover:not(:disabled) { background: var(--dd-key-hover); }
:root:not(#dd) .v2-game-panel :is([class$="-secondary"], [class*="-secondary "]):disabled { background: var(--dd-key); opacity: .5; }

/* ---------- switches ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-switch"], [class*="-switch "]) { background: var(--dd-key); border: 0; box-shadow: none; }
:root:not(#dd) .v2-game-panel :is([class$="-switch"], [class*="-switch "]):is([aria-checked="true"], .is-on) { background: var(--dd-blue); }

/* ---------- range sliders (Rows on some pages, targets) ---------- */
:root:not(#dd) .v2-game-panel input[type="range"] { accent-color: var(--dd-blue); }

/* ---------- the toolbar over the board and the rail under it ---------- */
:root:not(#dd) .gs-toolbar > :is(button, a) { color: var(--dd-label); text-transform: none; font-size: 13px; letter-spacing: 0; font-weight: 600; }
:root:not(#dd) .gs-toolbar > :is(button, a):hover { color: #fff; background: rgba(118, 127, 170, .12); }
:root:not(#dd) .gs-rail-label { color: var(--dd-label); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
:root:not(#dd) .gs-rail-right a { color: var(--dd-label); }
:root:not(#dd) .gs-rail-right a:hover { color: #fff; }
:root:not(#dd) .gs-rail-right a span { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- boards that bring their own greys ---------- */
/* Mines: Duel's slate tiles instead of winter's ice blocks */
:root:not(#dd) .pg-mines .mn-board { --mn-face: #343c64; --mn-face-hover: #47507c; --mn-lip: #1f2546; }
:root:not(#dd) .pg-mines .mn-tile:not(.is-gem):not(.is-bomb) { background-image: none; }

/* ---------- flat boards: bevel.js hands out v3-* classes outside the panel too,
   and winter.css gives them ice shadows; Duel's boards are flat ---------- */
:root:not(#dd) :is(.gs-stage, .v2-game-stage) :is(.v3-tile, .v3-panel, .v3-well) { box-shadow: none !important; }
:root:not(#dd) :is(.gs-stage, .v2-game-stage) .v3-tile:active:not(:disabled) { transform: none; }

/* ---------- the older two-column layout (layout.css .v2-game): one card as well ---------- */
@media (min-width: 901px) {
  :root:not(#dd) .v2-game:has(> .v2-game-panel):has(> .v2-game-stage) { gap: 0; align-items: stretch; }
  :root:not(#dd) .v2-game > .v2-game-panel { border-radius: 12px 0 0 12px; }
  :root:not(#dd) .v2-game:has(> .v2-game-panel) > .v2-game-stage { border-radius: 0 12px 12px 0; background: var(--dd-board); }
}

/* ---------- cash out stays green (crash, snake, mines, tower ...): Duel's cash-out is green too ---------- */
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]):is(.is-cash, .is-cashout) { background: var(--green); color: #070b23; }
:root:not(#dd) .v2-game-panel :is([class$="-primary"], [class*="-primary "]):is(.is-cash, .is-cashout):hover:not(:disabled) { background: var(--dd-win); }

/* ---------- the cards under the fold ("About" ...): no winter ice rim ---------- */
:root:not(#dd) .v2-game-below :is(.v3-panel, .v3-tile) { box-shadow: none !important; }

/* The plain navy ground behind the games (08.11.2026) was taken out again the same day: the players wanted the
   season's scenery back behind the game cards. The old rule:
 ---------- a plain ground behind the games (Lukas 08.11.2026: "ganz clean, smooth") ----------
   The season's scenery stays in the header, the chat and the rest of the site;
   on a game page the area around the game card is Duel's flat navy, so the gaps
   between the card, the rail and the cards below read as one surface.
   Case Battles keeps its own look (Lukas: all games except Case Battles). 
:root:not(#dd) #page:is(:has(.gs-page), :has(.v2-game-panel), :has(.pg-sports, .pg-uno, .pg-pool, .pg-chess, .pg-slots, .pg-stocks, .pg-coins, .pg-cases, .pg-mob-wars, .pg-bow)):not(:has(.pg-battles)) {
  background: #0c102b;
}
*/

/* ---------- the board without its own ground (Lukas 08.11.2026: first "das dunkelblaue komplett weg", then   "genau verkehrt": the bet panel on the left keeps its navy, the board on the right loses it) ----------
   The board's tiles, wheel, pegs, cards and fields stand on the season's scenery; the control column
   stays a solid navy card. A faint shadow under the board's loose text keeps it readable over the
   lighter parts of the picture. Wells, keys, tiles and cards inside the board stay solid. */
@media (min-width: 901px) {
  :root:not(#dd) .gs:not(.bj-main) { column-gap: 16px; }
  :root:not(#dd) .gs-panel:not(.bj-panel) { border-radius: 12px; }
  :root:not(#dd) .v2-game:has(> .v2-game-panel):has(> .v2-game-stage) { gap: 16px; }
  :root:not(#dd) .v2-game > .v2-game-panel { border-radius: 12px; }
}
:root:not(#dd) .gs-stage:not(.is-bare):not(.bj-stage),
:root:not(#dd) .gs-stage.is-bare:not(.bj-stage),
:root:not(#dd) .v2-game:has(> .v2-game-panel) > .v2-game-stage {
  background: transparent;
  box-shadow: none;
}
:root:not(#dd) .pg-blackjack .bj-main.gs { background: transparent; }
:root:not(#dd) :is(.gs-stage, .v2-game-stage) :is(.gs-toolbar, [class$="-cap"], [class*="-cap "], label, h1, h4, h5, p, small) {
  text-shadow: 0 1px 3px rgba(3, 6, 24, .85);
}
/* the pages' own solid board grounds (each page painted #070b23 on its stage) */
:root:not(#dd) :is(
  .pg-plinko .pk-fit, .pg-limbo .lm-stage, .pg-dice .dc-stage, .pg-keno .kn-stage, .pg-upgrader .v2-game-stage,
  .pg-crash .cr-stage, .pg-chicken-road .cr-stage, .pg-glass-bridge .gb-stage, .pg-hilo .hl-stage, .pg-coinflip .cf-stage,
  .pg-roulette .rl-stage, .pg-roulette .rl-stage-in, .pg-russian-roulette .rr-stage, .pg-moles .ml-stage,
  .pg-horse-race .hr-board, .pg-horse-race .hr-stage, .pg-snake .sn-board-wrap, .pg-cases .cd-stage,
  .pg-stocks .st-stage, .cn-stage, .pg-tower .tw-stage
) { background: transparent !important; box-shadow: none !important; }

/* ======================================================================
   donutsurge's construction in DonutDrop's colours (24.11.2026, Lukas: "Wie kann man das
   Design der ganzen Website auf donutsurge Qualitaet bringen" - "Unseren Farben").
   The game frame is ONE frame: the control column, the board and the rail under both
   share one lit edge, joined by hairlines instead of gaps. The panel's labels are
   capitals, its tracks and fields are wells, the chosen tab and choice are the blue key,
   the keys bevelled. Tokens: tokens.css (--ds-lit, --ds-edge, --ds-well ...).
   ====================================================================== */
@media (min-width: 901px) {
  :root:not(#dd) .gs:not(:has(.bj-panel)) { row-gap: 0; border-radius: 10px; box-shadow: var(--ds-edge), 0 10px 30px -18px rgba(3, 6, 24, .8); }
  :root:not(#dd) .gs-panel:not(.bj-panel) { border-radius: 10px 0 0 0; box-shadow: inset -1px 0 0 var(--ds-hair); }
  :root:not(#dd) .gs-stage:not(.bj-stage) { border-radius: 0 10px 0 0; }
  :root:not(#dd) .gs:not(:has(.bj-panel)) > .gs-rail { border-radius: 0 0 10px 10px; box-shadow: inset 0 1px 0 var(--ds-hair); }
}
:root:not(#dd) .gs-panel:not(.bj-panel), :root:not(#dd) .v2-game-panel:not(.bj-panel) { background: var(--ds-lit); }
:root:not(#dd) .gs-rail { background: var(--ds-surface); }

/* labels: BET AMOUNT, NUMBER OF MINES */
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) {
  font: var(--ds-caps); letter-spacing: var(--ds-caps-track); text-transform: uppercase; color: var(--ds-text-3);
}
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) > * { text-transform: uppercase; letter-spacing: var(--ds-caps-track); }
:root:not(#dd) .v2-game-panel :is([class$="-cap"], [class*="-cap "]) > :last-child:not(:first-child) { color: var(--ds-text-5); font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Manual / Auto and every choice row: a well, the chosen one the blue key */
:root:not(#dd) .v2-game-panel :is([class$="-tabs"], [class*="-tabs "], [class$="-seg"], [class*="-seg "]) {
  height: auto; min-height: 44px; padding: 3px; gap: 3px; border-radius: 6px; background: var(--ds-well); box-shadow: var(--ds-edge-well) !important;
}
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "], [class$="-seg"] > button, [class*="-seg "] > button) {
  min-height: 36px; border-radius: 4px; color: var(--ds-text-4); font-weight: 700;
}
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "], [class$="-seg"] > button, [class*="-seg "] > button):hover:not(:disabled):not(.is-on) { background: var(--ds-surface-3); color: #fff; }
:root:not(#dd) .v2-game-panel :is([class$="-tab"], [class*="-tab "]):is(.is-on, .on, .active, [aria-selected="true"]),
:root:not(#dd) .v2-game-panel :is([class$="-seg"], [class*="-seg "]) > button:is(.is-on, .on, .active, [aria-pressed="true"], [aria-checked="true"]) {
  background: var(--ds-fill-blue); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24) !important;
}

/* The fields and keys (amount field, CLEAR 1/2 2X MAX, Play, the secondary keys) stay as they were:
   Lukas 24.11.2026, "die felder und knoepfe haben frueher besser gepasst". */

/* toolbar and rail: quiet keys, capitals for the rail's label */
:root:not(#dd) .gs-toolbar > :is(button, a) { border-radius: 6px; }
:root:not(#dd) .gs-rail-label { font: var(--ds-caps); letter-spacing: var(--ds-caps-track); text-transform: uppercase; color: var(--ds-text-4); }

/* The same one frame for the games that are not on the shell (Upgrader, Keno, Roulette, Moles,
   Stocks, Horse Race, Russian Roulette: .v2-game = panel | stage side by side, 24.11.2026). */
@media (min-width: 901px) {
  :root:not(#dd) .v2-game:has(> .v2-game-panel):has(> .v2-game-stage) {
    gap: 0; border-radius: 10px; box-shadow: var(--ds-edge), 0 10px 30px -18px rgba(3, 6, 24, .8);
  }
  :root:not(#dd) .v2-game > .v2-game-panel:not(.bj-panel) { border-radius: 10px 0 0 10px; box-shadow: inset -1px 0 0 var(--ds-hair) !important; }
  :root:not(#dd) .v2-game > .v2-game-stage { border-radius: 0 10px 10px 0; }
}
