* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  /* slightly more muted, modern gradient */
  background: linear-gradient(160deg, #6a7ff2 0%, #5ac1c9 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  /* toned down, elegant gradient */
  background: linear-gradient(90deg, #384aeb 0%, #2bb5b5 100%);
  padding: 1rem 2rem;
  box-shadow: 0 3px 18px rgba(20, 20, 30, 0.25);
}

.navbar h1 {
  color: #ffffff;
  font-size: 2rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.35);
  text-align: center;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.game-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.game-wrapper {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 12px 40px rgba(10, 14, 30, 0.32);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* subtle lift on hover - non-disruptive */
.game-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(10, 14, 30, 0.38);
}

#gameCanvas {
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
  background: linear-gradient(#8fd1ff, #6fb8e8);
  display: block;
}

/* make info text crisper and slightly brighter */
.game-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.97);
  font-size: 1.12rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.controls {
  text-align: center;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.footer {
  background: linear-gradient(90deg, #2bb5b5, #384aeb);
  padding: 1rem;
  text-align: center;
  color: white;
  font-weight: 700;
  box-shadow: 0 -3px 18px rgba(20, 20, 30, 0.22);
}

/* center modals but make them a bit softer */
.game-over,
.game-win {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 15, 20, 0.92);
  color: #ffffff;
  padding: 1.6rem 2rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.25rem;
  display: none;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.game-win {
  background: linear-gradient(
    180deg,
    rgba(34, 139, 34, 0.95),
    rgba(24, 120, 24, 0.95)
  );
}

/* fresher button styling with subtle depth */
button {
  background: linear-gradient(135deg, #ff758c 0%, #4ecdc4 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.35rem;
  border-radius: 22px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.12s;
  box-shadow: 0 6px 18px rgba(78, 205, 196, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.08);
}

/* smoother hover and active states */
button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(78, 205, 196, 0.22);
}

button:active {
  transform: translateY(-1px) scale(0.997);
  opacity: 0.98;
}

button:focus {
  outline: 3px solid rgba(78, 205, 196, 0.18);
  outline-offset: 3px;
}
