/* =========================================================================
   NovaCorp Casino - Tische und Animationen
   ========================================================================= */

.casino-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.game-card {
  position: relative; cursor: pointer; text-align: left;
  background: linear-gradient(160deg, rgba(22,29,46,0.95), rgba(10,14,24,0.95));
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  transition: transform 0.16s var(--ease), border-color 0.16s, box-shadow 0.16s;
  overflow: hidden; font-family: inherit; color: var(--text); width: 100%;
}
.game-card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s;
  background: radial-gradient(circle at 80% 0%, rgba(245,166,35,0.16), transparent 60%);
}
.game-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 14px 34px rgba(0,0,0,0.6); }
.game-card:hover::after { opacity: 1; }
.game-card .g-ico { font-size: 2.4rem; margin-bottom: 10px; display: block; }
.game-card .g-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--text-bright); letter-spacing: 1px; text-transform: uppercase;
}
.game-card .g-desc { font-size: 0.83rem; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }
.game-card .g-odds {
  margin-top: 12px; font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--gold); letter-spacing: 0.4px;
}

/* ------------------------------------------------------------- Spieltisch */
.table-modal { max-width: 620px; }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.table-head h2 { margin: 0; }
.table-sub { color: var(--text-dim); font-size: 0.86rem; margin-bottom: 18px; }

.bet-row { display: flex; gap: 9px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.bet-row .input { flex: 1 1 150px; }
.bet-chip {
  padding: 7px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--bg-slot); border: 1px solid var(--line); color: var(--text-dim);
  font-family: var(--font-display); font-weight: 600; font-size: 0.86rem;
}
.bet-chip:hover { border-color: var(--gold); color: var(--gold); }

