/* quad: styles for this game only (loaded after /css/core.css). */
:root {
  --disc-red: radial-gradient(circle at 34% 30%, #FF9EA0 0, #E5484D 42%, #B3252A 100%);
  --disc-yellow: radial-gradient(circle at 34% 30%, #FFF2BF 0, #F5C542 45%, #C7901A 100%);
  --board-edge: #1C3F9C;
}
.disc-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.p1-bg { background: var(--disc-red); }
.p2-bg { background: var(--disc-yellow); }
.board-wrap { width: 100%; max-width: 620px; perspective: 1200px; padding-bottom: 30px; }
.board-wrap.mini { max-width: 440px; }
.board-wrap { --gap: clamp(5px, 1.8vw, 12px); --pad: clamp(8px, 2.6vw, 18px); }
.stage {
  position: relative;
  transform: rotateX(var(--rx, 10deg)) rotateY(var(--ry, 0deg));
  transform-origin: 50% 100%;
  transition: transform .35s ease-out;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stage.shake { animation: shake .45s ease-in-out; }
.col-bar { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--pad) 12px; }
.col-btn { aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.col-btn:disabled { cursor: default; }
.col-btn.hint { box-shadow: inset 0 0 0 3px var(--select); animation: pulse .8s ease-in-out 4; }
.ghost {
  --x: calc(var(--c, 3) * (100% + var(--gap)));
  position: absolute; top: 0; left: var(--pad);
  width: calc((100% - 2 * var(--pad) - 6 * var(--gap)) / 7); aspect-ratio: 1;
  border-radius: 50%; pointer-events: none; opacity: 0;
  transform: translateX(var(--x)) translateY(-10px) scale(.85);
  transition: transform .14s ease-out, opacity .15s ease-out;
  box-shadow: 0 12px 16px rgba(20, 33, 58, .28);
}
.ghost.show { opacity: 1; transform: translateX(var(--x)) translateY(0) scale(1); }
.ghost.p1 { background: var(--disc-red); }
.ghost.p2 { background: var(--disc-yellow); }
.board {
  position: relative;
  background: linear-gradient(180deg, #3D6BE0 0, var(--board) 38%, #2450C2 100%);
  border-radius: 22px; padding: var(--pad);
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--gap);
  overflow: hidden;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), 0 12px 0 var(--board-edge), 0 28px 36px rgba(20, 33, 58, .28);
}
.cell {
  aspect-ratio: 1; border-radius: 50%; background: var(--hole); position: relative;
  box-shadow: inset 0 5px 7px rgba(0, 0, 0, .32), 0 1px 0 rgba(255, 255, 255, .25);
}
.stage.playable .cell { cursor: pointer; }
.cell.target::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; opacity: .38; }
.cell.target.t1::before { background: var(--disc-red); }
.cell.target.t2::before { background: var(--disc-yellow); }
.disc { position: absolute; inset: 0; border-radius: 50%; }
.disc.p1, .disc.p2 { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .12), inset 0 -4px 6px rgba(0, 0, 0, .22), 0 2px 3px rgba(0, 0, 0, .25); }
.disc.p1 { background: var(--disc-red); }
.disc.p2 { background: var(--disc-yellow); }
.disc.p1::after, .disc.p2::after {
  content: ''; position: absolute; inset: 22%; border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2), 0 1px 0 rgba(255, 255, 255, .35);
}
.disc.drop { animation: drop var(--dur, .5s) linear both; z-index: 2; }
.cell.win .disc { z-index: 3; animation: winpulse 1s ease-in-out infinite; box-shadow: 0 0 0 4px #FFFFFF, 0 0 22px 8px rgba(255, 255, 255, .7); }
@media (prefers-reduced-motion: reduce) {
  .stage { transition: none; }
  .disc.drop, .cell.win .disc, .col-btn.hint, .stage.shake { animation: none; }
  .ghost { transition: none; }
}
/* Frosted Aurora: a tinted-glass board with frosted holes. */
.board { background: linear-gradient(180deg, rgba(64, 110, 228, .78), rgba(36, 80, 194, .9)); border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); }
.cell { background: rgba(255, 255, 255, .78); box-shadow: inset 0 3px 6px rgba(20, 40, 100, .35); }
:root[data-theme="dark"] .cell { background: rgba(10, 18, 38, .72); }
