/**
 * Connect 4 Styles
 */

/* Column selectors */
.c4-columns {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 8px;
  padding: 0 4px;
}

.c4-col-btn {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.c4-col-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.c4-col-btn.disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.c4-drop-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.c4-col-btn:hover:not(.disabled) .c4-drop-preview {
  opacity: 0.7;
}

.c4-drop-preview.red {
  background: radial-gradient(circle at 30% 30%, #ff8a8a, #e53935);
}

.c4-drop-preview.yellow {
  background: radial-gradient(circle at 30% 30%, #fff59d, #fdd835);
}

/* Board grid */
.c4-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 320px;
  padding: 12px;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  border-radius: 12px;
  margin: 0 auto;
  box-shadow: 
    0 4px 20px rgba(21, 101, 192, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.c4-cell {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a1929;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.c4-cell.red {
  background: radial-gradient(circle at 30% 30%, #ff8a8a, #e53935);
  box-shadow: 
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(229, 57, 53, 0.4);
}

.c4-cell.yellow {
  background: radial-gradient(circle at 30% 30%, #fff59d, #fdd835);
  box-shadow: 
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(253, 216, 53, 0.4);
}

.c4-cell.last-drop {
  animation: c4-drop 0.4s ease-out;
}

@keyframes c4-drop {
  0% { transform: translateY(-200%); opacity: 0; }
  60% { transform: translateY(10%); }
  80% { transform: translateY(-5%); }
  100% { transform: translateY(0); opacity: 1; }
}

/* Winner highlight */
.c4-cell.winning {
  animation: c4-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes c4-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
