* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  text-align: center;
  overflow-x: hidden;
}

/* Title */
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

/* Turn indicator styling */
#turn-indicator {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
  color: #fffbcc;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Game grid */
.game {
  height: 60vmin;
  width: 60vmin;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2vmin;
}

/* Boxes */
.box {
  height: 18vmin;
  width: 18vmin;
  border-radius: 1rem;
  border: none;
  font-size: 8vmin;
  color: #1f2937;
  background-color: #ffffc7;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.box:hover:not(:disabled) {
  background-color: #fdfdb0;
  transform: scale(1.05);
}

.box:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Buttons */
.reset-button,
.new-button {
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  background-color: #191913;
  color: white;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.reset-button:hover,
.new-button:hover {
  background-color: #2f2f2f;
  transform: translateY(-2px);
}

/* Message */
#msg {
  color: #ffffc7;
  font-size: 5vmin;
  margin-bottom: 1rem;
}

.msg-container {
  height: auto;
  padding: 1rem 2rem;
  margin-top: 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Particles Background Container */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  top: 0;
  left: 0;
}

/* Hide class */
.hide {
  display: none;
}

/* Winning box highlight */
.win {
  background-color: #a5f3fc !important;
  color: #0f172a !important;
  font-weight: bold;
  animation: pulse 0.6s ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}
