body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #0a0a0a;
  color: #e5e5e5;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  transition: color 0.3s ease;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

.fade-in img {
  width: 70px;
  height: 70px !important;
  margin-right: 20px;
  animation: bounceLogo 3s infinite ease-in-out;
}

@keyframes bounceLogo {
  0%, 100% {
    transform: translateY(5px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.slide-up {
  opacity: 0;
  transform: translateY(0);
  animation: slideUp 0.8s ease-out forwards;
}

.slide-up.adbits:hover {
  animation: floatUpDown 3s ease-in-out infinite;
  box-shadow: 0 15px 30px rgba(250, 204, 21, 0.1);
  opacity: 1; /* ← forza opacità visibile anche durante l'hover */
}

.slide-up.server:hover {
  animation: floatUpDown 3s ease-in-out infinite;
  box-shadow: 0 15px 30px rgba(21, 101, 250, 0.1);
  opacity: 1;
}

.slide-up.earn:hover {
  animation: floatUpDown 3s ease-in-out infinite;
  box-shadow: 0 15px 30px rgba(40, 250, 21, 0.1);
  opacity: 1;
}

/* Colori di hover */
.slide-up.adbits:hover {
  background-color: #ff9800;
}

.slide-up.server:hover {
  background-color: #0066ff;
}

.slide-up.earn:hover {
  background-color: green;
}

/* Animazioni */
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatUpDown {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Header */
.header {
  background-color: #111; /* più scuro */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #222;
  animation-delay: 0.2s;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff9800;
  margin-left: 1rem; /* spacing from the left */
  display: flex;
  align-items: center;
}

.nav a {
  color: #ccc;
  margin-left: 1.5rem;
  text-decoration: none;
}

.nav a:hover {
  color: #ff9800;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background-color: #0a0a0a;
  animation-delay: 0.4s;
}

.hero h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 600px;
  font-size: 1.2rem;
  margin: 0 auto 2rem;
  color: #999;
}

/* Button */
.btn {
  display: inline-block;
  background-color: #ff9800;
  color: #0a0a0a;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.btn:hover {
  background-color: #eab308;
  transform: scale(1.05);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

/* Features Section */
.features {
  background-color: #111; /* più scuro */
  padding: 4rem 2rem;
  text-align: center;
  animation-delay: 0.6s;
}

.features h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: #151515;
  padding: 2rem;
  border-radius: 1rem;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
}

/* CTA Section */
.cta {
  text-align: center;
  padding: 4rem 2rem;
  background-color: #0a0a0a;
  animation-delay: 0.8s;
}

.cta h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #888;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
  color: #555;
  border-top: 1px solid #222;
  background-color: #0a0a0a;
  animation-delay: 1s;
}

.app-popup {
  position: fixed;
  top: 2rem;
  background-color: #1e1e1e;
  color: #f5f5f5;
  border: 1px solid #333;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 280px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 999;
  animation: none !important;  /* disable slideInRight */
  right: auto;   /* reset right: 2rem */
  font-family: sans-serif;
  transition: top 0.4s ease-in-out; /* <--- aggiunto */
}

.app-popup.initial {
  position: fixed;
  top: 9rem;
  right: 2rem;
  animation: slideInRight 0.8s ease forwards;
}

.app-popup.scrolled {
  position: fixed;
  top: 2rem;
  right: 2rem;
  animation: slideInRight 0.8s ease forwards;
}

.app-popup.mobile {
  position: relative;      /* Fix to viewport */
  left: 50%;
  top: 50%;            /* 50% from left */
  transform: translate(-50%, -50%);  /* Shift back half width and height */
  z-index: 9999;        /* Ensure on top */
}

.popup-content h4 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #ff9800;
}

.popup-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-content.mobile {
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}

.download-button {
  display: inline-block;
  background-color: #ff9800;
  color: #1e1e1e;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s;;
}

.download-button:hover {
  background-color: #e5b100;
  transform: scale(1.05);
}

@keyframes slideInRight {
  from {
    transform: translateX(150%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.minimize-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: white;
}

/* Evitiamo display:none per la misura: solo opacità e pointer-events */
.popup-circle.hidden {
  opacity: 0;
  pointer-events: none;
}

#app-popup {
  position: fixed;
  right: 2rem;
  transition: transform 0.5s ease, opacity 0.5s ease, top 0.4s ease-in-out;
  transform-origin: center center;
  z-index: 1000;
}

#app-popup.minimized {
  opacity: 0;
  pointer-events: none;
}

.popup-circle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.1);
  opacity: 0;
  z-index: 999;
  color: white;
  font-size: 25px;
}

.popup-circle.show {
  transform: scale(1);
  opacity: 1;
}

.popup-circle.hidden {
  display: none;
}

#background {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #00000080;
  z-index: -10;
  transition: z-index 0.4s ease-out;
}

 /* WebKit scrollbar styles */
    ::-webkit-scrollbar {
      width: 12px;
    }
    ::-webkit-scrollbar-track {
      background: #ff9800;
    }
    ::-webkit-scrollbar-thumb {
      background-color: #ff9800;
      border-radius: 6px;
      border: 3px solid #ff9800;
    }
    ::-webkit-scrollbar-thumb:hover {
      background-color: #ff9800;
    }

    /* Firefox scrollbar styles */
    * {
      scrollbar-width: thin;
      scrollbar-color: #ff9800 #f0f0f0;
    }