@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=DM+Sans:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  /* 🌤️ Updated background: light sky blue gradient */
  --gradient-sky: linear-gradient(180deg, hsl(195, 100%, 93%) 0%, hsl(0, 0%, 100%) 100%);
  background: var(--gradient-sky);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

/* 🌊 Background wave */
#splineBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

/* 🎮 Game canvas */
#gameCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  z-index: 2;
  background: transparent;
}

/* 🤍 Join Whitelist Button + Connect Wallet (blue → purple animated gradient) */
#joinWhitelistBtn,
#connectWalletBtn {
  position: fixed;
  z-index: 100000;
  width: 180px;
  padding: 14px 0;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(270deg, #00eaff, #8a2be2, #00eaff);
  background-size: 400% 400%;
  animation: gradientMove 12s ease infinite;
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
  cursor: pointer;
  transition: transform 0.3s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* Positioning */
#joinWhitelistBtn {
  top: 1rem;
  right: 1rem;
}

#connectWalletBtn {
  top: calc(1rem + 60px + 5px);
  right: 1rem;
}

/* 🪙 Phantom wallet logo inside Connect Wallet button */
#connectWalletBtn::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background-image: url("phantom-removebg-preview.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Hover effect */
#joinWhitelistBtn:hover,
#connectWalletBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.7);
}

/* 🌈 Animated gradient keyframes */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 🔔 Notification toast */
#notification {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  padding: 12px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 196, 255, 0.95), rgba(0, 118, 255, 0.95));
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 100001;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
  visibility: hidden;
}

#notification.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

#notification.hidden {
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
}

/* 🪩 Branding panel */
.spline-logo-cover {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 100px;
  background: #ffffff;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 16px 0 0 0;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.05);
}

.branding-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(34, 34, 34, 0.75);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  pointer-events: auto;
}

.branding-item:hover {
  color: rgba(34, 34, 34, 1);
}

.branding-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branding-icon svg {
  width: 100%;
  height: 100%;
}

.x-icon {
  fill: #222222;
}

.globe-icon {
  stroke: #222222;
  fill: none;
}

/* 💬 Telegram icon */
.telegram-icon {
  fill: #222222;
  width: 14px;
  height: 14px;
}

/* 🧊 Footer tagline */
.footer-tagline {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 20px 32px 24px;
  z-index: 1001;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: auto;
}

.footer-tagline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: rgba(21, 235, 255, 0.3);
}

.footer-tagline p {
  font-size: 16px;
  font-weight: 500;
  color: rgba(34, 34, 34, 0.75);
  line-height: 1.6;
  margin: 0;
  padding-top: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* 💬 Learn More button */
#learnMoreBtn {
  background: none;
  border: none;
  color: #15ebff;
  font-weight: 600;
  font-size: 16px;
  margin-left: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#learnMoreBtn:hover {
  color: #00bfff;
  text-decoration: underline;
}

/* 💬 Modal styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200000;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  color: #222;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  color: #15ebff;
  margin-bottom: 1rem;
}

.modal-content button {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #00eaff, #00c4ff);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-content button:hover {
  background: linear-gradient(135deg, #00c4ff, #00eaff);
  transform: scale(1.05);
}

/* 🌐 Modal icon buttons */
.modal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff; /* white background */
  color: #000000; /* black icons */
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-icon svg {
  fill: #000000;
  stroke: #000000;
}

.modal-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  background: #f5f5f5; /* slight hover tint */
}


/* 🧊 Top-left logo header */
.logo-header {
  position: fixed;
  top: 1.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100000;
  text-decoration: none;
}

.logo-img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.logo-text {
  font-size: 27px;
  font-weight: 700;
  color: #222222;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}

/* 📱 High-quality mobile layout — fixed cube/pickaxe blurriness */
@media (max-width: 768px) {
  body {
    transform: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  /* 🔹 Logo */
  .logo-header {
    top: 26px;
    left: 14px;
  }

  .logo-img {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 18px;
    line-height: 1;
  }

  /* 🔹 Connect Wallet button */
  #connectWalletBtn {
    top: 14px;
    right: 14px;
    width: 160px; /* fits both words */
    font-size: 14px;
    padding: 10px 0;
    border-radius: 10px;
  }

  /* 🔹 Hide extras */
  #joinWhitelistBtn,
  .spline-logo-cover,
  .branding-item,
  .footer-links {
    display: none !important;
  }

  /* 🔹 Game canvas — crisp & properly sized */
  #gameCanvas {
    position: absolute;
    top: 130px; /* moves cube/pickaxe lower */
    left: 50%;
    transform: translateX(-50%);
    width: 85vw;          /* smaller width instead of scaling */
    height: 60vh;
    max-width: 400px;
    display: block;
    z-index: 2;
    background: transparent;
  }

  /* 🔹 Counter + progress */
  #progressContainer,
  #globalCounter {
    position: relative;
    top: 100px;
    transform: scale(0.95); /* slight size tweak, not blur */
  }

  #globalCounterValue {
    font-size: 24px !important;
    letter-spacing: 1px;
  }

  /* 🔹 Footer (community challenge) */
  .footer-tagline {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
    padding: 8px 16px 14px;
    text-align: center;
    z-index: 1001;
  }

  .footer-tagline p {
    font-size: 12px;
    line-height: 1.4;
    max-width: 340px;
    margin: 0 auto;
  }

  #learnMoreBtn {
    font-size: 12px;
  }

  /* 🔹 Learn More Modal */
  .modal {
    align-items: center;
    justify-content: center;
    padding: 0 10px;
  }

  .modal-content {
    padding: 1.2rem;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
  }

  .modal-content h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .modal-content p {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .modal-content button {
    font-size: 0.85rem;
    padding: 8px 14px;
    margin-top: 1rem;
  }

  /* 🔹 Modal icon links */
  .modal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
  }

  .modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  /* 🔹 White bottom overlay to hide Spline tag */
  .mobile-bottom-cover {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* adjust if needed */
    background: white;
    z-index: 3; /* below footer tagline text */
  }
}
