@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  font-family: 'Press Start 2P', monospace;
  background: linear-gradient(135deg, #ff9ec4, #a18cd1);
  color: #fff;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

header {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  text-align: center;
  border-bottom: 4px solid #ff66b2;
}

.logo {
  font-size: 2em;
  color: #fff;
  text-shadow: 2px 2px #ff66b2;
  margin-bottom: 10px;
}

.user-info {
  margin-top: 10px;
}

main {
  padding: 30px 20px;
  text-align: center;
}

.market-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 30px;
}

.market-item {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid #ff66b2;
  padding: 20px;
  border-radius: 10px;
  width: 240px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s;
}

.market-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 2px solid #fff;
}

.market-item h3 {
  font-size: 0.6em;
  margin-bottom: 10px;
}

.item-price {
  font-size: 0.5em;
  margin-bottom: 10px;
}

.buy-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5em;
  background-color: #ff66b2;
  border: none;
  padding: 8px 12px;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.2s ease;
}

.buy-btn:hover {
  background-color: #ff3385;
}

@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

.shake {
  animation: shake 0.4s ease;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popup-content {
  background: #ffccf9;
  color: #000;
  padding: 25px;
  border-radius: 10px;
  width: 80%;
  max-width: 300px;
  text-align: center;
  font-size: 0.6em;
  border: 3px solid #ff66b2;
  box-shadow: 0 0 12px #ff66b2;
}

.popup-content p {
  margin-bottom: 15px;
}

.popup-content button {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5em;
  padding: 6px 10px;
  background-color: #ff66b2;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #ff3385;
}

.hidden {
  display: none;
}
.popup {
  display: none;
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #333;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 999;
  max-width: 300px;
  text-align: center;
  font-family: sans-serif;
}

.popup.show {
  display: block;
}

.popup button {
  margin-top: 10px;
  padding: 6px 12px;
  border: none;
  background: #333;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
}

.popup button:hover {
  background: #555;
}
/* Hides the popup unless triggered */
.popup {
  display: none; /* ✅ Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  border: 2px solid #000;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Shown only when JavaScript adds this */
.popup.active {
  display: block;
}

/* Optional styling */
button {
  cursor: pointer;
  padding: 8px 16px;
  margin-top: 10px;
}


