* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0a1a3a 0%, #1a3a5a 50%, #0a1a3a 100%);
  overflow: hidden;
  position: relative;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;

}

.BG {
  position: absolute;

  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.logo {
  position: relative;
  z-index: 2;
  top: -10%;
  text-align: center;
  animation: drop-replace 0.8s ease-out;
}

.logo img {
  width: 100%;
  max-width: 350px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  animation: glow 2s ease-in-out infinite alternate;
 
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  }
  to {
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.9));
  }
}

@keyframes drop-replace {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  60% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.text {
  position: relative;
  z-index: 2;
  top: -8%;
  margin-bottom: 15px;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.text img {
  width: 95%;
  max-width: 320px;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.point {
  position: relative;
  z-index:993;
  top: -5%;

  text-align: center;
  animation: bounce 2s ease-in-out infinite;
}

.point img {
  width: 90%;
  max-width: 480px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.scratch-card {
  position: relative;
  z-index: 3;
  width: 95%;
  max-width: 400px;
  top: -15%;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.6s both;
}
.scratch-card img{
    width: 100%;
    object-fit: cover; 
}
.scratch-card-frame {
    position: relative;
    z-index: 994;
    width: 100%;
    max-width: 300px;
    top: -25%;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.6s both;
    cursor: pointer;
    display: inline-block;
  }
  .scratch-card-frame img{
      width: 100%;
      object-fit: cover;
      display: block;
      position: relative;
      pointer-events: none;
  }

  .scratch-card-protection {
    position: relative;
    z-index: 996;
    width: 100%;
    max-width: 300px;
    top: -31%;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.6s both;
    cursor: pointer;
    display: inline-block;
  }
  .scratch-card-protection img{
      content: url('./images/Scratch_Protection.png');
      width: 100%;
      object-fit: cover;
      display: block;
      position: relative;
      pointer-events: none;
  }


.scratch-card img:last-child:hover {
  opacity: 0.95;
}

.scratch-result {
  position: relative;
  z-index: 995;
  width: 100%;
  max-width: 300px;
  top: -31%;
  margin-top: -9%;
  text-align: center;
  display: none;
  margin-left: auto;
  margin-right: auto;
  pointer-events: none;
  align-items: center;
  justify-content: center;
}

.scratch-result h1 {
  font-size: 25px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  padding: 0;
  text-align: center;
  width: 100%;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 997;
  pointer-events: auto;
  cursor: grab;
  cursor: -webkit-grab;
  touch-action: none;
  user-select: none;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.popup-win {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.5s ease-out;
}

.popup-win img {
  max-width: 350px;
  max-height: 60vh;
  object-fit: contain;
}

.popup-win a img {
  cursor: pointer;
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 350px;
}

.popup-win a:hover {
  transform: scale(1.05);
}

.popup-win a:active {
  transform: scale(0.95);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* Floating coins animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

.download {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 330px;
  margin-top: 105px;
  cursor: pointer;
  z-index: 2;
}

.download img {
  width: 75%;
}

.timer {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 330px;
  margin-top: 230px;
  user-select: none;
  z-index: 2;
}

.timer img {
  width: 40%;
}

#timer-container {
  text-align: center;
  font-family: Arial, sans-serif;
  position: absolute;
  margin-top: 4px;
}

  #time-control {
    font-size: 18px;
    font-weight: 900;
    margin: 6px 0;
    -webkit-text-stroke: 1px #fff200;
    background: linear-gradient(to bottom, #ff0000, #000000);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
  }

.telegram {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 330px;
  bottom: 10px;
  cursor: pointer;
  z-index: 2;
}

.telegram img {
  width: 38%;
}

/* Responsive Styles */

/* Max-width: 750px */
@media screen and (max-width: 750px) {
  .container {
    max-width: 100%;
    padding: 10px;
  }

  .logo {
    top: -8%;
  }

  .logo img {
    max-width: 300px;
  }

  .text {
    top: -6%;
  }

  .text img {
    max-width: 280px;
  }

  .point {
    top: -3%;
  }

  .point img {
    max-width: 420px;
  }

  .scratch-card {
    top: -12%;
    max-width: 350px;
  }

  .scratch-card-frame {
    top: -22%;
    max-width: 280px;
  }

  .scratch-card-protection {
    top: -28%;
    max-width: 280px;
  }

  .scratch-result {
    top: -28%;
    max-width: 280px;
  }

  .scratch-result h1 {
    font-size: 22px;
  }

  .popup-win img {
    max-width: 300px;
  }

  .popup-win a img {
    max-width: 320px;
  }
}

/* Max-width: 440px */
@media screen and (max-width: 440px) {
  .container {
    padding: 8px;
  }

  .logo {
    top: -6%;
  }

  .logo img {
    max-width: 250px;
  }

  .text {
    top: -4%;
    margin-bottom: 10px;
  }

  .text img {
    max-width: 240px;
  }

  .point {
    top: -2%;
  }

  .point img {
    max-width: 350px;
  }

  .scratch-card {
    top: -10%;
    max-width: 300px;
  }

  .scratch-card-frame {
    top: -20%;
    max-width: 240px;
  }

  .scratch-card-protection {
    top: -26%;
    max-width: 240px;
  }

  .scratch-result {
    top: -26%;
    max-width: 240px;
  }

  .scratch-result h1 {
    font-size: 20px;
  }

  .popup-win img {
    max-width: 250px;
  }

  .popup-win a img {
    max-width: 280px;
  }

  #time-control {
    font-size: 16px;
  }
}

/* Max-width: 390px */
@media screen and (max-width: 390px) {
  .container {
    padding: 5px;
  }

  .logo {
    top: -5%;
  }

  .logo img {
    max-width: 220px;
  }

  .text {
    top: -3%;
    margin-bottom: 8px;
  }

  .text img {
    max-width: 200px;
  }

  .point {
    top: -1%;
  }

  .point img {
    max-width: 300px;
  }

  .scratch-card {
    top: -8%;
    max-width: 260px;
  }

  .scratch-card-frame {
    top: -18%;
    max-width: 200px;
  }

  .scratch-card-protection {
    top: -24%;
    max-width: 200px;
  }

  .scratch-result {
    top: -24%;
    max-width: 200px;
  }

  .scratch-result h1 {
    font-size: 18px;
  }

  .popup-win {
    gap: 15px;
  }

  .popup-win img {
    max-width: 220px;
  }

  .popup-win a img {
    max-width: 260px;
  }

  #time-control {
    font-size: 14px;
  }
}
