html,
body {
  overflow-x: hidden;
}


.main-circle {
  position: relative;
  width: 400px;
  height: 400px;
  background: #111;
  border-radius: 50%;
  box-shadow: 0 0 80px #000a;
  overflow: hidden;
  border: 6px solid #e53935;
}

.settings-icon {
  font-size: 2.5rem;
  color: #ffff;
  background: #000;
  border-radius: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  z-index: 999999;
  box-shadow: 0 2px 8px #0002;
  border: 2px solid #eee;
  transition: background 0.2s;
  text-align: center;
  line-height: 45px;
}

.settings-icon:hover {
  background: #000;
  color: #fff;
}

.ball {
  position: absolute;
  left: 50%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 130px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 30px #0008;
}

.ball-8 {
  background: #fff;
  color: #111;
  z-index: 2;
}

.ball-blue {
  background: radial-gradient(circle at 60% 40%, #4a90e2 60%, #1a237e 100%);
  z-index: 1;
}


.animate .ball-8 {
  animation: ball-move 2s linear infinite;
}

.animate .ball-blue {
  animation: ball-move 2s linear infinite;
  animation-delay: -0.85s;
  /* Negative delay for perfect offset every cycle */
}

@keyframes ball-move {
  0% {
    top: -320px;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    top: 240px;
    opacity: 1;
  }

  /* (800px - 320px) / 2 = 240px */
  90% {
    opacity: 1;
  }

  100% {
    top: 900px;
    opacity: 0;
  }
}

/* Blue ball reveal overlay */
.ball-blue.reveal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: radial-gradient(circle at 60% 40%, #4a90e2 60%, #1a237e 100%);
  transform: translate(-50%, -50%) scale(1);
  z-index: 100;
  box-shadow: none;
  transition: width 0.4s cubic-bezier(.4, 2, .6, 1), height 0.4s cubic-bezier(.4, 2, .6, 1), background 0.4s, top 0.4s, left 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ball-blue.reveal .blue-reveal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 900px;
  text-align: center;
  z-index: 102;
}

.ball-blue.reveal {
  color: #111;
  font-size: 4rem;
  font-weight: bold;
  text-align: center;
  width: 100%;
  pointer-events: none;
  margin-bottom: 0;
}

.ball-blue.reveal .blue-reveal-buttons {
  position: fixed;
  right: 60px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 105;
}

.ball-blue.reveal .remove-btn,
.ball-blue.reveal .continue-btn {
  font-size: 1.2rem;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px #0002;
}

.ball-blue.reveal .remove-btn {
  margin-bottom: 8px;
  background: #fff;
  color: #e53935;
  border: 2px solid #e53935;
}

.ball-blue.reveal .continue-btn {
  background: #4caf50;
  color: #fff;
  border: none;
}

.tap-text {
  font-size: 1.2rem;
  color: #888;
  margin: 10px 0;
  user-select: none;
  margin-top: 25px;
}


.remove-btn,
.continue-btn {
  font-size: 1.1rem;
  padding: 10px 22px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

.remove-btn {
  background: #fff;
  color: #2196f3;
  border: 2px solid #2196f3;
  display: flex;
  align-items: center;
}

.continue-btn {
  background: #4caf50;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Centered answer text */
#blueRevealContent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  font-size: 2vw;
  color: #fff;
  font-weight: bold;
  background: transparent;
  pointer-events: none;
}


/* Ball styling (if needed) */
#ball8,
#ballBlue {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.blue-reveal-buttons button {
  font-size: 1vw;
  padding: 10px 24px;
  border-radius: 12px;
  border: none;
  margin-bottom: 4px;
  cursor: pointer;
  font-weight: bold;
}

.remove-btn {
  background: #fff;
  color: #d32f2f;
  border: 2px solid #d32f2f;
}

.continue-btn {
  background: #43a047;
  color: #fff;
  border: 2px solid #388e3c;
}

.remove-name-btn {
  display: flex;
  align-items: center;
  border: none;
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 8px;
}

.remove-name-btn .icon {
  font-size: 1.3em;
  margin-right: 8px;
}

.remove-name-btn.remove-true {
  background: linear-gradient(90deg, #4caf50, #43e97b);
  color: #fff;
}

.remove-name-btn.remove-false {
  background: linear-gradient(90deg, #f44336, #ff6a00);
  color: #fff;
}

.continue-btn {
  background: linear-gradient(90deg, #2196f3, #21cbf3);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 32px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(33, 203, 243, 0.2);
  transition: background 0.2s;
}

.names-count {
  color: #000;
  font-size: 1em;
  font-weight: bold;
  margin: 4px 0 0 10px;
  text-align: left;
}

.settings-wrap {
  display: flex;
  align-items: center;
  position: absolute;
  left: 15px;
  top: 160px;
}



#removeIcon {
  font-size: 2rem;
  color: #2ecc40;
  border-radius: 50%;
  border: 2px solid #2ecc40;
  background: #fff;
  margin-right: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border 0.2s;
}

#removeIcon.false {
  color: #e74c3c;
  border-color: #e74c3c;
}


#removeBtn.false {
  background: linear-gradient(0deg, #e74c3c 0%, #ffb3b3 100%);
  color: #fff;
}

#removeIcon.false {
  color: #e74c3c;
  border-color: #e74c3c;
}

#removeBtn.true {
  background: linear-gradient(0deg, rgb(20 167 62) 0%, rgb(102 247 113) 100%);
  color: #fff;
}

