@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: radial-gradient(circle at top, #0a0f1f, #000);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  margin: 3rem 0 1rem;
}

.logo {
  font-size: 2.5rem;
  color: #4db5ff;
  letter-spacing: 1px;
  animation: fadeInDown 1s ease-in-out;
}

.tagline {
  color: #ccc;
  font-weight: 300;
  margin-top: 0.3rem;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
  width: 90%;
  max-width: 1200px;
}

.card {
  background: rgba(30, 40, 60, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-content {
  padding: 1.2rem;
}

.card-content h3 {
  color: #4db5ff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.4;
  height: 60px;
  overflow: hidden;
}

.card-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
}

button {
  flex: 1;
  background: #4db5ff;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

button:hover {
  background: #66ccff;
  transform: scale(1.05);
}



@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 20, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background: #111a2f;
  padding: 2rem;
  border-radius: 20px;
  max-width: 500px;
  text-align: center;
  color: #fff;
}

.modal-content h2 {
  color: #4db5ff;
  margin-bottom: 1rem;
}

.modal-content p {
  color: #bbb;
  font-size: 1rem;
}

.close-btn {
  margin-top: 1.5rem;
  background: #ff4d4d;
}

.game-details {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  width: 100%;
}

.details-card {
  background: rgba(25, 35, 55, 0.9);
  border-radius: 20px;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.details-card img {
  width: 350px;
  height: 220px;
  object-fit: cover;
  border-radius: 15px;
  flex-shrink: 0;
}

.info {
  flex: 1;
  min-width: 0;
}

.info h2 {
  color: #4db5ff;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.info p {
  color: #bbb;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.desc {
  margin-top: 1rem;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .game-details {
    padding: 1.5rem 1rem;
  }

  .details-card {
    flex-direction: column;
    padding: 1.2rem;
    gap: 1.2rem;
  }

  .details-card img {
    width: 100%;
    height: 200px;
    flex-shrink: unset;
  }

  .info h2 {
    font-size: 1.3rem;
  }

  .info p {
    font-size: 0.9rem;
  }

  .desc {
    font-size: 0.9rem;
  }

  .back-btn-container {
    margin-bottom: 1.5rem;
  }
}

.back-btn-container {
  text-align: center;
  margin-bottom: 2rem;
}

.back-btn {
  text-decoration: none;
  background: #4db5ff;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  transition: 0.3s ease;
  font-weight: 600;
}

.back-btn:hover {
  background: #66ccff;
}

.play-btn  {
  display: inline-block;
  text-decoration: none;
  background: #4db5ff;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-weight: 600;
  transition: 0.3s ease;
}

.read-btn {
  display: inline-block;
  text-decoration: none;
  background: #4db5ff;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-weight: 600;
  transition: 0.3s ease;
}

.play-btn:hover {
  background: #66ccff;
}

/* ====================== FOOTER ====================== */
footer {
  width: 100%;
  background: linear-gradient(to right, #081027, #0b1224, #081027);
  color: #ccc;
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  animation: fadeInUp 1s ease-in-out;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-title {
  font-size: 1.4rem;
  color: #4db5ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.footer-tagline {
  color: #aaa;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.footer-credits {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.8rem;
}

.footer-links {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #4db5ff;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: 0.3s;
  font-weight: 500;
}

.footer-links a:hover {
  text-shadow: 0 0 8px #4db5ff;
}

.footer-copy {
  margin-top: 0.5rem;
  color: #999;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========= TOGGLE BUTTON ================== */
.toggle-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pill-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(30, 40, 60, 0.8);
  border: 2px solid #4db5ff;
  border-radius: 30px;
  padding: 4px;
  cursor: pointer;
  user-select: none;
}

.pill-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #4db5ff;
  border-radius: 25px;
  transition: transform 0.3s ease;
  z-index: 0;
}

.pill-toggle.fun-active .pill-slider {
  transform: translateX(100%);
}

.pill-label {
  position: relative;
  z-index: 1;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  color: #4db5ff;
  transition: color 0.3s ease;
  text-align: center;
}

.pill-toggle:not(.fun-active) #gamesTab,
.pill-toggle.fun-active #funTab {
  color: white;
}