@tailwind base;
@tailwind components;
@tailwind utilities;

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

@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

@keyframes shine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes drop {
  0% {
    transform: translateY(-200%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100%) rotate(360deg);
    opacity: 0;
  }
}

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

@keyframes particles {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

.coin-container {
  perspective: 1320px;
  transform-style: preserve-3d;
}

.coin {
  position: relative;
  width: 110%;
  height: 110%;
  transform-style: preserve-3d;
  animation: rotate 18s linear infinite;
}

.coin.paused {
  animation-play-state: paused;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 
    0 0 66px rgba(255, 215, 0, 0.4),
    0 0 132px rgba(255, 215, 0, 0.2);
}

.coin-face.back {
  transform: rotateY(180deg);
}

.coin-texture {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 30%,
    #ffd700 0%,
    #ffc107 30%,
    #ff9800 60%,
    #ff5722 100%
  );
}

.coin-texture-alt {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 70% 70%,
    #ffe57f 0%,
    #ffd700 40%,
    #ffa000 70%,
    #ff6f00 100%
  );
}

.metallic-effect {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(
      45deg,
      transparent 40%,
      rgba(255, 255, 255, 0.4) 48%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0.4) 52%,
      transparent 60%
    );
  background-size: 275% 275%;
  animation: shine 6s linear infinite;
}

.coin-inner {
  position: absolute;
  inset: 4.4%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.3),
    transparent 80%
  );
  border: 4.4px solid rgba(255, 215, 0, 0.8);
  overflow: hidden;
}

.coin-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.2rem;
  text-align: center;
}

.coin-symbol {
  color: #cc0000;
  filter: drop-shadow(0 0 22px rgba(255, 0, 0, 0.9));
  animation: sparkle 3s ease-in-out infinite;
}

.balance-text {
  font-size: 2.75rem;
  font-weight: 900;
  background: linear-gradient(to bottom, #ffffff, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8.8px rgba(255, 215, 0, 0.6));
}

.value-text {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 11px rgba(255, 215, 0, 0.4);
}

.golden-dark-text {
  color: #cc0000;
  text-shadow: 
    2.2px 2.2px 4.4px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(204, 0, 0, 0.6);
  letter-spacing: 0.22em;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.4;
  font-family: "Arial Black", "Helvetica Black", sans-serif;
  transform: scale(1.1, 1.32);
}

.edge-detail {
  position: absolute;
  inset: 0;
  border: 3.3px solid rgba(255, 215, 0, 0.6);
  border-radius: 50%;
  box-shadow: inset 0 0 33px rgba(255, 215, 0, 0.4);
}

.radial-effect {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 215, 0, 0.3) 0deg 16.5deg,
    transparent 16.5deg 33deg
  );
}

.light-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 45%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.4) 55%,
    transparent 100%
  );
  background-size: 275% 275%;
  animation: shine 4s linear infinite;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.btn-mining-3d {
  position: relative;
  background: linear-gradient(45deg, #ffd700, #ffa000);
  border: none;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
  transform: perspective(1000px) translateZ(0);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.btn-mining-3d:hover {
  transform: perspective(1000px) translateZ(10px);
  box-shadow: 
    0 5px 15px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-mining-3d .shine-effect {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 100%
  );
  transform: rotate(45deg);
  animation: shine 3s linear infinite;
  pointer-events: none;
}

.btn-mining-3d .particles-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.btn-mining-3d .particles-effect::before,
.btn-mining-3d .particles-effect::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particles 1s ease-out infinite;
}

.btn-mining-3d .particles-effect::before {
  left: 20%;
  animation-delay: 0.2s;
}

.btn-mining-3d .particles-effect::after {
  right: 20%;
  animation-delay: 0.6s;
}