:root {
  --bg-primary: #FF6B00;
  --bg-dark: #D45500;
  --teal: #008080;
  --teal-light: #00a0a0;
  --pink: #FF69B4;
  --gold: #FFD700;
  --text-light: #FFF8F0;
  --text-dark: #3D1600;
  --text-muted: rgba(255,248,240,0.7);
}

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

body {
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 30%, #E55A00 70%, #CC4400 100%);
  min-height: 100vh;
  color: var(--text-light);
  overflow-x: hidden;
}

/* Animated blob backgrounds */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 500px; height: 500px;
  top: -100px; right: -100px;
  background: radial-gradient(circle, rgba(0,128,128,0.12) 0%, transparent 70%);
  animation: blobFloat1 20s ease-in-out infinite;
}

body::after {
  width: 600px; height: 600px;
  bottom: -150px; left: -150px;
  background: radial-gradient(circle, rgba(0,128,128,0.1) 0%, transparent 70%);
  animation: blobFloat2 25s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, 80px) scale(1.1); }
  66% { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, -60px) scale(1.15); }
}

/* Additional floating blobs */
.blob-deco {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.blob-deco-1 {
  width: 300px; height: 300px;
  top: 40%; left: -80px;
  background: radial-gradient(circle, rgba(255,105,180,0.08) 0%, transparent 70%);
  animation: blobFloat1 18s ease-in-out infinite reverse;
}

.blob-deco-2 {
  width: 400px; height: 400px;
  top: 20%; right: -120px;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%);
  animation: blobFloat2 22s ease-in-out infinite;
}

.blob-deco-3 {
  width: 250px; height: 250px;
  bottom: 30%; left: 40%;
  background: radial-gradient(circle, rgba(0,128,128,0.08) 0%, transparent 70%);
  animation: blobFloat1 15s ease-in-out infinite;
}

/* Scattered pattern overlay */
.pattern-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ctext x='10' y='20' font-size='14'%3E✏️%3C/text%3E%3Ctext x='35' y='45' font-size='12'%3E⭐%3C/text%3E%3C/svg%3E");
  background-size: 120px 120px;
}

#root {
  position: relative;
  z-index: 1;
}

/* Title Glitch Effect */
@keyframes glitch1 {
  0%, 90%, 100% { clip-path: inset(0 0 95% 0); transform: translate(-3px, 0); opacity: 0; }
  92% { clip-path: inset(20% 0 40% 0); transform: translate(4px, 0); opacity: 0.7; }
  94% { clip-path: inset(50% 0 20% 0); transform: translate(-2px, 0); opacity: 0.7; }
  96% { clip-path: inset(70% 0 5% 0); transform: translate(3px, 0); opacity: 0.7; }
  98% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0); opacity: 0.7; }
}

@keyframes glitch2 {
  0%, 88%, 100% { clip-path: inset(95% 0 0 0); transform: translate(3px, 0); opacity: 0; }
  90% { clip-path: inset(60% 0 10% 0); transform: translate(-4px, 0); opacity: 0.7; }
  92% { clip-path: inset(30% 0 40% 0); transform: translate(2px, 0); opacity: 0.7; }
  94% { clip-path: inset(5% 0 60% 0); transform: translate(-3px, 0); opacity: 0.7; }
  96% { clip-path: inset(80% 0 5% 0); transform: translate(4px, 0); opacity: 0.7; }
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255,215,0,0.5), 0 0 40px rgba(255,100,0,0.3); }
  50% { text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,100,0,0.5), 0 0 80px rgba(255,50,0,0.2); }
}

@keyframes emblemPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,128,128,0.4), 0 0 40px rgba(0,128,128,0.2); }
  50% { box-shadow: 0 0 30px rgba(0,128,128,0.6), 0 0 60px rgba(0,128,128,0.3), 0 0 80px rgba(255,215,0,0.2); }
}

