/* Kid Games Adventure Hub - Style Sheet */

:root {
  --brand-pink: #FF6B6B;
  --brand-blue: #4D96FF;
  --brand-green: #6BCB77;
  --brand-yellow: #FFD93D;
  --brand-purple: #845EC2;
  --brand-orange: #FF9671;
  --dark-text: #2C3E50;
  --bg-gradient-start: #EEF1FF;
  --bg-gradient-end: #E0E7FF;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Tactile 3D Buttons */
.btn-3d {
  transition: all 0.1s ease;
  position: relative;
}
.btn-3d:active {
  transform: translateY(3px) !important;
}

/* Hover Bounce */
.bounce-hover {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.bounce-hover:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12);
}

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

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes balloon-wobble {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes bubbleFloat {
  0% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-18px) rotate(2deg) scale(1.02); }
  100% { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes pop-effect {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes star-burst {
  0% { transform: scale(0.5) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.animated-emoji {
  animation: custom-bounce 2.5s infinite ease-in-out;
}

.animate-float {
  animation: float-slow 3s infinite ease-in-out;
}

.animate-balloon {
  animation: balloon-wobble 3.5s infinite ease-in-out;
}

.animate-shake {
  animation: shake 0.4s ease-in-out;
}

.animate-pop {
  animation: pop-effect 0.3s forwards ease-out;
}

/* Memory Card Flip 3D & Playing Card Styling */
.card-container {
  perspective: 1000px;
  aspect-ratio: 3 / 4;
  min-height: 120px;
}

@media (min-width: 640px) {
  .card-container {
    min-height: 150px;
  }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 1.25rem;
}

.card-container:hover .card-inner:not(.is-flipped) {
  transform: translateY(-5px) scale(1.03);
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

/* Matched Cards: Permanently locked faced up with celebration border */
.card-inner.is-matched {
  transform: none !important;
  pointer-events: none !important;
}

.card-inner.is-matched .card-back {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.card-inner.is-matched .card-front {
  transform: none !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), 0 8px 18px -2px rgba(16, 185, 129, 0.3) !important;
  background-color: #f0fdf4 !important;
}

.card-inner.is-matched .card-front-frame {
  border-color: #a7f3d0 !important;
  background: #ffffff !important;
}

.card-front, .card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Card Back (Face Down Playing Card) */
.card-back {
  background: linear-gradient(135deg, #4338CA 0%, #6366F1 50%, #8B5CF6 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 8px 18px -2px rgba(0, 0, 0, 0.16), 0 3px 6px -2px rgba(0, 0, 0, 0.1);
  padding: 6px;
}

.card-back-frame {
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.45);
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.card-back-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .card-back-circle {
    width: 4rem;
    height: 4rem;
  }
}

.card-question-mark {
  color: #ffffff;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .card-question-mark {
    font-size: 2.75rem;
  }
}

/* Card Front (Face Up Playing Card) */
.card-front {
  transform: rotateY(180deg);
  background: #ffffff;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 18px -2px rgba(0, 0, 0, 0.12), 0 3px 6px -2px rgba(0, 0, 0, 0.08);
  padding: 6px;
}

.card-front-frame {
  width: 100%;
  height: 100%;
  border: 2px solid #e0e7ff;
  border-radius: 0.9rem;
  background: #fdfcff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Turtle Maze Coder Grid & Character */
.turtle-cell {
  background-color: #d1fae5 !important;
  border-color: #10b981 !important;
  box-shadow: inset 0 2px 5px rgba(16, 185, 129, 0.25) !important;
}

.turtle-token {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  height: 90%;
  border-radius: 9999px;
  background: radial-gradient(circle at 35% 35%, #6ee7b7, #059669);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5), 0 0 0 3px #ffffff, 0 0 0 5px #10b981;
  z-index: 10;
  animation: turtle-glow 2.2s infinite ease-in-out;
}

@keyframes turtle-glow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5), 0 0 0 3px #ffffff, 0 0 0 5px #10b981;
  }
  50% {
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.7), 0 0 0 3px #ffffff, 0 0 0 7px #34d399;
  }
}

.turtle-sprite {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
}

/* Custom Scrollbar for Kid Navigation */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Balloon Graphics */
.balloon {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.balloon:hover {
  transform: scale(1.08) translateY(-4px);
}
.balloon-body {
  width: 86px;
  height: 105px;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.15), inset 6px 6px 12px rgba(255,255,255,0.4), 0 8px 16px rgba(0,0,0,0.1);
}
.balloon-knot {
  width: 12px;
  height: 8px;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  margin-top: -2px;
}
.balloon-string {
  width: 2px;
  height: 35px;
  background: #94a3b8;
  border-radius: 2px;
}

/* Drawing Canvas Cursor */
.canvas-cursor {
  cursor: crosshair;
}

/* Category Pill active state */
.filter-pill.active {
  background-color: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 10px rgba(77, 150, 255, 0.35);
}

/* Avatar Option Selector */
.avatar-option {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 4.25rem !important;
  height: 4.25rem !important;
  font-size: 2.25rem !important;
  line-height: 1 !important;
  border-radius: 1.25rem !important;
  border: 4px solid transparent !important;
  background-color: #f8fafc !important;
  cursor: pointer;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}

@media (min-width: 640px) {
  .avatar-option {
    width: 4.75rem !important;
    height: 4.75rem !important;
    font-size: 2.6rem !important;
  }
}

.avatar-option:hover {
  background-color: #eff6ff !important;
  transform: translateY(-3px) scale(1.04);
}

.avatar-option.selected {
  border-color: #4D96FF !important;
  background-color: #eff6ff !important;
  box-shadow: 0 0 0 4px rgba(77, 150, 255, 0.35), 0 8px 16px -4px rgba(77, 150, 255, 0.35) !important;
  transform: scale(1.08) !important;
}

.avatar-option span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  pointer-events: none;
}

/* ============================================== */
/* Rainbow Doodle Studio Tools & Slider Styling   */
/* ============================================== */
.color-btn {
  position: relative;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-btn:hover {
  transform: scale(1.12);
}

.color-btn.selected {
  transform: scale(1.22) !important;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #1e293b, 0 6px 14px rgba(0, 0, 0, 0.25) !important;
  z-index: 10;
}

#btn-rainbow {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#btn-rainbow.selected {
  transform: scale(1.1) !important;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #845ec2, 0 6px 14px rgba(132, 94, 194, 0.45) !important;
  z-index: 10;
}

.stamp-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
  outline: none;
}