.stage-box {
  background: radial-gradient(ellipse at 50% 0%, rgba(47,224,228,0.07), transparent 70%), rgba(3,5,10,0.6);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 24px 18px; margin-bottom: 16px; min-height: 190px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.stage-msg { font-family: var(--font-display); font-size: 1.05rem; color: var(--text-dim); text-align: center; }
.stage-msg.win  { color: var(--green); font-size: 1.35rem; font-weight: 700; }
.stage-msg.lose { color: var(--red);   font-size: 1.35rem; font-weight: 700; }

.payout-line {
  display: flex; align-items: baseline; gap: 10px; justify-content: center;
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
}
.payout-line.win  { color: var(--green); }
.payout-line.lose { color: var(--red); }
.payout-line small { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }

/* --------------------------------------------------------------- Coinflip */
.coin {
  width: 118px; height: 118px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #2a1a05;
  background: radial-gradient(circle at 34% 30%, #ffe08a, #f5a623 55%, #9c5f06);
  box-shadow: 0 0 34px rgba(245,166,35,0.45), inset 0 -8px 14px rgba(0,0,0,0.35);
  transform-style: preserve-3d;
}
.coin.spin { animation: coinSpin 0.42s linear infinite; }
@keyframes coinSpin { to { transform: rotateY(360deg); } }
.coin.land { animation: coinLand 0.55s var(--ease); }
@keyframes coinLand { 0% { transform: rotateY(720deg) scale(0.85); } 100% { transform: none; } }

/* ------------------------------------------------------------------ Slots */
.reels { display: flex; gap: 12px; }
.reel {
  width: 84px; height: 104px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #05070d, #10141f);
  border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-size: 2.9rem;
  box-shadow: inset 0 0 22px rgba(0,0,0,0.9);
}
.reel.spinning { animation: reelBlur 0.09s linear infinite; }
@keyframes reelBlur {
  0%   { transform: translateY(-14px); filter: blur(3px); }
  100% { transform: translateY(14px);  filter: blur(3px); }
}
.reel.hit { border-color: var(--gold); box-shadow: 0 0 26px rgba(245,166,35,0.55), inset 0 0 22px rgba(245,166,35,0.2); }

/* --------------------------------------------------------------- Roulette */
.roulette-wrap { position: relative; width: 224px; height: 224px; }
.wheel {
  position: absolute; inset: 0; border-radius: 50%;
  border: 6px solid #2b2013;
  box-shadow: 0 0 34px rgba(0,0,0,0.75), inset 0 0 28px rgba(0,0,0,0.65);
  transition: transform 4.2s cubic-bezier(0.17, 0.72, 0.16, 1);
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: radial-gradient(circle at 36% 32%, #3b2d1c, #14100a);
  border: 2px solid #4b3a22; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; z-index: 3;
}
/* Die Kugel haengt an einem unsichtbaren Arm, der um die Radmitte dreht -
   sonst rotiert sie nur um sich selbst und bleibt im Zentrum liegen. */
.ball-arm {
  position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: 4;
  transition: transform 4.2s cubic-bezier(0.17, 0.72, 0.16, 1);
}
.ball {
  position: absolute; top: -95px; left: -6.5px; width: 13px; height: 13px;
  border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #b9c3d4);
  box-shadow: 0 0 10px rgba(255,255,255,0.9);
}
.roulette-result {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700;
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.roulette-result.red   { background: linear-gradient(160deg, #d62b46, #7d0f20); }
.roulette-result.black { background: linear-gradient(160deg, #2b3242, #0d1017); }
.roulette-result.green { background: linear-gradient(160deg, #1f9d55, #0b4d28); }

.bet-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 14px; }
.bet-board button {
  padding: 9px 4px; border-radius: 7px; cursor: pointer; font-family: var(--font-display);
  font-weight: 600; font-size: 0.82rem; border: 1px solid var(--line);
  background: var(--bg-slot); color: var(--text-dim);
}
.bet-board button:hover { border-color: var(--cyan); color: var(--text-bright); }
.bet-board button.sel { background: rgba(47,224,228,0.16); border-color: var(--cyan); color: var(--cyan); }
.bet-board button.red   { color: #ff8095; }
.bet-board button.black { color: #aab4c6; }

/* ----------------------------------------------------------- Spielkarten */
.hand { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.hand-label { font-size: 0.72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; text-align: center; }
.pcard {
  width: 62px; height: 88px; border-radius: 8px; position: relative;
  background: linear-gradient(170deg, #fdfdfd, #dfe4ee);
  border: 1px solid #b6bfd0; color: #10141f;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; box-shadow: 0 5px 14px rgba(0,0,0,0.55);
  animation: cardIn 0.32s var(--ease) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-18px) rotateY(90deg); }
  to   { opacity: 1; transform: none; }
}
.pcard .r { font-size: 1.45rem; line-height: 1; }
.pcard .s { font-size: 1.05rem; margin-top: 2px; }
.pcard.red-suit { color: #c0223c; }
.pcard.back {
  background: repeating-linear-gradient(45deg, #16233d, #16233d 6px, #0f1930 6px, #0f1930 12px);
  border-color: #33456b; color: #6d80a8;
}
.pcard.held { outline: 2px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 18px rgba(245,166,35,0.5); }
.pcard.pick { cursor: pointer; }
.pcard.pick:hover { transform: translateY(-6px); }
.hold-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1c1203; font-size: 0.6rem; font-weight: 800;
  padding: 1px 7px; border-radius: 999px; letter-spacing: 1px;
}

/* ------------------------------------------------------------------ Crash */
.crash-box { width: 100%; }
.crash-mult {
  font-family: var(--font-display); font-size: 3.4rem; font-weight: 700;
  color: var(--cyan); text-align: center; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(47,224,228,0.5); line-height: 1;
}
.crash-mult.hot { color: var(--gold); text-shadow: 0 0 26px rgba(245,166,35,0.5); }
.crash-mult.boom { color: var(--red); animation: shake 0.4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-9px); } 75% { transform: translateX(9px); }
}
.crash-canvas { width: 100%; height: 132px; display: block; margin-top: 8px; }
.cr-hist { display: flex; align-items: center; gap: 5px; margin: 2px 0 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cr-hist::-webkit-scrollbar { display: none; }
.cr-hist small { flex-shrink: 0; font-size: .62rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); margin-right: 3px; }
.cr-wait { font-size: .75rem; color: var(--text-dim); }
.cr-chip { flex-shrink: 0; padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-variant-numeric: tabular-nums; border: 1px solid; }
.cr-chip.low  { color: #ff8a9b; border-color: rgba(255,77,106,.4);  background: rgba(255,77,106,.08); }
.cr-chip.mid  { color: #9df4ff; border-color: rgba(47,224,228,.4);  background: rgba(47,224,228,.08); }
.cr-chip.high { color: #ffd27a; border-color: rgba(245,166,35,.5);  background: rgba(245,166,35,.1); }
.cr-chip.moon { color: #f0c2ff; border-color: rgba(224,92,255,.6);  background: rgba(224,92,255,.14); box-shadow: 0 0 10px rgba(224,92,255,.35); }
.cr-live { margin-top: 10px; display: grid; gap: 8px; }
.cr-live-h { font-size: .78rem; color: var(--text-dim); }
.cr-live-h i { font-style: normal; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: rgba(47,224,228,.15); color: var(--cyan); }
.cr-pilots { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-pilots span { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 10px; font-size: .76rem; background: rgba(47,224,228,.06); border: 1px solid rgba(47,224,228,.25); }
.cr-pilots span.me { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.08); }
.cr-pilots b { color: #fff; } .cr-pilots em { font-style: normal; color: var(--text-dim); } .cr-pilots u { text-decoration: none; color: var(--cyan); font-variant-numeric: tabular-nums; }
.cr-res { display: grid; gap: 3px; max-height: 128px; overflow: auto; }
.cr-res span { display: flex; gap: 6px; align-items: baseline; font-size: .74rem; color: var(--text); }
.cr-res span em { margin-left: auto; font-style: normal; color: var(--text-dim); }
.cr-res span u { text-decoration: none; font-variant-numeric: tabular-nums; }
.cr-res span.w u { color: #7dff8a; } .cr-res span.l u { color: #ff8a9b; }

/* ------------------------------------------------------------------ Tower */
.tower { display: flex; flex-direction: column-reverse; gap: 5px; width: 100%; }
.tower-floor { display: grid; grid-template-columns: 36px repeat(3, 1fr); gap: 6px; align-items: center; opacity: 0.35; }
.tower-floor.active { opacity: 1; }
.tower-floor.done { opacity: 0.6; }
.tower-floor .lvl { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); text-align: right; }
.tower-door {
  height: 34px; border-radius: 6px; cursor: default; font-size: 1.05rem;
  background: var(--bg-slot); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.tower-floor.active .tower-door { cursor: pointer; border-color: var(--line-strong); }
.tower-floor.active .tower-door:hover { border-color: var(--cyan); background: rgba(47,224,228,0.1); transform: translateY(-2px); }
.tower-door.safe { border-color: var(--green); background: rgba(52,224,127,0.16); }
.tower-door.boom { border-color: var(--red); background: rgba(255,77,106,0.2); animation: shake 0.4s; }

/* ----------------------------------------------------------------- Rennen */
.race-track { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.lane {
  position: relative; height: 34px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent);
  border: 1px solid var(--line); overflow: hidden;
}
.lane .runner {
  position: absolute; top: 50%; left: 4px; transform: translate(0, -50%);
  font-size: 1.3rem; transition: left 3.4s cubic-bezier(0.3, 0.1, 0.35, 1);
}
.lane .tag {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.6px;
}
.lane.mine { border-color: var(--cyan); }
.lane.won  { border-color: var(--gold); background: rgba(245,166,35,0.09); }

/* ------------------------------------------------------------------- Warp */
.thermo { display: flex; align-items: center; gap: 18px; }
.thermo-tube {
  width: 34px; height: 168px; border-radius: 999px; position: relative; overflow: hidden;
  background: #0a0e16; border: 2px solid var(--line-strong);
}
.thermo-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, var(--red), var(--gold) 50%, var(--cyan));
  transition: height 0.6s var(--ease);
}
.thermo-val {
  font-family: var(--font-display); font-size: 2.7rem; font-weight: 700;
  color: var(--text-bright); font-variant-numeric: tabular-nums;
}
.warp-odds { display: flex; gap: 10px; width: 100%; }
.warp-odds button { flex: 1; }
.warp-odds .p { display: block; font-size: 0.7rem; opacity: 0.8; font-weight: 500; letter-spacing: 0; }

/* -------------------------------------------------------------- Feedback */
.shield-note {
  display: flex; gap: 9px; align-items: center; justify-content: center;
  color: var(--blue); font-family: var(--font-display); font-size: 1rem;
}
.tax-note { font-size: 0.76rem; color: var(--text-dim); text-align: center; }

.jackpot-flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 110;
  background: radial-gradient(circle at 50% 45%, rgba(245,166,35,0.35), transparent 62%);
  animation: flash 0.85s var(--ease) forwards;
}
@keyframes flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 900px) {
  .roulette-wrap { width: 184px; height: 184px; }
  .reel { width: 68px; height: 86px; font-size: 2.3rem; }
  .pcard { width: 52px; height: 74px; }
  .pcard .r { font-size: 1.2rem; }
  .crash-mult { font-size: 2.6rem; }
  .bet-board { grid-template-columns: repeat(3, 1fr); }
  .casino-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .game-card { padding: 14px; }
  .game-card .g-desc, .game-card .g-odds { display: none; }
}

/* Ergebnis-Verlauf: hoechstens 3 Runden, aeltere gedimmt */
.outcome-log { display: flex; flex-direction: column; gap: 4px; }
.outcome-log .oc-entry { animation: oc-in .3s ease both; }
.outcome-log .oc-entry.old { opacity: .45; transform: scale(.94); transform-origin: top center; animation: none; }
.outcome-log .oc-entry.old .stage-msg.win, .outcome-log .oc-entry.old .tax-note { display: none; }
.outcome-log .oc-entry.old + .oc-entry.old { opacity: .25; }
@keyframes oc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .outcome-log .oc-entry { animation: none; } }

/* ------------------------------------------------ Gewinntabellen (Slots) */
.g-tag { font-style: normal; font-size: .62rem; padding: 1px 6px; border-radius: 6px; background: var(--gold); color: #1a1204; vertical-align: middle; letter-spacing: .04em; }
.slot-pay { text-align: left; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: rgba(255,255,255,.025); display: grid; gap: 4px; }
.slot-pay .sp-head { font-family: var(--font-display); font-size: .95rem; color: var(--text-bright); display: flex; flex-direction: column; gap: 2px; margin-bottom: 2px; }
.slot-pay .sp-head small { font-family: var(--font-body); font-size: .74rem; color: var(--text-dim); }
.slot-pay summary { cursor: pointer; font-family: var(--font-display); font-size: .95rem; color: var(--text-bright); padding: 2px 0; }
.sp-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 8px; transition: background .25s, box-shadow .25s; }
.sp-row:nth-child(odd) { background: rgba(255,255,255,.025); }
.sp-row .sp-sym { font-size: 1.15rem; letter-spacing: 1px; white-space: nowrap; }
.sp-row .sp-name { font-size: .85rem; color: var(--text); display: flex; flex-direction: column; min-width: 0; }
.sp-row .sp-name small { font-size: .7rem; color: var(--text-dim); }
.sp-row .sp-mult { color: var(--gold); font-family: var(--font-display); font-size: 1.05rem; }
.sp-row .sp-odds { color: var(--text-dim); font-size: .7rem; white-space: nowrap; min-width: 70px; text-align: right; }
.sp-row.hit { background: rgba(245,166,35,.16); box-shadow: inset 0 0 0 1px var(--gold); }
.sn-sp { grid-template-columns: auto 1fr repeat(3, auto); }
.sn-sp .sp-3 { font-size: .74rem; color: var(--gold); white-space: nowrap; min-width: 44px; text-align: right; }
.sn-lines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.sn-line { display: flex; align-items: center; gap: 4px; font-size: .7rem; color: var(--text-dim); }
.sn-lsvg { width: 100%; max-width: 60px; height: auto; }
.sn-lsvg circle { fill: rgba(255,255,255,.18); }
.sn-lsvg polyline { fill: none; stroke: var(--cyan, #2fe0e4); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* ---------------------------------------------------------- Supernova */
.sn-stage { position: relative; }
.sn-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px; border-radius: 14px; background: linear-gradient(180deg, #05070d, #0e1220); border: 2px solid var(--line-strong); box-shadow: inset 0 0 26px rgba(0,0,0,.9); width: min(100%, 420px); transition: border-color .3s, box-shadow .3s; }
.sn-grid.free { border-color: #b36bff; box-shadow: inset 0 0 26px rgba(0,0,0,.9), 0 0 28px rgba(179,107,255,.45); }
.sn-col { display: grid; gap: 6px; overflow: hidden; }
.sn-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(1.4rem, 6.5vw, 2.2rem); border-radius: 9px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); transition: opacity .25s, transform .25s, box-shadow .25s, border-color .25s; }
.sn-col.spinning .sn-cell { animation: reelBlur .09s linear infinite; }
.sn-cell.dim { opacity: .3; }
.sn-cell.hit { border-color: var(--gold); box-shadow: 0 0 16px rgba(245,166,35,.55), inset 0 0 12px rgba(245,166,35,.25); transform: scale(1.05); animation: snHit .9s ease-in-out infinite alternate; }
.sn-cell.scat { border-color: #b36bff; box-shadow: 0 0 18px rgba(179,107,255,.7); transform: scale(1.08); }
@keyframes snHit { to { box-shadow: 0 0 26px rgba(245,166,35,.85), inset 0 0 16px rgba(245,166,35,.35); } }
.sn-fs { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 14px; margin-bottom: 8px; border-radius: 12px; background: linear-gradient(90deg, rgba(179,107,255,.22), rgba(47,224,228,.18)); border: 1px solid rgba(179,107,255,.6); }
.sn-fs[hidden] { display: none; }
.sn-fs b { font-family: var(--font-display); font-size: 1.15rem; color: #fff; letter-spacing: .04em; }
.sn-fs span { font-size: .78rem; color: var(--text); }
.sn-fs.pop { animation: pbPop .6s cubic-bezier(.2,1.5,.4,1) both; }
.sn-detail { font-size: .76rem; color: var(--text-dim); margin-top: 3px; }
.sn-detail.win { color: #c99bff; font-weight: 700; }
@media (max-width: 520px) {
  .sp-row { gap: 6px; padding: 4px 6px; }
  .sn-sp .sp-3 { min-width: 0; font-size: .68rem; }
  .sn-sp { grid-template-columns: auto 1fr repeat(3, auto); }
  .sn-lines { grid-template-columns: repeat(5, 1fr); }
}
