html,
body {
  background-color: #fafafa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Nav container */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #9f9fa9;
  padding: 0.7rem 6rem;
  color: white;
}

#logo {
  text-decoration: none;
  color: black;
  font-size: 1.5rem;
  font-weight: bold;
  font-style: italic;
  transition: transform 0.2s ease;
}

/* Base nav styles (reuse from before or add this below your nav styles) */
.menu-container button {
  all: unset; /* resets all inherited/default button styles */
  background-color: #99a1af;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
}

.menu-container {
  position: relative;
}

.popover {
  display: none;
  position: absolute;
  top: 120%; /* slightly below the button */
  right: 0;
  background-color: white;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  z-index: 100;
  flex-direction: column;
  padding: 0.5rem 0;
}

.popover a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
}

.popover a:hover {
  background-color: #f2f2f2;
}

/* SHOW POPOVER on hover or focus */
.menu-container:hover .popover,
.menu-container:focus-within .popover {
  display: flex;
}

/* source: https://github.com/athanstan/css-pokeball/ */
.pokeball {
  position: relative;
  width: 150px;
  height: 150px;
  background: #fff;
  border: 5px solid #000;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset -10px 10px 0 10px #ccc;
  animation: shake 1.25s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  animation-play-state: paused;
}
.pokeball::before,
.pokeball::after {
  content: "";
  position: absolute;
}
.pokeball::before {
  background: red;
  width: 100%;
  height: 50%;
}
.pokeball::after {
  top: calc(50% - 5px);
  width: 100%;
  height: 10px;
  background: #000;
}
.pokeball-button {
  position: absolute;
  top: calc(50% - 15px);
  left: calc(50% - 15px);
  width: 30px;
  height: 30px;
  background: #fff;
  border: 4px solid #7f8c8d;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 7px black;
  animation: blink 0.5s alternate infinite;
  animation-play-state: paused;
}

.responsive-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 5.25rem);
}

#signup-form {
  padding: 1rem;
  margin: 2rem auto;
  width: 300px;
}

#signup-form label {
  display: block;
  margin-top: 1rem;
}

form[action="/catch"] input,
#signup-form input[type="text"],
#signup-form input[type="password"] {
  margin: 0.2rem 0;
  padding: 0.2rem;
  width: 100%;
  font-size: 1.1rem;
}

.tradeBtn,
form[action="/catch"] button,
form[action="/catch/latest"] button,
#signup-form button {
  display: block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  width: 100%;
  background-color: black;
  color: white;
  border: none;
  font-weight: bold;
}

.error-message {
  color: red;
  font-size: 0.9rem;
  margin: 0.2rem;
  font-style: italic;
}

form[action="/catch"] {
  width: 300px;
  margin: 4rem auto;
}

.question {
  width: 350px;
  margin: 2rem auto;
}

svg {
  display: block;
  margin: 1rem auto;
  width: 245px;
  height: 245px;
  border: 1px solid black;
}

.sticky-text {
  position: -webkit-sticky; /* For Safari */
  position: sticky;
  top: 0; /* Equivalent to top-9 (usually 9 * 4px = 36px) */
  background-color: #e4e4e7;
  padding: 0.7rem 6rem;
  font-size: 1.25rem; /* Equivalent to text-xl */
}

.flex-container {
  display: flex;
  flex-direction: row; /* Equivalent to flex-row */
  flex-wrap: wrap; /* Equivalent to flex-wrap */
  justify-content: center; /* Equivalent to justify-center */
  align-items: center; /* Equivalent to items-center */
  max-width: 900px; /* Equivalent to max-w-[1400px] */
  margin-left: auto; /* Equivalent to mx-auto */
  margin-right: auto; /* Equivalent to mx-auto */
  margin-bottom: 2rem;
  gap: 0.5rem; /* Equivalent to gap-2 */
  padding: 0.1rem;
}

.flex-container img {
  width: 112px;
}

.players {
  width: 300px;
  margin: 50px auto;
}

.player {
  padding: 10px 20px;
  background-color: #e4e4e7;
  margin-bottom: 20px;
}
.players a {
  text-decoration: none;
  color: black;
}

.trading-player {
  padding: 5px 10px;
  color: black;
  text-decoration: none;
  margin: 45px;
  display: inline-block;
  background-color: #e4e4e7;
}

.pokemon-card {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 3rem;
  margin-bottom: 3rem;
  width: 20rem;
  padding: 1rem;
  border-radius: 3px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.45);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.pokemon-card h3 {
  font-size: 2.25rem;
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: serif;
  font-weight: 600;
}

.pokemon-card img {
  width: 18rem;
  height: 18;
  background-color: #ffffff;
  border: 1.5px solid black;
  border-radius: 2px;
}

.pokemon-card p {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  font-family: serif;
  font-size: 1.125rem;
  line-height: 1.25rem;
}

.type-badge {
  display: inline-block;
  margin-top: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  width: 78px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 3px;
  color: white;
  font-size: 12px;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.normal {
  background: #aaaa99;
}
.fighting {
  background: #bb5544;
}
.flying {
  background: #8899ff;
}
.poison {
  background: #aa5599;
}
.ground {
  background: #ddbb55;
}
.rock {
  background: #bbaa66;
}
.bug {
  background: #aabb22;
}
.ghost {
  background: #6666bb;
}
.steel {
  background: #aaaabb;
}
.flying {
  background:;
}
.fire {
  background: #ff4422;
}
.water {
  background: #3399ff;
}
.grass {
  background: #77cc55;
}
.flying {
  background:;
}
.electric {
  background: #ffcc33;
}
.psychic {
  background: #ff5599;
}
.ice {
  background: #66ccff;
}
.dragon {
  background: #7766ee;
}
.dark {
  background: #775544;
}
.fairy {
  background: #ee99ee;
}

.badge {
  display: inline;
  padding: 0.25em 0.6em;
  font-size: 0.9rem;
  border-radius: 0.25rem;
  color: white;
  margin: 0 auto;
}
.badge-warning {
  background-color: #ffc107;
}
.badge-primary {
  background-color: #007bff;
}
.badge-danger {
  background-color: #dc3545;
}
.badge-success {
  background-color: #28a745;
}
.badge-secondary {
  background-color: #6c757d;
}
.badge-light {
  background-color: #f8f9fa;
  color: #212529;
}

.trade-table {
  width: 500px;
  margin: 20px auto;
  border-collapse: collapse;
}

.trade-table th,
.trade-table td {
  border: 1px solid #ccc;
  padding: 0;
  text-align: center;
}

.trade-table td a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.trade-table img {
  width: 50px;
  height: auto;
}

.trade-table tr:hover {
  background-color: #f0f0f0;
}

@media (max-width: 768px) {
  .sticky-text,
  nav {
    padding: 1rem 1rem;
  }

  .responsive-center {
    height: 70vh;
  }

  .pokemon-card {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .trade-table {
    width: 95%;
  }
}
