html, body {
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(to right, #f5b0c2, #7fc7ff);
  overflow-x: hidden;
}

.container {
  max-width: 400px;
  margin: 30px auto 0 auto;
  padding: 24px;
  background: rgba(255,255,255,0.8);
  border-radius: 26px;
  box-shadow: 0 4px 24px #381c4c4a;
  text-align: center;
}

h1 {
  font-size: 2.2em;
  background: linear-gradient(90deg, #FF69B4, #78e6d6 73%, #49aaf9);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
}

.cell {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #fff 65%, #b3ffec 89%);
  border-radius: 16px;
  box-shadow: 0 2px 12px #8dd6ff71;
  font-size: 2.8em;
  color: #381c4c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.28,.84,.42,1), background 0.25s;
  user-select: none;
  outline: none;
  position: relative;
}

.cell:hover:not(.disabled) {
  transform: scale(1.13);
  background: #ffe0f0;
}

.cell.winning {
  animation: highlight-win 1.1s infinite;
}

@keyframes highlight-win {
  0%, 100% {
     box-shadow: 0 0 24px #ff69b4d9, 0 2px 12px #49aaf961;
     background: #fff7b3;
  }
  50% {
    box-shadow: 0 0 32px #44e6c8ee, 0 2px 14px #78e6d671;
    background: #d0fffb;
  }
}

.controls {
  margin-top: 10px;
}

button {
  padding: 10px 22px;
  font-size: 1em;
  background: linear-gradient(90deg, #49aaf9 60%, #ff69b4);
  color: #fff;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 2px 14px #49aaf961;
  transition: background 0.25s;
  outline: none;
}

button:hover {
  background: linear-gradient(90deg, #ff69b4, #49aaf9 60%);
}

.message {
  font-size: 1.8em;
  height: 44px;
  margin: 12px 0 0 0;
  color: #381c4c;
  font-weight: 600;
  letter-spacing: 1px;
  animation: fadeIn .7s;
}

@keyframes fadeIn {
  from { opacity: 0;}
  to { opacity: 1;}
}

@media (max-width: 520px) {
  .container {
    padding: 10px;
    max-width: 98vw;
  }
  .game-board {
    gap: 8px;
  }
  .cell {
    width: 66px;
    height: 66px;
    font-size: 2em;
  }
}

#confetti {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
  z-index: 100;
}
