/* Connect 4 board. Panels/buttons/top bar come from ../shared/arcade.css. */

#table {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.turn {
  text-align: center;
  font-size: 1.05rem;
  min-height: 1.5em;
  color: #cbbfe0;
}
.turn b { color: #ffd076; }
.turn.mine b { color: #ff9d8a; }

.board-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }

.board {
  position: relative;
  width: min(92vw, 460px);
  background: linear-gradient(160deg, #3a2c52, #2a2040);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cell {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #140f1d;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.disc {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
}

.disc.p1 { background: radial-gradient(circle at 34% 28%, #ff9b85, #d33f27 70%); }
.disc.p2 { background: radial-gradient(circle at 34% 28%, #ffe79c, #dfa315 70%); }

.disc.drop { animation: drop-in 0.32s cubic-bezier(0.45, 0, 0.7, 1); }
@keyframes drop-in { from { transform: translateY(-620%); } }

.disc.win { animation: win-pulse 0.9s ease-in-out infinite alternate; }
@keyframes win-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15); }
  to   { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.55); }
}

/* transparent click targets over the columns, with a hover preview */
.cols {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.col {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
}
.col:disabled { cursor: default; }
.col:not(:disabled):hover { background: rgba(255, 255, 255, 0.05); }

.col::after {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}
.board.seat-1 .col:not(:disabled):hover::after { opacity: 0.5; background: radial-gradient(circle at 34% 28%, #ff9b85, #d33f27 70%); }
.board.seat-2 .col:not(:disabled):hover::after { opacity: 0.5; background: radial-gradient(circle at 34% 28%, #ffe79c, #dfa315 70%); }

.foot { display: flex; justify-content: center; min-height: 44px; }

.seat-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: baseline;
}
.seat-dot.p1 { background: #d33f27; }
.seat-dot.p2 { background: #dfa315; }
