* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f3f4f6;
  text-align: center;
}

h1 {
  margin: 20px 0;
  color: #333;
}

.container {
  display: flex;
  justify-content: center;
}

.game {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 10px;
}

.box {
  background: white;
  border: 2px solid #333;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease-in;
}

.box:hover {
  background: #e2e8f0;
}

#Resetbtn,
#new-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

#Resetbtn:hover,
#new-btn:hover {
  background-color: #4338ca;
}

.msg-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.hide {
  display: none;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .game {
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 8px;
  }

  .box {
    font-size: 1.5rem;
  }

  #Resetbtn,
  #new-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  #msg {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .game {
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(3, 90px);
    gap: 10px;
  }

  .box {
    font-size: 1.8rem;
  }
}

@media (min-width: 1024px) {
  .game {
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 12px;
  }

  .box {
    font-size: 2.5rem;
  }

  #Resetbtn,
  #new-btn {
    font-size: 1.1rem;
    padding: 12px 24px;
  }
}

footer {
  margin-top: 30px;
}

.coder-name {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: #4f46e5;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  animation: glow 2s infinite alternate;
}

.coder-name span {
  font-weight: bold;
  color: #f59e0b;
  font-size: 1.3rem;
}

@keyframes glow {
  from {
    text-shadow: 1px 1px 2px rgba(79,70,229,0.5), 0 0 5px rgba(245,158,11,0.2);
  }
  to {
    text-shadow: 2px 2px 5px rgba(79,70,229,0.8), 0 0 10px rgba(245,158,11,0.5);
  }
}