.stamp-btn:hover {
  transform: scale(1.12);
}

.stamp-btn.selected {
  transform: scale(1.2) !important;
  border-color: #ff6b6b !important;
  background-color: #fff1f2 !important;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #ff6b6b, 0 6px 14px rgba(255, 107, 107, 0.35) !important;
  z-index: 10;
}

/* Custom Styled Brush Slider */
.doodle-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
}

.doodle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4D96FF;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.doodle-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.doodle-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4D96FF;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* Tool Mode Toggle Buttons */
.tool-mode-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  user-select: none;
}

.tool-mode-btn:hover {
  background-color: #f1f5f9;
  transform: translateY(-1px);
}

.tool-mode-btn.selected {
  background-color: #4D96FF !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(77, 150, 255, 0.35), 0 4px 10px rgba(77, 150, 255, 0.25) !important;
  transform: scale(1.05) !important;
}

.tool-glitter-btn.selected {
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6) !important;
  color: #ffffff !important;
  border-color: #d946ef !important;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35), 0 4px 12px rgba(217, 70, 239, 0.35) !important;
  transform: scale(1.05) !important;
}

/* Coloring Book Page Cards */
.coloring-page-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.coloring-page-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.12);
  border-color: #ec4899;
}

/* ======================================================== */
/* COIN COUNTER & AUTHENTIC PROPORTIONAL CURRENCY STYLING    */
/* ======================================================== */
.coin-rendered {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  box-sizing: border-box;
}

