/* -------- Global -------- */
body {
  margin: 0;
  font-family: 'Poppins', 'Quicksand', 'Segoe UI', sans-serif;
  background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a18cd1, #ffdde1, #c3cfe2, #fda085, #f6d365);
  background-size: 200% 200%;
  animation: gradientBG 25s ease infinite;
  color: #333;
  will-change: background-position;
  line-height: 1.6;
  font-size: clamp(14px, 1.6vw, 18px);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

main {
  flex: 1;
}

html, body {
  height: 100%;
  flex-direction: column;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

/* -------- Entrance Animation -------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

.boardgame-card {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}
  
/* -------- Navbar -------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #475569;
  padding: 1rem 2rem;
  color: white;
}
  
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
  
.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #ffeb3b;
}

/* -------- Hero Section -------- */
.hero {
  background: url('../Images/ThreeFrogsPlace.jpg') center/cover no-repeat;
  position: relative;
  color: white;
  text-align: center;
  padding: 5rem 2rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero h1, .hero p {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.5rem;
}

/* -------- Section Titles -------- */
.section-title, .letter-heading {
  text-align: center;
  font-size: 2.5rem;
  margin: 60px 0 20px;
  color: #374151;
  font-weight: 600;
  position: relative;
}

.section-title::after, .letter-heading::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #4fc3f7;
  margin: 10px auto 0;
  border-radius: 2px;
}

section[id^="letter-"] {
  margin-bottom: 40px;
}
  
/* -------- Boardgame Cards -------- */
.boardgame-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 50px;
}
  
.boardgame-card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.boardgame-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.boardgame-card .details {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.5s ease;
  background: #fff;
}

.boardgame-card:hover .details {
  opacity: 1;
  transform: translateY(0);
}
  
.boardgame-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  padding: 10px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  transition: transform 0.3s ease;
}

.boardgame-card img:hover {
  transform: scale(1.05);
}
  
.boardgame-card .info, .boardgame-card .details {
  padding: 1rem;
}

/* -------- Footer -------- */
footer {
  background-color: #475569;
  padding: 2rem;
  text-align: center;
  color: white;
  font-size: 0.9rem;
}

/* Small Phone (≤600px) */
@media (max-width: 600px) {
  .boardgame-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .letter-heading {
    font-size: 1.6em;
  }

  .boardgame-card img {
    object-fit: cover;
    height: 200px;
  }

  .boardgame-card {
    max-height: 500px;
  }
}

/* Small Phone (≤768px) */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-top: 10px;
  }
}

/* Tablet (601px – 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
  .boardgame-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem;
  }

  .letter-heading {
    font-size: 2em;
  }

  .boardgame-card img {
    height: 220px;
  }
}

/* Small Desktop (1025px – 1400px) */
@media (min-width: 1025px) and (max-width: 1400px) {
  .boardgame-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .boardgame-card img {
    height: 250px;
  }
}

/* Big Desktop (≥1401px) */
@media (min-width: 1401px) {
  .boardgame-container {
    grid-template-columns: repeat(5, 1fr);
  }

  .boardgame-card img {
    height: 300px;
  }
}

.booking-form {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
  
.booking-form h2 {
  text-align: center;
  margin-bottom: 25px;
}
  
.booking-form label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}
  
.booking-form input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
  
.booking-form button {
  margin-top: 20px;
  padding: 12px;
  width: 100%;
  background: #6ec6ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}
  
.booking-form button:hover {
  background: #4dabf5;
}

.booking-card {
  background: #f3f4f6;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
  
#bookingResult {
  margin-top: 30px;
  background: #e0ffe0;
  padding: 20px;
  border-radius: 10px;
}

.register {
  text-align: center;
  margin-top: 30px;
  color: brown;
}

.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

.login-container label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}

