/* game.css - the four-in-a-row board and speech bubble (MS Paint edition), shared by game.html and train.html.
   The board is a sheet of paper with pencil grid lines. Pieces are crooked, hatch-filled circles. */
.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: 6px 10px; }
.controls label { margin: 0; font-size: 16px; }
.controls select { display: block; font-size: 16px; max-width: 100%; }
.duel { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; flex-wrap: nowrap; }
.avatar { flex: 0 0 auto; width: 64px; height: 64px; shape-rendering: crispEdges; transform: rotate(-4deg); }
.bubble { position: relative; background: var(--white); border: 3px solid var(--black); border-width: 2px 4px 3px 3px; padding: 6px 10px; font-family: var(--comic);
  font-size: 18px; text-align: left; min-height: 3em; max-width: 380px; flex: 1 1 auto; transform: rotate(0.6deg); }
.bubble::before { content: ""; position: absolute; left: -16px; top: 18px; border-style: solid; border-color: transparent; border-right-color: var(--black); border-width: 8px 16px 8px 0; }
.bubble small { display: block; color: var(--red); font-family: var(--pixel); font-size: 8px; margin-bottom: 4px; }
.status { font-family: var(--impact); font-size: 22px; color: var(--yellow); background: var(--black); border: 3px solid var(--black);
  padding: 4px 8px; margin: 8px auto; max-width: 476px; transform: rotate(-0.5deg); }
.status.win { color: var(--green); }
.status.lose { color: var(--red); }
.boardwrap { width: 100%; max-width: 476px; margin: 0 auto; }
.drops { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; padding: 0 6px; }
.drops button { margin: 2px; padding: 0; height: 34px; font-size: 15px; font-family: var(--impact); font-weight: normal; background: var(--green); box-shadow: 2px 2px 0 var(--black); transform: none; border-width: 2px 3px 3px 2px; }
.drops button:nth-child(odd) { transform: rotate(-2deg); }
.drops button:nth-child(even) { transform: rotate(2deg); }
.drops button:disabled { background: var(--gray); box-shadow: none; }
.board { display: grid; grid-template-columns: repeat(7, 1fr); background-color: var(--white); border: 3px solid var(--black); border-width: 3px 5px 4px 3px;
  padding: 2px; cursor: pointer;
  background-image: linear-gradient(var(--black) 2px, transparent 2px), linear-gradient(90deg, var(--black) 2px, transparent 2px);
  background-size: calc(100% / 7) calc(100% / 6); }
.cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 7%; }
.hole { width: 100%; height: 100%; background: var(--white); border: 2px dashed var(--gray-lo); display: flex; align-items: center; justify-content: center;
  font-family: var(--impact); font-size: clamp(16px, 5vw, 26px); border-radius: 52% 48% 55% 45% / 47% 53% 47% 53%; }
.cell:nth-child(3n) .hole { border-radius: 46% 54% 49% 51% / 55% 45% 55% 45%; transform: rotate(7deg); }
.cell:nth-child(4n+1) .hole { border-radius: 55% 45% 47% 53% / 49% 51% 49% 51%; transform: rotate(-9deg); }
.cell:nth-child(5n+2) .hole { border-radius: 49% 51% 56% 44% / 46% 54% 46% 54%; transform: rotate(14deg); }
.hole.p1 { background: repeating-linear-gradient(135deg, var(--magenta) 0 4px, var(--white) 4px 6px); border: 3px solid var(--black); color: var(--black); }
.hole.p2 { background: repeating-linear-gradient(45deg, var(--green) 0 4px, var(--white) 4px 6px); border: 3px solid var(--black); color: var(--black); }
.hole.drop { animation: drop 0.35s steps(7, end); }
@keyframes drop { from { transform: translateY(-420%); } to { transform: translateY(0); } }
.hole.winning { outline: 4px solid var(--red); animation: winflash 0.4s steps(1, end) infinite; }
@keyframes winflash { 50% { outline-color: var(--blue); background-color: var(--yellow); } }
.legend { font-family: var(--comic); font-weight: bold; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; vertical-align: middle; border: 3px solid var(--black);
  font-family: var(--impact); font-size: 15px; font-weight: normal; border-radius: 52% 48% 55% 45% / 47% 53% 47% 53%; color: var(--black); }
.chip.p1 { background: repeating-linear-gradient(135deg, var(--magenta) 0 4px, var(--white) 4px 6px); }
.chip.p2 { background: repeating-linear-gradient(45deg, var(--green) 0 4px, var(--white) 4px 6px); }
.scores { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.scores div { background: var(--black); color: var(--green); font-family: var(--pixel); font-size: 10px; border: 3px solid var(--black); padding: 8px 10px 6px; }
.thinking::after { content: "..."; animation: blink 0.6s steps(1, end) infinite; }
