body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #0f0f10;
    color: #fff;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1b1b1d;
    padding: 15px 50px;
    border-radius: 0 0 15px 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00aaff;
  text-transform: none;
  letter-spacing: 0.5px;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  filter: drop-shadow(0 0 6px rgba(0, 170, 255, 0.4));
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #ccc;
    font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
    color: #00aaff;
}

.discord-btn {
    background: #5865F2;
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
}

.hero {
    text-align: center;
    margin: 40px auto;
}

.hero img {
    width: 80%;
    border-radius: 15px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-top: 20px;
}

.hero-buttons {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin: 5px;
}

.btn.blue {
    background: #00aaff;
    color: white;
}

.btn.dark {
    background: #2a2a2d;
    color: #fff;
}

.recent-items, .items-section {
    text-align: center;
    margin: 40px auto;
    max-width: 1200px;
}

.item-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.item-card {
    background: #1c1c1e;
    padding: 15px;
    border-radius: 10px;
    width: 180px;
    transition: 0.3s;
}

.item-card:hover {
    transform: translateY(-5px);
    background: #242426;
}

.item-card img {
    width: 100%;
    border-radius: 8px;
}

.calc-section {
    text-align: center;
    margin-top: 50px;
}

.calculator input {
    margin: 10px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
}

.updated {
  font-size: 0.8rem;
  color: #aaa;
}

.info {
  text-align: center;
  margin: 50px auto;
  padding: 30px;
  background: #1b1b1d;
  border-radius: 12px;
  max-width: 800px;
}

.info p {
  color: #ccc;
  margin-bottom: 10px;
}

/* ----- Search Bar & Filters (Improved) ----- */
.filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: 30px auto 40px auto;
  padding: 20px;
  background: #161618;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 170, 255, 0.15);
  max-width: 800px;
}

.filters input[type="text"] {
  width: 80%;
  max-width: 500px;
  background: #1c1c1e;
  border: 1px solid #00aaff;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  transition: 0.3s;
}

.filters input[type="text"]:focus {
  border-color: #00ccff;
  box-shadow: 0 0 8px rgba(0, 204, 255, 0.4);
  outline: none;
}

.filters .range {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.filters label {
  color: #bbb;
  font-size: 0.95rem;
}

.filters input[type="number"] {
  width: 100px;
  background: #1c1c1e;
  border: 1px solid #00aaff;
  color: white;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  transition: 0.3s;
}

.filters input[type="number"]:focus {
  border-color: #00ccff;
  box-shadow: 0 0 6px rgba(0, 204, 255, 0.4);
  outline: none;
}

.filters button {
  padding: 8px 16px;
  background: #00aaff;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  font-weight: 500;
}

.filters button:hover {
  background: #0088cc;
  transform: translateY(-1px);
}

.filters button#clearBtn {
  background: #2a2a2d;
}

.filters button#clearBtn:hover {
  background: #3a3a3d;
}

/* Optional: smooth input animations */
input,
button {
  transition: all 0.25s ease-in-out;
}

/* ============================= */
/* 📱 RESPONSIVE (Mobile-Friendly) */
/* ============================= */

/* For tablets and small laptops */
@media (max-width: 1024px) {
  .navbar {
    flex-direction: column;
    padding: 15px 20px;
    gap: 10px;
  }

  .nav-links {
    gap: 15px;
  }

  .hero img {
    width: 90%;
  }

  .item-grid {
    gap: 15px;
  }

  .item-card {
    width: 160px;
  }
}

/* For mobile phones */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
  }

  .nav-links {
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
  }

  .discord-btn {
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }

  .hero {
    margin: 30px auto;
    padding: 0 15px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .filters {
    width: 90%;
    padding: 15px;
  }

  .filters input[type="text"] {
    width: 100%;
  }

  .filters .range {
    flex-direction: column;
    gap: 10px;
  }

  .filters input[type="number"] {
    width: 100%;
  }

  .filters button {
    width: 100%;
  }

  .item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    justify-items: center;
    padding: 0 10px;
  }

  .item-card {
    width: 100%;
    max-width: 180px;
  }

  .info {
    width: 90%;
    padding: 20px;
  }
}

/* For very small phones */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .item-card {
    width: 100%;
    max-width: 160px;
  }

  .filters {
    padding: 12px;
  }
}

/* =========================== */
/* 🧱 GRID BACKGROUND + POPUP  */
/* =========================== */

/* Beautiful subtle grid background */
body {
  background-color: #0f0f10;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Popup (Modal) */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.popup-content {
  background: #1b1b1d;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
  animation: fadeIn 0.3s ease;
}

.popup-content img {
  width: 200px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.popup-content h2 {
  margin: 10px 0 5px;
  color: #00aaff;
}

.popup-content p {
  margin: 5px 0;
  color: #ccc;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: #00aaff;
}

/* Smooth fade-in for popup */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ========================== */
/* 📊 PET POPUP STATS STYLING */
/* ========================== */

.popup-stats {
  margin-top: 15px;
  background: #141416;
  padding: 10px 15px;
  border-radius: 10px;
  text-align: left;
}

.popup-stats p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #ccc;
}

.popup-stats b {
  color: #00aaff;
}

/* Demand colors */
.demand {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.demand.low {
  color: #aaa;
  background: rgba(255,255,255,0.08);
}

.demand.medium {
  color: #ffe47a;
  background: rgba(255, 228, 122, 0.1);
}

.demand.high {
  color: #00ff9d;
  background: rgba(0,255,157,0.1);
}

.demand.extreme {
  color: #ff4d4d;
  background: rgba(255,77,77,0.1);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: 0.3s;
  user-select: none;
}

.close-btn:hover {
  color: #00aaff;
  transform: scale(1.15);
}

.game-switcher select {
  background: #1b1b1d;
  color: #fff;
  border: 1px solid #2a2a2d;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 500;
}
.navbar { gap: 16px; } /* give a little room */
@media (max-width: 768px) {
  .game-switcher { width: 100%; }
  .game-switcher select { width: 100%; }
}
