/* styles-override.css — Phase 1: Contrast rescue (WizKidz brand tokens) */

:root {
  --wiz-gold: #f8c211;
  --wiz-gold-hover: #c9990a;
  --wiz-navy: #0a0f1c;
  --wiz-deep: #070b16;
  --wiz-teal: #1fd1d6;
  --wiz-cream: #fafaf7;
  --wiz-muted: #97a3be;
  --wiz-border: #233049;
  --wiz-success: #10b981;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--wiz-navy);
  line-height: 1.5;
  min-height: 100vh;
}

body.store-pdf {
  background-color: #f7f3ee;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255, 215, 175, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(200, 180, 255, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, #fcf9f5 0%, #f5f0ea 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d5c8b8' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(248, 194, 17, 0.45), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: float-sparkle 8s infinite ease-in-out;
}

.sparkle:nth-of-type(1) {
  top: 15%;
  left: 10%;
}
.sparkle:nth-of-type(2) {
  top: 45%;
  right: 8%;
  animation-delay: 2.5s;
}
.sparkle:nth-of-type(3) {
  bottom: 30%;
  left: 18%;
  animation-delay: 5s;
}

@keyframes float-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
}

.hero {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--wiz-navy) 0%, var(--wiz-deep) 100%);
  color: white;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  color: var(--wiz-gold);
}

.hero .subtitle {
  color: var(--wiz-muted);
  margin-top: 1rem;
}

.quiz-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.quiz-row label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--wiz-cream);
}

.quiz-row input[type='range'] {
  width: 200px;
  accent-color: var(--wiz-gold);
}

.quiz-row select {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--wiz-border);
  background: var(--wiz-deep);
  color: white;
  font-size: 1rem;
}

#ageDisplay {
  color: var(--wiz-gold);
  font-weight: 800;
  font-size: 1.25rem;
}

.catalog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0;
}

.product-card {
  background: linear-gradient(145deg, #ffffff 0%, #fdfcfa 100%);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow:
    0 4px 20px rgba(180, 160, 140, 0.12),
    0 1px 4px rgba(180, 160, 140, 0.08);
  border: 1px solid rgba(220, 210, 195, 0.3);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.pdf-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(245, 200, 150, 0.2), rgba(180, 160, 255, 0.1));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pdf-card:hover {
  transform: translateY(-8px) scale(1.005);
  box-shadow:
    0 20px 50px rgba(180, 160, 140, 0.18),
    0 4px 12px rgba(180, 160, 140, 0.08);
  border-color: rgba(200, 180, 160, 0.5);
}

.app-card:hover {
  transform: translateY(-8px) scale(1.005);
}

.pdf-card:hover::before {
  opacity: 1;
}

.age-badge {
  display: inline-block;
  background: var(--wiz-navy);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.product-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--wiz-deep);
  line-height: 1.3;
}

.product-card p {
  margin: 0.35rem 0;
  color: #475569;
  font-size: 0.95rem;
}

.price-tag {
  font-size: 2rem;
  font-weight: 800;
  color: var(--wiz-deep);
  margin: 0.75rem 0 0.5rem;
}

.buy-btn {
  background: var(--wiz-gold);
  color: var(--wiz-deep);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(248, 194, 17, 0.4);
  width: 100%;
  margin-top: 0.5rem;
}

.buy-btn:hover {
  background: #fbbf24;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(248, 194, 17, 0.5);
}

.free-badge {
  background: var(--wiz-success);
  color: white;
  font-weight: 700;
  padding: 0.2rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--wiz-gold);
  color: var(--wiz-deep);
  padding: 0.2rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.75rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--wiz-muted);
  background: white;
  border-radius: 20px;
}

/* Phase 4 — Roadmap */
.roadmap {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  margin-top: 1rem;
  border-radius: 32px;
  border: 1px solid #e2e8f0;
}

.roadmap h2 {
  color: var(--wiz-navy);
  margin-top: 0;
}

.path {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-weight: 600;
}

.step {
  background: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid #d1d5db;
  font-size: 0.9rem;
}

.step.free {
  border-color: var(--wiz-success);
  background: #ecfdf5;
}

.step.premium {
  border-color: var(--wiz-navy);
  background: #e0e7ff;
}

.arrow {
  font-size: 1.5rem;
  color: #94a3b8;
}

.roadmap-note {
  margin-top: 1rem;
  color: var(--wiz-navy);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 22, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin-top: 0;
  color: var(--wiz-navy);
}

.modal-content select,
.modal-content button {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.modal-content button {
  background: var(--wiz-navy);
  color: white;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.modal-content button:hover {
  background: var(--wiz-deep);
}

.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--wiz-muted);
}

.site-footer a {
  color: var(--wiz-navy);
  font-weight: 600;
}

@media (max-width: 640px) {
  .product-grid {
    gap: 1.5rem;
    padding: 1.5rem 0;
  }

  .quiz-row {
    gap: 1rem;
  }
}

/* --- Dual storefront (Play & Learn) --- */

.hub-header {
  text-align: center;
  padding: 1.25rem 1rem 0;
}

.hub-eyebrow {
  margin: 0 0 0.75rem;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wiz-navy);
}

.store-toggle {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.35rem;
  background: white;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  justify-content: center;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--wiz-navy);
  color: white;
  box-shadow: 0 4px 12px rgba(10, 15, 28, 0.25);
}

body.store-app {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: #e2e8f0;
}

.bundle-banner {
  text-align: center;
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  background: rgba(248, 194, 17, 0.15);
  border: 1px dashed rgba(248, 194, 17, 0.5);
  border-radius: 16px;
  font-size: 0.95rem;
}

.app-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 2rem;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 24px;
  color: white;
}