#removeIcon.true {
  color: #2ecc40;
  border-color: #2ecc40;
}

.blue-reveal-buttons {
  position: absolute;
  bottom: 70px;
  right: 30px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 10px;
  gap: 10px;
}

#continueBtn {
  width: 100%;
  background: linear-gradient(90deg, #4f8cff 0%, #38e6ff 100%);
  color: #fff;
  font-size: 1.22rem;
  font-weight: bold;
  border: none;
  border-radius: 100px;
  padding: 12px 0 12px 0;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(79, 140, 255, 0.18);
  margin-top: 0;
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#continueBtn:hover {
  background: linear-gradient(90deg, #3576e0 0%, #1fd1f9 100%);
  box-shadow: 0 6px 24px rgba(79, 140, 255, 0.28);
}

/* Remove Name Button: ON (True) */
.remove-name-btn.remove-true {
  background: linear-gradient(0deg, rgb(20 167 62) 0%, rgb(102 247 113) 100%);
  color: #fff;
}

/* Remove Name Button: OFF (False) */
.remove-name-btn.remove-false {
  background: linear-gradient(0deg, #e74c3c 0%, #ffb3b3 100%);
  color: #fff;
}

/* Icon inside Remove Name */
.remove-name-btn .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #ff6a6a;
  font-size: 1.2em;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.remove-name-btn.remove-true .icon {
  background: #fff;
  color: #4caf50;
}

/* Continue Button */
.continue-btn {
  width: 100%;
  background: linear-gradient(90deg, #4f8cff 0%, #38e6ff 100%);
  color: #fff;
  font-size: 1.22rem;
  font-weight: bold;
  border: none;
  border-radius: 100px;
  padding: 12px 0 12px 0;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(79, 140, 255, 0.18);
  margin-top: 0;
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.continue-btn:hover {
  background: linear-gradient(90deg, #3576e0 0%, #1fd1f9 100%);
  box-shadow: 0 6px 24px rgba(79, 140, 255, 0.28);
}

/* Settings Popup */
#settingsPopup {
  position: fixed;
  top: 0%;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#settingsContent {
  background: #fff;
  border: 3px solid #222;
  border-radius: 18px;
  min-width: 650px;
  max-width: 100vw;
  box-shadow: 0 8px 32px #0004;
  padding: 0;
  overflow: hidden;
  margin-top: 20px;
  height: auto;
}

.popup-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e5e5e5;
  padding: 0 12px;
  border-bottom: 2px solid #ccc;
  height: 48px;
  position: relative;
}

.tabBtn {
  font-size: 1.2em;
  font-weight: bold;
  background: none;
  border: none;
  padding: 8px 16px;
  text-align: center;
}



.close-btn {
  font-size: 2.4em;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  border-radius: 4px;
  margin-left: 8px;
}

.close-btn:hover {
  background: #f2f2f2;
  color: #d00;
}

.popup-inner {
  padding: 24px 24px 18px 24px;
  background: #fff;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 2px 8px #0001 inset;
}

.popup-label {
  font-size: 1.3em;
  margin-bottom: 14px;
  color: #222;
  margin-left: 6px;
}

.popup-textarea {
  width: 100%;
  min-height: 270px;
  max-height: 270px;
  font-size: 1.1em;
  border: 2px solid #222;
  border-radius: 8px;
  padding: 8px;
  resize: vertical;
  box-sizing: border-box;
  background: #fafafa;
  font-family: inherit;
}

.popup-save-btn {
  width: 100%;
  background: #4caf50;
  color: #fff;
  font-size: 1.2em;
  border: 2px solid #222;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px #0002;
  margin-top: 6px;
  transition: background 0.2s;
}

.popup-save-btn:hover {
  background: #388e3c;
}

.tabContent {
  display: none;
}

.tabContent[style*="display: block"] {
  display: block;
}

.blue-reveal-content {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: opacity 2.6s ease, transform 1.6s ease;

}

.ball-blue.reveal .blue-reveal-content,
.blue-reveal-content.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);

}

.close-btn:hover {
  background: #eee;
  color: #d00;
  border-radius: 4px;
}


#mobileGameInfo {
  display: none;
}

