/* 1. Global Styles */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(to bottom, var(--background-color), var(--primary-color), var(--gradient-mid));
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  max-width: 100%;
}

.heading_container {
  display: table-column;
  flex-direction: column-reverse;
  position: absolute;
  
  width: 360px;
  margin: 2vh 0 0 2.2vw;
}

.name_con {
  display: flex;
  align-items: center;
  margin-bottom: 1vh;
}

.img1 {
  pointer-events: none;
  width: 15vw;
  border-radius: 60%;
}

.name {
  color: white;
  font-size: 2.5vw;
  font-weight: 600;
  margin-left: 10px;
}

.rank_perhour {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1vh;
}

.rank_bar {
  width: 30%;
  height: 6vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
  border-radius: 18px;
}

.rank {
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank_txt1 {
  color: white;
  margin: 0;
  font-size: 3vw;
  font-weight: 600;
}

.rank_txt2 {
  color: rgb(131, 131, 131);
  margin: 0;
  font-size: 3vw;
  font-weight: 600;
}

.bar {
  display: flex;
  justify-content: left;
  align-items: center;
  width: 95%;
  height: 1vh;
  border-radius: 15px;
  margin-top: 1vh;
  border: 0.5px solid rgba(132, 132, 132, 0.433);
  background-color: #005473;
}

.extand_bar {
  height: 0.9vh;
  border-radius: 15px;
  background: linear-gradient(to right, rgb(118, 255, 33), rgb(255, 157, 173), rgb(171, 29, 171));
}

.perhour {
  background-color: #005473;
  width: 60%;
  height: 5vh;
  margin-right: 1vw;
  border-radius: 20px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  cursor: pointer;
}

.img2 {
  pointer-events: none;
  width: 6.15vw;
}

.coinsperhour {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.profithour_txt {
  margin: 0;
  font-size: 2vw;
  color: rgb(165 165 165 / 81%);
}

.coins_hour {
  display: flex;
  justify-content: center;
  align-items: center;
}

.line {
  width: 0.60vw;
  height: 3vh;
  background-color: #898989a1;
}

.img3 {
  pointer-events: none;
  width: 4.6vw;
  margin-left: 0.8vw;
}

.coinsinhour_txt {
  color: white;
  font-size: 3.8vw;
  font-weight: 600;
  margin: 0 0 0.2vw 0.4vw;
}

.img4 {
  pointer-events: none;
  width: 4.6vw;
  margin-right: 0.8vw;
  margin-left: 0.6vw;
}

.setting {
  color: #eeeeee;
  font-size: 4.4vw;
}

#rank_name {
  cursor: pointer;
}
#rank_name:hover {
  color: gold;
  text-decoration: underline;
}

.exchange-dropdown {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  margin-top: 5px;
  z-index: 1000;
}

.exchange-dropdown a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #ddd;
}

.exchange-dropdown a img {
  width: 20px;
  margin-right: 10px;
}

.exchange-dropdown a:last-child {
  border-bottom: none;
}

.exchange-selector:hover .exchange-dropdown {
  display: block;
}

.language-dropdown {
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  border: 1px solid #00ff99;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.5);
  animation: modalFadeIn 0.3s ease forwards;
  z-index: 1000;
}

.language-dropdown p {
  margin: 0;
  padding: 8px 12px;
  cursor: pointer;
}
.language-dropdown p:hover {
  background-color: #f0f0f0;
}

.frame-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
}

.marc-hamster-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 60px;
  padding: 10px 50px;
  width: 309px;
}

.hamster-area {
  top: -100px;
  width: 210px;
  height: 210px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: #005473;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

@media (max-width: 400px) {
  .hamster-area {
    width: 180px;
    height: 180px;
  }
  .hamster-image {
    width: 40px;
    height: 24px;
  }
}

.total-balance-display {
  position: relative;
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  top: -180px;
  text-align: center;
}

.boxes-area {
  display: flex;
  gap: 10px;
}

.box {
  background-color: #ddd;
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 5px;
  font-size: 0.9em;
  text-align: center;
  width: 80px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pics {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.10s;
}
.pics.rotating {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fly-to-balance {
  0% {
    opacity: 1;
    transform: translate(0, 10px) scale(2);
  }
  100% {
    opacity: 1;
    transform: translate(calc(var(--target-x)), calc(var(--target-y))) scale(0.2);
  }
}

:root {
  --score-text-color: rgb(41, 11, 11);
  --score-border-color: #ffcb4d;
  --score-glow-color: #ffcb4d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --score-text-color: #ffffff;
    --score-border-color: #ffd700;
    --score-glow-color: #ffd700;
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 -4px 70px var(--score-glow-color);
  }
  50% {
    box-shadow: 0 -4px 30px var(--score-glow-color);
  }
}

.scoreboard {
  position: fixed;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px;
  height: 90vh;
  padding: 10px;
  font-size: 1.3em;
  font-weight: bold;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--score-text-color);
  background-color: #003248;
  border-top: 0.6vw solid var(--score-border-color);
  border-radius: 13vw;
  animation: glowPulse 2.5s ease-in-out infinite;
  z-index: 10;
}

/* Bottom Navigation */
.bottom-navigation {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #005473;
  border-left: 0.3vw solid var(--score-border-color);
  border-right: 0.3vw solid var(--score-border-color);
  border-radius: 8px;
  padding: 10px;
  margin: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.bottom-navigation a {
  color: #f5f5f5;
  text-decoration: none;
  font-size: 1em;
  padding: 8px 2px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0px rgba(0,123,255,0.3), 0 0 0px rgba(255,0,150,0.2); }
  50% { transform: scale(1.1); box-shadow: 0 5px 5px rgba(0,123,255,0.3), 0 10px 10px rgba(255,0,150,0.2); }
  100% { transform: scale(1); box-shadow: 0 0 0px rgba(0,123,255,0.3), 0 0 0px rgba(255,0,150,0.2); }
}

.bottom-navigation a:hover {
  background: linear-gradient(to bottom, #530404, #003248);
  box-shadow: 0 5px 5px rgba(0,123,255,0.3), 0 10px 10px rgba(255,0,150,0.2);
  animation: pulse 2.5s infinite ease-in-out;
}

#actionFeedback {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid transparent;
  border-top-color: #f5f5f5;
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  margin-bottom: 10px;
}

.hammer-container {
  position: relative;
}

.hamster-image {
  width: 100px;
  cursor: pointer;
}

/* Reset body and html */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* No scrollbar */
}