.login-container input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.login-container button {
  margin-top: 20px;
  padding: 12px;
  width: 100%;
  background: #6ec6ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

.login-container button:hover {
  background: #4dabf5;
}

.login-container .link {
  text-align: center;
  margin-top: 15px;
}

#signupResult, #loginResult, #forgotResult {
  margin-top: 30px;
  background: #e0f7ff;
  padding: 20px;
  border-radius: 10px;
  color: #333;
}

.about-section .contact-link {
  transition: transform 0.3s ease;
}

.about-section .contact-link:hover,
.about-section .contact-link:focus {
  transform: scale(1.02);
}

.about-section {
  padding: 30px;
  max-width: 900px;
  margin: 40px auto;
  background-color: #fffdf5;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-section h2 {
  color: #2e7d32;
  margin-top: 25px;
}

.about-section ul {
  list-style: square;
  padding-left: 25px;
}

.about-section p, .about-section li {
  transition: transform 0.3s ease;
}

.about-section p:hover, .about-section li:hover {
  transform: scale(1.02);
}

.password-wrapper {
  position: relative;
  width: 93%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.popup.hidden {
  display: none;
}
.popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
}
.popup-buttons button {
  margin: 10px;
  padding: 10px 20px;
  cursor: pointer;
}

.view-more-box {
  text-align: center;
  margin: 30px auto;
  padding: 20px;
  background-color: #f2f2f2;
  border-radius: 10px;
  max-width: 500px;
  display: none;
}

.view-more-box.active {
  display: block;
}

.dashboard-container {
  max-width: 600px;
  margin: 50px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.dashboard-container h2 {
  margin-bottom: 20px;
}

.dashboard-container button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.dashboard-container button:hover {
  background-color: #dc2626;
}

.avatar-selection {
  display: flex;
  gap: 20px;
  padding: 10px 0;
  flex-wrap: nowrap;
  width: max-content;
}

.avatar-selection label {
  cursor: pointer;
}

.avatar-scroll-wrapper {
  overflow-x: auto;
  padding: 10px;
  margin-top: 10px;
}

.avatar-option {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

input[type="radio"]:checked + .avatar-option {
  border-color: #4CAF50;
}

.avatar-profile {
  position: relative;
  display: inline-block;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.edit-avatar {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: white;
  border-radius: 50%;
  padding: 4px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.booking-list {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.booking-list li {
  background-color: #f4f4f4;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.see-more-box {
  text-align: center;
  margin-bottom: 40px;
}

/* -------- Buttons -------- */
button, .see-more-button, .view-more-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #4fc3f7, #81d4fa);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

button:hover, .see-more-button:hover, .view-more-button:hover {
  background: linear-gradient(135deg, #29b6f6, #4dd0e1);
  transform: scale(1.05);
}

.search-filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 20px auto;
  max-width: 700px;
  flex-wrap: wrap;
}

.search-filter-bar input,
.search-filter-bar select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  min-width: 200px;
}

#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

#scrollTopBtn:hover {
  background-color: #1e40af;
}

.cancel-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  width: 280px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.popup-btn {
  margin: 10px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.popup-btn.cancel {
  background-color: #ddd;
}

.popup-btn:not(.cancel) {
  background-color: #ef4444;
  color: white;
}

.contact-icon {
  width: 50px;
  vertical-align: middle;
  display: inline-block;
  text-decoration: none;
}

.contact-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-link span {
  display: inline-block;
}

.tag {
  background-color: #e0e0e0;
  color: #333;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  margin: 2px;
  display: inline-block;
}

.alphabet-nav {
  position: fixed;
  display: flex;
  left: 10px;
  top: 100px;
  background: darkgoldenrod;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  padding: 5px;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1000;
}

.alphabet-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.alphabet-nav li {
  margin: 5px 0;
}

.alphabet-nav a {
  color: greenyellow;
  font-weight: bold;
  text-decoration: none;
}

.alphabet-nav a:hover {
  background-color: #fff;
  color: #000;
  border-radius: 4px;
}

#viewMorePrompt {
  display: none;
  margin-top: 16px;
}

#viewMorePrompt.active {
  display: block !important;
}