.app-hero.hidden,
.app-filters.hidden {
  display: none;
}

.app-hero h2 {
  margin: 0 0 0.5rem;
  color: #c4b5fd;
}

.app-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #ddd6fe;
}

.app-mascot {
  font-size: 5rem;
  line-height: 1;
}

.app-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 1rem;
}

.app-filters select {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid #4c1d95;
  background: #1e1b4b;
  color: white;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #c4b5fd;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pdf-card {
  background: rgba(255, 255, 255, 0.92);
}

.app-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.app-card h3,
.app-card .duration {
  color: #f1f5f9;
}

.app-card p {
  color: #94a3b8;
}

.app-card .age-badge {
  background: #5b2c8b;
}

.app-card .price-tag {
  color: var(--wiz-teal);
}

.app-card .buy-btn {
  background: #5b2c8b;
  color: white;
  box-shadow: 0 4px 16px rgba(91, 44, 139, 0.45);
}

.app-card .buy-btn:hover {
  background: #6d3aa3;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.feature-tag {
  background: rgba(91, 44, 139, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  color: #ddd6fe;
}

.store-badges a {
  font-size: 1.6rem;
  text-decoration: none;
  transition: transform 0.2s;
  display: inline-block;
}

.store-badges a:hover {
  transform: scale(1.15);
}

.cross-sell {
  font-size: 0.82rem;
  color: var(--wiz-gold);
  margin-top: 0.75rem;
  border-top: 1px dashed rgba(248, 194, 17, 0.35);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-card .cross-sell {
  color: #fbbf24;
  border-top-color: rgba(255, 255, 255, 0.12);
}

.cross-sell-btn {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 0.4rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.modal-sub {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

.app-preview {
  max-width: 520px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.app-simulator {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin: 1rem 0;
}

.simulator-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #1e293b;
  color: #94a3b8;
  font-size: 0.8rem;
}

.sim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.sim-dot.red {
  background: #ef4444;
}
.sim-dot.yellow {
  background: #eab308;
}
.sim-dot.green {
  background: #22c55e;
}

.sim-title {
  margin-left: 0.5rem;
}

.screenshot-placeholder {
  font-size: 4rem;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(180deg, #312e81, #1e1b4b);
}

.preview-features-list {
  margin: 0;
  padding: 1rem 1.25rem 1.25rem 2rem;
  background: #f8fafc;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-download {
  background: #5b2c8b !important;
}

.preview-close {
  background: #e2e8f0 !important;
  color: var(--wiz-navy) !important;
}

/* Age-grouped catalog — warm storybook chapters */
.catalog {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.age-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 6rem;
  position: relative;
}

.age-section::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(200, 180, 160, 0.1) 0%,
    rgba(200, 180, 160, 0.3) 30%,
    rgba(200, 180, 160, 0.3) 70%,
    rgba(200, 180, 160, 0.1) 100%
  );
}

.age-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.7), rgba(245, 240, 235, 0.4));
  border-radius: 16px;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(220, 210, 195, 0.2);
  backdrop-filter: blur(4px);
}

#age-2-5 .age-section-header {
  background: linear-gradient(135deg, rgba(255, 235, 200, 0.5), rgba(255, 220, 180, 0.2));
}

#age-6-11 .age-section-header {
  background: linear-gradient(135deg, rgba(200, 230, 255, 0.4), rgba(180, 210, 255, 0.15));
}

#age-12-14 .age-section-header {
  background: linear-gradient(135deg, rgba(220, 200, 255, 0.4), rgba(200, 180, 255, 0.15));
}

#age-14-17 .age-section-header {
  background: linear-gradient(135deg, rgba(200, 220, 240, 0.4), rgba(180, 200, 230, 0.15));
}

.age-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.age-section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2d1f14, #5a3d2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.age-count {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(200, 180, 160, 0.1);
  padding: 0.25rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8a7a6a;
  border: 1px solid rgba(200, 180, 160, 0.15);
  margin-left: auto;
}

.age-jump-menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 248, 240, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 60px;
  border: 1px solid rgba(220, 210, 195, 0.2);
  box-shadow: 0 4px 20px rgba(180, 160, 140, 0.08);
  margin-bottom: 2.5rem;
  justify-content: center;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
}

.age-jump-menu > span {
  color: #7a6556;
  font-weight: 600;
  font-size: 0.9rem;
}

.age-jump-link {
  padding: 0.4rem 1.4rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(200, 180, 160, 0.15);
  text-decoration: none;
  font-weight: 600;
  color: #4a3728;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.age-jump-link:hover {
  background: white;
  border-color: #c4a88a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(180, 160, 140, 0.12);
}

.age-jump-link:active {
  transform: translateY(0);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 0.35rem;
  transition: all 0.3s ease;
}

.level-badge.level-1 {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.level-badge.level-2 {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

.level-badge.level-3,
.level-badge.level-4 {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
  color: #5b21b6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.level-badge.level-1::before {
  content: '⭐';
  margin-right: 0.15rem;
}
.level-badge.level-2::before {
  content: '⭐⭐';
  margin-right: 0.15rem;
  font-size: 0.65rem;
}
.level-badge.level-3::before,
.level-badge.level-4::before {
  content: '⭐⭐⭐';
  margin-right: 0.15rem;
  font-size: 0.6rem;
}

.progression-note {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 2px dashed rgba(134, 239, 172, 0.8);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  text-align: center;
  grid-column: 1 / -1;
  color: #166534;
  font-size: 0.95rem;
}

.age-section .product-grid {
  padding-top: 0;
}

.bundle-banner {
  background: rgba(255, 248, 240, 0.8);
  border-color: rgba(248, 194, 17, 0.35);
  color: #5a3d2b;
}