/* Authentic Proportional Coin Sizes (Real US Mint: Dime=17.9mm, Penny=19.1mm, Nickel=21.2mm, Quarter=24.3mm) */
.coin-size-dime { width: 50px; height: 50px; min-width: 50px; min-height: 50px; }
.coin-size-penny { width: 56px; height: 56px; min-width: 56px; min-height: 56px; }
.coin-size-nickel { width: 64px; height: 64px; min-width: 64px; min-height: 64px; }
.coin-size-quarter { width: 76px; height: 76px; min-width: 76px; min-height: 76px; }

/* Small Proportional Coin Sizes (Register Tray) */
.coin-size-dime-sm { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
.coin-size-penny-sm { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
.coin-size-nickel-sm { width: 46px; height: 46px; min-width: 46px; min-height: 46px; }
.coin-size-quarter-sm { width: 56px; height: 56px; min-width: 56px; min-height: 56px; }

/* 1. PENNY (1¢): Warm copper bronze with smooth outer rim */
.coin-penny {
  background: radial-gradient(circle at 35% 30%, #fed7aa 0%, #ea580c 40%, #b45309 72%, #78350f 100%);
  border: 3px solid #92400e;
  color: #fff7ed;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.6), inset -2px -2px 4px rgba(0, 0, 0, 0.45), 0 5px 10px -2px rgba(120, 53, 15, 0.35);
}
.coin-penny .coin-inner-ring {
  border: 1px solid rgba(255, 247, 237, 0.4);
}

/* 2. NICKEL (5¢): Thick smooth rim, warm silver-nickel luster */
.coin-nickel {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f5f9 40%, #cbd5e1 70%, #94a3b8 100%);
  border: 4px solid #94a3b8;
  color: #1e293b;
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.8), inset -2px -2px 4px rgba(0, 0, 0, 0.25), 0 6px 12px -2px rgba(0, 0, 0, 0.2);
}
.coin-nickel .coin-inner-ring {
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* 3. DIME (10¢): Smallest US coin, bright reflective silver, reeded milled rim */
.coin-dime {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f8fafc 40%, #cbd5e1 70%, #94a3b8 100%);
  border: 2.5px dashed #94a3b8;
  outline: 1.5px solid #cbd5e1;
  outline-offset: -2.5px;
  color: #0f172a;
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.9), inset -2px -2px 3px rgba(0, 0, 0, 0.25), 0 4px 8px -2px rgba(0, 0, 0, 0.18);
}
.coin-dime .coin-inner-ring {
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* 4. QUARTER (25¢): Largest silver coin, authentic reeded milled edge & bold minted relief */
.coin-quarter {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f5f9 35%, #cbd5e1 65%, #94a3b8 100%);
  border: 3.5px dashed #64748b;
  outline: 2px solid #cbd5e1;
  outline-offset: -3.5px;
  color: #0f172a;
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.9), inset -3px -3px 5px rgba(0, 0, 0, 0.3), 0 7px 14px -2px rgba(0, 0, 0, 0.25);
}
.coin-quarter .coin-inner-ring {
  border: 1.5px solid rgba(100, 116, 139, 0.4);
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.7);
}

.bill-rendered {
  box-shadow: 0 4px 10px rgba(22, 101, 52, 0.2), inset 0 0 0 2px rgba(22, 163, 74, 0.3);
}

.toy-shelf-wrapper {
  background-image: repeating-linear-gradient(
    0deg,
    rgba(180, 83, 9, 0.04) 0px,
    rgba(180, 83, 9, 0.04) 2px,
    transparent 2px,
    transparent 24px
  );
}



