body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background-color: #ffe4ec; /* soft pink background */
  color: #000;
  padding-top: 70px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ====== Navbar ====== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.6); /* transparent white background */
  backdrop-filter: blur(10px); /* soft blur behind text */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.nav-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.4rem;
  transition: font-size 0.3s ease;
}

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  transition: width 0.3s ease, height 0.3s ease;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  transition: gap 0.3s ease;
}

.nav-links a {
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(193, 72, 72, 0.05);
  transform: scale(1.05);
}

.nav-links a.active {
  background: #fb6f92;
  color: #fff;
  font-weight: 600;
}

/* ====== Responsive Navbar Shrink ====== */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1.5rem;
  }

  .nav-title {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    padding: 5px 8px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;

    /* Move to bottom on mobile */
    top: auto;
    bottom: 0;

    transition: all 0.4s ease;
  }

  body {
    padding-top: 0; /* remove top padding */
    padding-bottom: 70px; /* prevent content from hiding behind bottom navbar */
  }

  .nav-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 5px 8px;
  }
}

/* ====== Layout & containers ====== */
main {
  max-width: 900px;
  margin: auto;
  padding: 2rem 1rem;
  text-align: center;
}

/* ====== Buttons ====== */
.btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  background: #fb6f92;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(251, 111, 146, 0.3);
}

.btn:hover {
  background: #ff5a82;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 111, 146, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* ====== Forms ====== */
form {
  max-width: 400px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

input {
  padding: 0.6rem;
  border: 2px solid #00b4d8;
  border-radius: 6px;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: #2ec4b6;
}

/* ====== Game design ====== */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.game-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

.game-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-button {
  background: #fb6f92;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background: #f25278;
}

/* ====== Responsive design ====== */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .grid-9x9 {
    width: 90vw;
  }

  .grid-6x6 {
    width: 80vw;
  }

  table,
  th,
  td {
    font-size: 0.9rem;
  }
}
