.ultimate-board {
  position: relative;
  overflow: hidden;
}

.global-win-line {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  transform-origin: left center;
  z-index: 30;
  opacity: 0;
  animation: lineReveal 0.55s ease forwards;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.global-win-line.x {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.95), rgba(34, 211, 238, 0.95));
}

.global-win-line.o {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.95), rgba(236, 72, 153, 0.95));
}

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.game-result-overlay {
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  z-index: 40;
  backdrop-filter: blur(8px);
  animation: overlayPop 0.35s ease;
  pointer-events: none;
}

.game-result-overlay.win {
  background: rgba(13, 40, 24, 0.78);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.game-result-overlay.loss {
  background: rgba(56, 14, 14, 0.78);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.game-result-overlay.draw {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.game-result-inner {
  display: grid;
  gap: 8px;
}

.game-result-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.game-result-subtitle {
  color: #dbe4f1;
  font-size: 1rem;
}

@keyframes overlayPop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}