/* Connect Four — scoped under .cf-wrap */
.cf-wrap{
  max-width: min(100%, 520px);
  margin: 0 auto;
}
.cf-head{
  text-align: center;
  margin-bottom: 16px;
}
.cf-turn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 24, 49, 0.75);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cf-turn__dot{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.cf-turn__dot--p1{
  background: radial-gradient(circle at 32% 28%, #ff8a8a, #c41e3a 45%, #7a0a1a);
}
.cf-turn__dot--p2{
  background: radial-gradient(circle at 32% 28%, #fff3a0, #e6b800 42%, #8a6500);
}
.cf-actions{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Board shell: pierced panel */
.cf-board-outer{
  padding: 14px 12px 18px;
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(45, 95, 200, 0.95) 0%, rgba(18, 52, 130, 0.98) 45%, rgba(10, 28, 72, 1) 100%);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.cf-board-inner{
  padding: 8px 6px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.5);
}

.cf-columns{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(4px, 1.2vw, 8px);
  width: 100%;
}

.cf-col{
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1.2vw, 8px);
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.cf-col:hover:not(:disabled),
.cf-col:focus-visible:not(:disabled){
  outline: none;
  transform: scale(1.02);
}
.cf-col:focus-visible:not(:disabled){
  box-shadow: 0 0 0 3px rgba(106, 167, 255, 0.55);
}
.cf-col:disabled{
  cursor: not-allowed;
  opacity: 0.85;
}

/* Cell = hole */
.cf-cell{
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, rgba(8, 14, 32, 0.95), rgba(4, 8, 20, 1));
  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Disc inside cell */
.cf-disc{
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-220%);
  pointer-events: none;
}
.cf-disc.is-visible{
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.12s ease;
}
.cf-disc--p1{
  background: radial-gradient(circle at 32% 28%, #ff9a9a, #d62839 38%, #6b0f18);
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.4);
}
.cf-disc--p2{
  background: radial-gradient(circle at 32% 28%, #fff6b0, #f0c419 38%, #9a6a00);
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.35);
}

/* Modal */
.cf-modal[hidden]{
  display: none !important;
}
.cf-modal{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(8px);
}
.cf-modal__box{
  width: min(100%, 380px);
  padding: 24px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 32, 58, 0.98), rgba(12, 18, 36, 0.99));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}
.cf-modal__title{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
}
.cf-modal__msg{
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.cf-modal__btns{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cf-hint{
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
