/* assets/css/style.css */
/* PicPulse 3D Kids Zone / Playful Candy Arcade Design System */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Base & Reset (Strictly Remove Browser Focus Rings Per Rule)
   ========================================================================== */
*, *::before, *::after, *:focus, *:focus-visible, *:focus-within,
button:focus, button:focus-visible, input:focus, input:focus-visible, select:focus, textarea:focus, a:focus {
  outline: none !important;
  outline-offset: 0 !important;
  --tw-ring-shadow: none !important;
  --tw-ring-offset-shadow: none !important;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --font-bubble: 'Fredoka', cursive, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --bg-primary: #fbf7ee;
  --bg-dots: #e5dec9;
  --text-dark: #1e1b4b;
  --text-muted: #475569;
  
  --color-pink: #ff2a85;
  --color-yellow: #ffd600;
  --color-cyan: #00e5ff;
  --color-green: #00e676;
  --color-purple: #a855f7;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  background-image: radial-gradient(var(--bg-dots) 1.5px, transparent 1.5px), radial-gradient(var(--bg-dots) 1.5px, var(--bg-primary) 1.5px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  color: var(--text-dark);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  background-color: #fffdf9 !important;
  background: #fffdf9 !important;
  border-bottom: 3.5px solid #1e1b4b !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.08) !important;
}

img, svg {
  vertical-align: middle;
}

/* ==========================================================================
   Typography & 3D Cartoon Shadow Utilities
   ========================================================================== */
.font-bubble {
  font-family: var(--font-bubble);
  letter-spacing: 0.02em;
}

.text-3d-pink {
  color: #ff2a85;
  text-shadow: 
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 #9d174d,
     0px  6px 0 #4a044e,
     0px  8px 10px rgba(0, 0, 0, 0.25);
}

.text-3d-yellow {
  color: #ffd600;
  text-shadow: 
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 #d97706,
     0px  6px 0 #78350f,
     0px  8px 10px rgba(0, 0, 0, 0.2);
}

.text-3d-cyan {
  color: #00e5ff;
  text-shadow: 
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 #0284c7,
     0px  6px 0 #0c4a6e,
     0px  8px 10px rgba(0, 0, 0, 0.2);
}

.text-3d-green {
  color: #00e676;
  text-shadow: 
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 #059669,
     0px  6px 0 #064e3b,
     0px  8px 10px rgba(0, 0, 0, 0.2);
}

.text-3d-purple {
  color: #a855f7;
  text-shadow: 
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 #6b21a8,
     0px  6px 0 #3b0764,
     0px  8px 10px rgba(0, 0, 0, 0.25);
}

