@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@300;400;600;700;900&display=swap');

:root {
  --primary-gold: #fbbf24;
  --warm-red: #ef4444;
  --lucky-jade: #10b981;
  --twilight-purple: #8b5cf6;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0f19;
  color: #f8fafc;
  overflow-x: hidden;
  min-height: 100vh;
}

.font-calligraphy {
  font-family: 'Ma Shan Zheng', cursive, 'Noto Sans SC', sans-serif;
}

/* Background & Canvases */
#bgCanvas, #effectCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#bgCanvas {
  z-index: 0;
}

#effectCanvas {
  z-index: 999;
}

/* Glassmorphism Card Style */
.glass-card {
  background: rgba(18, 24, 38, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(251, 191, 36, 0.18);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.05);
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.15);
}

/* Floating Luck Text Animation */
.floating-luck-text {
  position: fixed;
  font-weight: 800;
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 1000;
  animation: floatUpAndFade 1.3s ease-out forwards;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

@keyframes floatUpAndFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-40px) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1);
  }
}

/* Fireworks wish floating badge */
.firework-wish-badge {
  position: fixed;
  font-family: 'Ma Shan Zheng', cursive, sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
  pointer-events: none;
  z-index: 1001;
  transform: translate(-50%, -50%);
  animation: wishBadgePop 2.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes wishBadgePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  40% {
    transform: translate(-50%, -50%) scale(1.0);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -80px) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(0.8);
  }
}

/* Muyu bounce */
.muyu-bounce {
  animation: muyuHit 0.16s ease-in-out;
}

@keyframes muyuHit {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

/* Stick cup shaking */
.stick-shaking {
  animation: stickShake 0.15s infinite;
}

@keyframes stickShake {
  0% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-4px); }
  50% { transform: rotate(8deg) translateY(2px); }
  75% { transform: rotate(-6deg) translateY(-2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

/* Box wobble */
.box-wobble {
  animation: boxWobble 0.2s infinite;
}

@keyframes boxWobble {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.08); }
  50% { transform: rotate(10deg) scale(1.08); }
  75% { transform: rotate(-5deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Cat wave */
.cat-wave {
  animation: catArmWave 0.6s ease-in-out;
}

@keyframes catArmWave {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.15) rotate(-12deg); }
  60% { transform: scale(1.15) rotate(12deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Cookie crack */
.cookie-crack-anim {
  animation: cookieCrack 0.5s ease-out;
}

@keyframes cookieCrack {
  0% { transform: scale(1); }
  40% { transform: scale(1.2) rotate(6deg); filter: drop-shadow(0 0 20px #fbbf24); }
  100% { transform: scale(1); }
}

/* Golden Pulse Glow */
.gold-glow {
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.35);
}

.gold-glow-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.gold-glow-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
}

.gold-glow-btn:active {
  transform: translateY(1px);
}

/* Ambient active indicator */
.active-ambient {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
}

/* Shredder paper shreds */
.shredder-lines {
  background: repeating-linear-gradient(
    0deg,
    #3b82f6,
    #3b82f6 4px,
    transparent 4px,
    transparent 8px
  );
  animation: shredderFall 1s linear infinite;
}

@keyframes shredderFall {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