.task-screen, .welcome-message, .home-menu {
  display: none; /* Hide by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #003248;
  color: #fff;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.task-screen.active, .welcome-message.active, .home-menu.active {
  display: flex; /* Show active screen */
}

.task-content {
  max-width: 600px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

.task-content h2, .task-content p {
  margin-bottom: 20px;
}

.task-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.task-content li {
  margin: 10px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.task-content input[type="checkbox"] {
  margin-right: 10px;
}

button {
  padding: 10px 20px;
  font-size: 13px;
  background: #003248;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #530404, #003248);
}

.logo-icon {
  width: 40px; /* Adjust the size of the logo */
  height: auto;
}

.wallet-icon {
  width: 30px; /* Adjust the size of the icon */
  height: 30px;
  vertical-align: middle; /* Align the icon in the middle of the link */
}

.dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  display: none; /* Start hidden */
}

.dropdown.active {
  display: block; /* Show when active */
}

.dropdown p:hover {
  background-color: #003248;
  cursor: pointer;
}

.dropdown-toggle {
  cursor: pointer;
}

.ad-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    color: white;
    padding: 20px;
  border-left: 0.6vw solid var(--score-border-color);
  border-right: 0.6vw solid var(--score-border-color);
    display: none;
    border-radius: 20px;
    z-index: 9999;
    box-shadow: 0 0 15px rgba(0, 255, 179, 0.6);
    width: 80%; /* Make it responsive */
    max-width: 400px; /* Ensure it's not too large on mobile */
}

#watchAdButton {
    background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
    color: white;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

@media (max-width: 768px) {
  /* Adjust ad styles for smaller screens */
  .ad-container {
    display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

  .ad-image {
    width: 100%;
    height: auto;
  }

  #watchAdButton {
    width: 100%; /* Make the button take up the full width */
    padding: 12px;
  }
}

#watchAdButton:hover {
    background: linear-gradient(to bottom, #530404, #003248);
}



.coin-logo {
  width: 30px; /* Adjust width */
  height: 30px; /* Adjust height */
  margin-right: 5px; /* Adds space between the logo and the balance */
  vertical-align: middle; /* Aligns the logo vertically with the text */
}

/* Loading Spinner Style */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error and Success Messages */
.message {
  font-size: 16px;
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
}

.success {
  background-color: #28a745;
  color: white;
}

.error {
  background-color: #dc3545;
  color: white;
}

.ad-image {
    display: block !important;
    width: 100%;
    height: auto;
}



  /* Light & Dark Mode Variables */
:root {
  --nav-bg: #ffffff;
  --nav-text: #333333;
  --nav-border: #dddddd;
  --nav-active: #007bff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --nav-bg: #1f1f1f;
    --nav-text: #dddddd;
    --nav-border: #333333;
    --nav-active: #4ea1f3;
  }
}

/* Navigation Links */
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--nav-text);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  font-size: 14px;
  text-align: center;
}

.nav-link i {
  font-size: 20px;
 
  transition: transform 0.3s, color 0.3s;
  color: var(--nav-text); /* base icon color */
  display: block;
}

.nav-link span {
  display: none;
  font-size: 10px;
  margin-top: 0px;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-link.active {
  color: var(--nav-active);
  font-weight: bold;
}

.nav-link.active i,
.nav-link:hover i {
  color: var(--nav-active);
  transform: scale(1.2);
}

.nav-link.active span {
  display: block;
  opacity: 1;
}

/* === Success Message Popup === */
.success-message {
  position: fixed;
  bottom: 280px;
  width: 80%;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: linear-gradient(to bottom, var(--background-color), var(--primary-color), var(--gradient-mid));
  color: white;
  padding: 10px 25px;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 25px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.success-message.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.success-message.error {
  background-color: #f44336;
}

/* === Hamster rotating animation === */
.rotating {
  animation: hamsterSpin 1.5s linear infinite;
}

@keyframes hamsterSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}