.text-3d-white {
  color: #ffffff;
  text-shadow: 
    -2px -2px 0 #1e1b4b,
     2px -2px 0 #1e1b4b,
    -2px  2px 0 #1e1b4b,
     2px  2px 0 #1e1b4b,
     0px  4px 0 #1e1b4b,
     0px  6px 0 #0f172a,
     0px  8px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   3D Pushable Candy Arcade Buttons
   ========================================================================== */
.btn-candy {
  font-family: var(--font-bubble);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease;
  user-select: none;
  cursor: pointer;
  border-radius: 1.25rem;
  text-align: center;
  line-height: 1.2;
}

.btn-candy:active {
  transform: translateY(4px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

.btn-candy-purple {
  background: linear-gradient(180deg, #c084fc 0%, #9333ea 100%);
  border: 2.5px solid #581c87;
  border-bottom: 5px solid #3b0764;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.35);
  color: #ffffff;
}
.btn-candy-purple:hover {
  background: linear-gradient(180deg, #d8b4fe 0%, #a855f7 100%);
}

.btn-candy-pink {
  background: linear-gradient(180deg, #ff69b4 0%, #ff1493 100%);
  border: 2.5px solid #880e4f;
  border-bottom: 5px solid #4a044e;
  box-shadow: 0 4px 10px rgba(255, 20, 147, 0.35);
  color: #ffffff;
}
.btn-candy-pink:hover {
  background: linear-gradient(180deg, #ff85c1 0%, #ff2a85 100%);
}

.btn-candy-yellow {
  background: linear-gradient(180deg, #ffea00 0%, #ffb300 100%);
  border: 2.5px solid #b45309;
  border-bottom: 5px solid #78350f;
  box-shadow: 0 4px 10px rgba(255, 179, 0, 0.35);
  color: #451a03;
}
.btn-candy-yellow:hover {
  background: linear-gradient(180deg, #fff176 0%, #ffc107 100%);
}

.btn-candy-cyan {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border: 2.5px solid #075985;
  border-bottom: 5px solid #082f49;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
  color: #ffffff;
}
.btn-candy-cyan:hover {
  background: linear-gradient(180deg, #7dd3fc 0%, #0ea5e9 100%);
}

.btn-candy-green {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  border: 2.5px solid #14532d;
  border-bottom: 5px solid #052e16;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
  color: #ffffff;
}
.btn-candy-green:hover {
  background: linear-gradient(180deg, #86efac 0%, #22c55e 100%);
}

.btn-candy-white {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-bottom: 5px solid #94a3b8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  color: #1e293b;
}
.btn-candy-white:hover {
  background: #f8fafc;
}

/* ==========================================================================
   3D Chunky Cartoon Cards & Badges
   ========================================================================== */
.card-cartoon {
  background: #ffffff;
  border: 3px solid #1e1b4b;
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0px #1e1b4b;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
}

.card-cartoon:hover {
  transform: translate(-2px, -3px);
  box-shadow: 7px 9px 0px #1e1b4b;
}

.card-cartoon-pink {
  background: #ffffff;
  border: 3px solid #e11d48;
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0px #fda4af;
}

.card-cartoon-purple {
  background: #ffffff;
  border: 3px solid #9333ea;
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0px #d8b4fe;
}

.card-cartoon-yellow {
  background: #ffffff;
  border: 3px solid #d97706;
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0px #fde68a;
}

.card-cartoon-cyan {
  background: #ffffff;
  border: 3px solid #0284c7;
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0px #bae6fd;
}

.badge-cartoon {
  font-family: var(--font-bubble);
  font-weight: 700;
  border-radius: 9999px;
  border: 2px solid #1e1b4b;
  box-shadow: 2px 2px 0px #1e1b4b;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Playful Animations & Keyframes
   ========================================================================== */
@keyframes playful-wobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-2.5deg) scale(1.02); }
  75% { transform: rotate(2.5deg) scale(0.98); }
}

@keyframes playful-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

@keyframes candy-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes candy-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.08); }
}

.animate-wobble { animation: playful-wobble 4s ease-in-out infinite; }
.animate-float { animation: playful-float 3.5s ease-in-out infinite; }
.animate-candy-spin { animation: candy-spin 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.animate-candy-bounce { animation: candy-bounce 0.7s ease-in-out infinite; }

/* ==========================================================================
   Tailwind-Compatible Responsive Layout Helpers
   ========================================================================== */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-6xl { max-width: 72rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; margin-left: auto; margin-right: auto; }
.max-w-xl { max-width: 36rem; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; margin-left: auto; margin-right: auto; }
.max-w-sm { max-width: 24rem; margin-left: auto; margin-right: auto; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:text-left { text-align: left; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:flex { display: flex; }
  .md\:hidden { display: none !important; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:text-left { text-align: left; }
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none !important; }
}

@media (min-width: 1280px) {
  .xl\:flex { display: flex; }
  .xl\:hidden { display: none !important; }
}

@media (min-width: 1400px) {
  .\32 xl\:flex,
  .nav-desktop-only { 
    display: flex !important; 
  }
  .\32 xl\:hidden,
  .nav-mobile-only { 
    display: none !important; 
  }
}

.hidden { display: none !important; }

/* Mobile Bottom Safe-Area Padding Utility */
.pb-mobile-nav {
  padding-bottom: 6rem;
}
@media (min-width: 768px) {
  .pb-mobile-nav {
    padding-bottom: 2rem;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Tab Bar (Ultra-Polished Mobile App Feel)
   ========================================================================== */
.mobile-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 253, 249, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 3.5px solid #1e1b4b;
  box-shadow: 0 -4px 16px rgba(30, 27, 75, 0.12);
  padding: 0.35rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@media (min-width: 768px) {
  .mobile-tab-bar {
    display: none !important;
  }
}

.mobile-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-family: var(--font-bubble);
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.35rem 0.65rem;
  border-radius: 1.15rem;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-tab-item:active {
  transform: scale(0.92);
}

.mobile-tab-item.active {
  color: #ff1493;
  background: #fce7f3;
  border: 2px solid #1e1b4b;
  box-shadow: 2px 2px 0px #1e1b4b;
  transform: translateY(-2px);
}

.mobile-tab-item.active svg {
  stroke: #ff1493;
}

/* ==========================================================================
   Chunky Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1ebd8;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 2px solid #1e1b4b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   3D Candy Arcade Batch Progress Bar
   ========================================================================== */
@keyframes progress-stripes {
  0% { background-position: 1.5rem 0; }
  100% { background-position: 0 0; }
}

.candy-progress-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.3) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.3) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1.5rem 1.5rem;
  animation: progress-stripes 1.2s linear infinite;
}

/* ==========================================================================
   Realtime Image Loader, Skeleton Shimmer, and Smooth Fade-In Transitions
   ========================================================================== */
@keyframes candy-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.img-skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background-color: #faf5e8;
}

.img-skeleton-shimmer::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.7) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: candy-shimmer 1.8s infinite;
  content: '';
}

.img-smooth-fade {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-smooth-fade.loaded,
.img-smooth-fade.opacity-100 {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.img-loader-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