@keyframes emblemGlitch {
  0%, 95%, 100% { transform: scale(1); filter: none; }
  96% { transform: scale(1.02) skewX(2deg); filter: hue-rotate(90deg); }
  97% { transform: scale(0.98) skewX(-1deg); filter: hue-rotate(-45deg) brightness(1.2); }
  98% { transform: scale(1.01) skewX(1deg); filter: hue-rotate(180deg); }
}

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

@keyframes progressStripe {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}

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

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

@keyframes confettiBurst {
  0% { opacity: 1; transform: scale(0.5) translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5) translateY(-100px); }
}

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

.title-glitch {
  position: relative;
  font-family: 'Archivo Black', sans-serif;
  animation: titlePulse 3s ease-in-out infinite;
}

.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.title-glitch::before {
  color: #ff0040;
  animation: glitch1 4s infinite linear;
}

.title-glitch::after {
  color: #00ffff;
  animation: glitch2 4s infinite linear;
}

/* Emblem badge */
.ihtx-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #006060);
  border: 3px solid var(--gold);
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: white;
  letter-spacing: 2px;
  animation: emblemPulse 2s ease-in-out infinite, emblemGlitch 5s ease-in-out infinite;
}

/* Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.marquee-text {
  display: inline-block;
  animation: marquee 12s linear infinite;
  font-size: 14px;
  color: rgba(255,248,240,0.6);
}

/* Flower decoration */
.flower-deco {
  position: relative;
  width: 48px; height: 48px;
}

.flower-petal {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  top: 50%; left: 50%;
}

.flower-center {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #FFE4B5;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
}

.fade-in { animation: fadeInUp 0.6s ease-out forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }
.fade-in-delay-5 { animation-delay: 0.5s; opacity: 0; }

.progress-bar-animated {
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.15) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.15) 75%, transparent 75%, transparent
  );
  background-size: 40px 40px;
  animation: progressStripe 1s linear infinite;
}

.card-glow {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-glow::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px;
  width: 20px; height: 20px;
  background: rgba(0,128,128,0.2);
  border-radius: 50%;
  pointer-events: none;
}

.card-glow::after {
  content: '';
  position: absolute;
  bottom: -4px; right: -4px;
  width: 16px; height: 16px;
  background: rgba(255,105,180,0.15);
  border-radius: 50%;
  pointer-events: none;
}

.card-glow:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-glow.selected {
  box-shadow: 0 0 0 3px white, 0 0 30px rgba(0,128,128,0.4);
  transform: scale(1.03);
}

.btn-fire {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-fire::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.btn-fire:hover::before { transform: scale(1); }

.btn-fire:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255,215,0,0.5);
}

.btn-fire:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-fire:disabled::before { display: none; }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 0 40px rgba(255,215,0,0.6), 0 0 60px rgba(255,100,0,0.3); }
}

.btn-pulse-glow {
  animation: btnPulse 2s ease-in-out infinite;
}

.drop-zone {
  border: 3px dashed rgba(255,255,255,0.4);
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--teal-light);
  border-style: solid;
  background: rgba(0,128,128,0.15) !important;
  box-shadow: 0 0 30px rgba(0,128,128,0.2);
}

.spinner { animation: spin 1s linear infinite; }

/* Toast */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.toast-in { animation: toastIn 0.4s ease-out forwards; }
.toast-out { animation: toastOut 0.4s ease-in forwards; }

/* Ink blob card corners */
.ink-corner-tl {
  position: absolute;
  top: -6px; left: -6px;
  width: 24px; height: 24px;
  background: rgba(0,128,128,0.15);
  border-radius: 50% 20% 50% 80%;
  pointer-events: none;
}

.ink-corner-br {
  position: absolute;
  bottom: -6px; right: -6px;
  width: 20px; height: 20px;
  background: rgba(255,105,180,0.1);
  border-radius: 80% 50% 20% 50%;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

/* Footer */
.footer-divider {
  height: 3px;
  background: linear-gradient(90deg, #FF8C00, #008080, #FF69B4);
  border-radius: 2px;
}

/* Confetti particles */
.confetti-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(200px) rotate(720deg) scale(0.3); }
}