#magic-ball {
  margin-top: 70px;
}

/* responsive style start here */

@media (max-width: 991px) {

  .names-count {
    font-size: 1em;

  }

  .settings-icon {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    line-height: 35px;
  }

  .main-circle {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 700px) {
  .hero-section{
    margin: 0 !important;
  }

  .ball {
    width: 50vw;
    height: 50vw;
    max-width: 99vw;
    max-height: 99vw;
    min-width: 120px;
    min-height: 120px;
    font-size: 13vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .ball-8 {
    font-size: 20vw;
  }

  .ball-blue {
    font-size: 8vw;
  }


  .blue-reveal-buttons {
    z-index: 9;
  }

  #continueBtn {
    padding: 10px 24px !important;
    width: 60vw;
    border-radius: 16px;
  }

  #settingsPopup {
    align-items: center;
    justify-content: center;
    padding-top: 0;
    z-index: 9999;
  }

  #settingsContent {
    min-width: 0;
    width: 90vw;
    max-width: 90vw;
    height: auto;
    min-height: 220px;
    max-height: 70vh;
    margin: 0 auto;
    border-radius: 16px;
    padding: 0;
    box-sizing: border-box;
    margin-top:28% ;
  }

  .popup-inner {
    padding: 12px 6px 10px 6px;
  }

  .popup-textarea {
    max-height: 200px;
    font-size: 1.2em;
  }

  .popup-save-btn {
    font-size: 1.1em;
    padding: 10px 0;
  }

  .popup-tabs {
    height: 50px;
    padding: 0 4px;
  }

  .tabBtn {
    font-size: 1.3em;
    padding: 4px 8px;
  }

  .close-btn {
    font-size: 3.2em;
    width: 28px;
    height: 28px;
  }

  #blueRevealContent,
  .ball-blue.reveal .blue-reveal-content {
    font-size: 7vw !important;
    width: 90vw;
    max-width: 95vw;
    padding: 0 2vw;
  }

}

@media (max-width: 600px) {

  #blueRevealContent {
    font-size: 6vw;
    width: 90vw;
  }

  .blue-reveal-buttons button {
    font-size: 0.8rem;
  }

  #musicIcon,
  #trophyIcon {
    font-size: 6vw;
  }
  #settingsIcon{
    font-size: 2rem;
   line-height: 33px;
  }

  #tapToReveal {
    font-size: 4vw;
  }

  #mobileGameInfo {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    color: #222;
    font-size: 0.8rem;
    border-radius: 14px;
    padding: 10px 16px;
    max-width: 90vw;
    box-shadow: 0 2px 8px #0001;
    text-align: center;
    z-index: 10;
  }

  #mobileGameInfo.hide-mobile-info {
    display: none !important;
  }

  .settings-wrap {
    top: 120px;
  }

  .blue-reveal-buttons {
    z-index: 9;
    margin: auto;
    left: 0;
    right: 0;
    width: 70%;
    bottom: 25px;
    padding: 15px 10px;
  }

  .main-circle {
    width: 300px;
    height: 300px;
  }

  .settings-wrap {
    top: 140px;
    left: 30px;
  }

}