/* =========================================================
   SA LITTLE BLOOM LIBRARY
   SHARED BRAND SYSTEM
   Premium SaaS Library
   Theme: Purple • Pink • Blue
========================================================= */
/* =========================================================
   ROOT
========================================================= */
:root {
  --bloom-purple: #7c3aed;
  --bloom-purple-dark: #5b21b6;
  --bloom-purple-soft: #f3e8ff;
  --bloom-pink: #ec4899;
  --bloom-pink-soft: #fce7f3;
  --bloom-blue: #3b82f6;
  --bloom-blue-soft: #eff6ff;
  --bloom-cream: #fff9fc;
  --bloom-white: #ffffff;
  --bloom-ink: #332344;
  --bloom-muted: #766b80;
  --bloom-border: rgba(124, 58, 237, 0.1);
  --shadow-soft: 0 15px 45px rgba(124, 58, 237, 0.08);
  --shadow-card: 0 12px 35px rgba(51, 35, 68, 0.07);
  --shadow-premium: 0 25px 70px rgba(124, 58, 237, 0.14);
  --shadow-hover: 0 22px 55px rgba(124, 58, 237, 0.14);
  --gradient-brand: linear-gradient(
    135deg,
    #7c3aed 0%,
    #ec4899 52%,
    #3b82f6 100%
  );
  --gradient-soft: linear-gradient(
    135deg,
    #f3e8ff 0%,
    #fce7f3 52%,
    #eff6ff 100%
  );
  --bloom-radius: 22px;
}
/* =========================================================
   BASE
========================================================= */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: "Poppins", sans-serif;
  color: var(--bloom-ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(243, 232, 255, 0.8), transparent 28%),
    radial-gradient(
      circle at 100% 8%,
      rgba(219, 234, 254, 0.6),
      transparent 25%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(252, 231, 243, 0.5),
      transparent 30%
    ),
    var(--bloom-cream);
  line-height: 1.6;
}
.font-baloo,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Baloo 2", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: rgba(124, 58, 237, 0.18);
  color: var(--bloom-purple-dark);
}
/* =========================================================
   CONTAINERS
========================================================= */
.bloom-container,
.container {
  width: min(calc(100% - 2rem), 1200px);
  margin-inline: auto;
}
/* =========================================================
   TYPOGRAPHY
========================================================= */
.page-title {
  margin: 0 0 0.7rem;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-title {
  margin: 0 0 0.65rem;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
}
.card-title {
  margin: 0 0 0.5rem;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 800;
}
.body-text {
  margin: 0.25rem 0 1rem;
  color: var(--bloom-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.small-text {
  color: var(--bloom-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.bloom-eyebrow,
.section-eyebrow {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* =========================================================
   GRADIENT TEXT
========================================================= */
.bloom-gradient-text,
.gradient-text {
  background: linear-gradient(90deg, #7c3aed, #ec4899, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* =========================================================
   GRADIENT BACKGROUNDS
========================================================= */
.bloom-gradient {
  background: linear-gradient(135deg, #7c3aed, #ec4899, #3b82f6);
}
.bloom-gradient-soft {
  background: linear-gradient(135deg, #f3e8ff, #fce7f3, #eff6ff);
}
.soft-gradient {
  background:
    radial-gradient(
      circle at 90% 20%,
      rgba(249, 168, 212, 0.35),
      transparent 25%
    ),
    radial-gradient(
      circle at 10% 80%,
      rgba(191, 219, 254, 0.3),
      transparent 28%
    ),
    linear-gradient(135deg, #f3e8ff 0%, #fff9fc 50%, #eff6ff 100%);
}
/* =========================================================
   NAVBAR
========================================================= */
.library-nav {
  position: relative;
  z-index: 50;
  box-shadow:
    0 1px 0 rgba(124, 58, 237, 0.05),
    0 10px 35px rgba(51, 35, 68, 0.045);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.library-nav a,
.library-nav button {
  -webkit-tap-highlight-color: transparent;
}
/* =========================================================
   HERO
========================================================= */
.hero-premium {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(255, 255, 255, 0.9),
      transparent 23%
    ),
    radial-gradient(
      circle at 8% 85%,
      rgba(249, 168, 212, 0.28),
      transparent 25%
    ),
    radial-gradient(
      circle at 65% 50%,
      rgba(191, 219, 254, 0.25),
      transparent 30%
    ),
    linear-gradient(135deg, #f3e8ff 0%, #fff4fb 45%, #eff6ff 100%);
  box-shadow: var(--shadow-premium);
}
.hero-premium::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -170px;
  right: 60px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0)
  );
  animation: heroOrb 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-premium::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  bottom: -130px;
  left: 28%;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.1),
    rgba(124, 58, 237, 0)
  );
  animation: heroOrb 10s ease-in-out infinite reverse;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 5;
}
/* =========================================================
   HERO ANIMATIONS
========================================================= */
@keyframes heroOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, 8px, 0) scale(1.06);
  }
}
.hero-orb {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  animation: heroFloat 7s ease-in-out infinite;
}
.hero-orb-one {
  width: 110px;
  height: 110px;
  top: 15%;
  right: 16%;
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.18),
    rgba(236, 72, 153, 0)
  );
}
.hero-orb-two {
  width: 150px;
  height: 150px;
  right: 5%;
  bottom: 10%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.18),
    rgba(59, 130, 246, 0)
  );
  animation-delay: -2s;
}
.hero-orb-three {
  width: 90px;
  height: 90px;
  bottom: 15%;
  left: 10%;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.15),
    rgba(124, 58, 237, 0)
  );
  animation-delay: -4s;
}
@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
/* =========================================================
   SPARKLES
========================================================= */
.hero-sparkle {
  position: absolute;
  z-index: 2;
  font-size: 18px;
  opacity: 0.75;
  pointer-events: none;
  animation: sparkleFloat 4s ease-in-out infinite;
}
.sparkle-one {
  top: 22%;
  left: 48%;
}
.sparkle-two {
  top: 48%;
  right: 28%;
  animation-delay: -1.5s;
}
.sparkle-three {
  bottom: 18%;
  left: 38%;
  animation-delay: -3s;
}
@keyframes sparkleFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-7px) scale(1.15);
    opacity: 1;
  }
}
/* =========================================================
   FLOATING FLOWER
========================================================= */
.floating-flower {
  display: inline-block;
  animation:
    floatFlower 5s ease-in-out infinite,
    flowerGlow 3s ease-in-out infinite;
}
@keyframes floatFlower {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}
@keyframes flowerGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(236, 72, 153, 0));
  }
  50% {
    filter: drop-shadow(0 5px 12px rgba(236, 72, 153, 0.18));
  }
}
/* =========================================================
   HERO BUTTON
========================================================= */
.hero-action,
.continue-button,
.gradient-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--gradient-brand);
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.2);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.hero-action:hover,
.continue-button:hover,
.gradient-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(124, 58, 237, 0.28);
}
.hero-action-light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--bloom-purple);
  border-color: rgba(124, 58, 237, 0.12);
  box-shadow: 0 8px 22px rgba(51, 35, 68, 0.06);
}
.hero-action-light:hover {
  background: #ffffff;
}
/* =========================================================
   HERO STATS
========================================================= */
.hero-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(51, 35, 68, 0.04);
  backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.hero-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.1);
}
.hero-stat strong {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  color: var(--bloom-purple);
}
.hero-stat span {
  font-size: 11px;
  font-weight: 600;
  color: var(--bloom-muted);
}
/* =========================================================
   QUICK CARDS
========================================================= */
.library-quick-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.library-quick-card::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  top: -45px;
  right: -45px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}
.library-quick-card:hover::before {
  transform: scale(2.2);
  opacity: 0.55;
}
.library-quick-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.1);
}
/* =========================================================
   ADVENTURE CARDS
========================================================= */
.adventure-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  min-height: 170px;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
  border: none;
  border-radius: 26px;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(51, 35, 68, 0.08);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
.adventure-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -70px;
  right: -50px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.45s ease;
}
.adventure-card:hover::before {
  transform: scale(1.4);
}
.adventure-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 45px rgba(51, 35, 68, 0.12);
}
.adventure-purple {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.adventure-pink {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}
.adventure-blue {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.adventure-orange {
  background: linear-gradient(135deg, #f97316, #fb923c);
}
.adventure-green {
  background: linear-gradient(135deg, #10b981, #34d399);
}
.adventure-yellow {
  background: linear-gradient(135deg, #eab308, #facc15);
}
.adventure-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: auto;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 23px;
  backdrop-filter: blur(8px);
  transition: transform 0.35s ease;
}
.adventure-card:hover .adventure-icon {
  transform: scale(1.12) rotate(-5deg);
}
.adventure-card h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}
.adventure-card p {
  position: relative;
  z-index: 2;
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  opacity: 0.9;
}
.adventure-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}
.adventure-card:hover .adventure-arrow {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.3);
}
/* =========================================================
   LIBRARY CARDS
========================================================= */
.library-card,
.card,
.resource-card,
.game-card {
  border: 1px solid rgba(124, 58, 237, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  border-radius: var(--bloom-radius);
}
.library-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.library-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(124, 58, 237, 0.18);
}
.resource-card,
.game-card {
  height: 100%;
  padding: 1.25rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.resource-card:hover,
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
/* =========================================================
   RESOURCE COVER
========================================================= */
.resource-cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.resource-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3),
    transparent 45%
  );
  pointer-events: none;
}
/* =========================================================
   RESOURCE ICON
========================================================= */
.resource-icon {
  display: inline-flex;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}
.library-card:hover .resource-icon {
  transform: scale(1.12) rotate(-4deg);
  filter: drop-shadow(0 8px 12px rgba(124, 58, 237, 0.12));
}
/* =========================================================
   RESOURCE TYPE
========================================================= */
.resource-type-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.07);
  color: var(--bloom-purple-dark);
  font-size: 12px;
  font-weight: 700;
}
/* =========================================================
   ACCESS CARD
========================================================= */
.premium-access-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.97),
    rgba(250, 245, 255, 0.96)
  );
  border: 1px solid rgba(124, 58, 237, 0.1);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.premium-access-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.access-label {
  display: block;
  margin-bottom: 2px;
  color: var(--bloom-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.access-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--gradient-soft);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}
.access-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}
/* =========================================================
   CONTINUE LEARNING
========================================================= */
.continue-learning-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: 26px;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #faf5ff 45%,
    #fdf4fa 70%,
    #eff6ff 100%
  );
  border: 1px solid rgba(124, 58, 237, 0.1);
  box-shadow: var(--shadow-soft);
}
.continue-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--gradient-soft);
  font-size: 32px;
}
/* =========================================================
   INPUTS
========================================================= */
.input,
input.input,
select.input,
textarea.input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--bloom-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.7rem 0.85rem;
  color: var(--bloom-ink);
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
}
.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124, 58, 237, 0.35);
  outline: 3px solid rgba(124, 58, 237, 0.08);
}
.form-label {
  display: block;
  color: var(--bloom-ink);
  font-size: 0.9rem;
  font-weight: 700;
}
/* =========================================================
   SEARCH
========================================================= */
.library-command-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 58, 237, 0.08);
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.06);
  backdrop-filter: blur(18px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.library-command-bar:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.1);
}
.library-search-input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 48px;
  border: 1px solid rgba(124, 58, 237, 0.08);
  border-radius: 15px;
  background: rgba(250, 248, 255, 0.85);
  color: var(--bloom-ink);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}
.library-search-input::placeholder {
  color: #aaa1b0;
}
.library-search-input:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.25);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.06);
}
/* =========================================================
   LANGUAGE SWITCHER
========================================================= */
.language-switcher {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(243, 232, 255, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.08);
}
.language-switcher button {
  min-width: 44px;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  color: #766b80;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.language-switcher button:hover {
  transform: translateY(-1px);
}
.language-switcher button.active {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(124, 58, 237, 0.18);
}
/* =========================================================
   CATEGORY
========================================================= */
.category-scroll {
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.category-scroll::-webkit-scrollbar {
  display: none;
}
.category-btn {
  position: relative;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.category-btn:hover {
  transform: translateY(-1px);
}
.category-btn.active {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.22);
}
/* =========================================================
   NEW RESOURCE
========================================================= */
.new-drop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(236, 72, 153, 0.18);
}
.new-resource-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 5px 5px 18px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.new-resource-scroller::-webkit-scrollbar {
  display: none;
}
.new-resource-scroller > * {
  min-width: 270px;
  scroll-snap-align: start;
}
/* =========================================================
   PARENT CORNER
========================================================= */
.parent-corner {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #f8f4ff, #eff6ff);
  border: 1px solid rgba(124, 58, 237, 0.08);
  box-shadow: 0 12px 35px rgba(51, 35, 68, 0.05);
}
.parent-corner-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.parent-corner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  background: var(--gradient-soft);
  font-size: 26px;
}
/* =========================================================
   EMPTY STATE
========================================================= */
#emptyState {
  animation: emptyFade 0.5s ease both;
}
@keyframes emptyFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  border-radius: 24px;
  background: var(--gradient-soft);
  font-size: 30px;
}
/* =========================================================
   LOADING SCREEN
========================================================= */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #f3e8ff, #fff9fc 55%, #eff6ff);
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
}
.loading-screen.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-flower {
  display: inline-block;
  animation: bloom 1.3s infinite ease-in-out;
}
@keyframes bloom {
  0%,
  100% {
    transform: scale(0.95) rotate(-4deg);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.12) rotate(4deg);
    opacity: 1;
  }
}
/* =========================================================
   ACCESS / LOCKED PAGES
========================================================= */
.bloom-state-card,
.bloom-access-card {
  max-width: 720px;
  margin: clamp(2rem, 8vh, 6rem) auto;
  border: 1px solid var(--bloom-border);
  border-radius: 24px;
  background: #ffffff;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  box-shadow: var(--shadow-card);
}
.bloom-state-icon {
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}
.bloom-access-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.35rem 0;
}
.bloom-access-home {
  display: inline-block;
  padding: 0.5rem;
  color: var(--bloom-muted);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bloom-access-locked {
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 10%, #f6eaff, transparent 42%),
    radial-gradient(ellipse at 90% 80%, #e8f3ff, transparent 42%),
    var(--bloom-cream);
}
/* =========================================================
   PWA INSTALL
========================================================= */
.bloom-pwa-install {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 80;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--gradient-brand);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(48, 32, 68, 0.2);
  cursor: pointer;
}
.bloom-pwa-install[hidden] {
  display: none;
}
/* =========================================================
   AFFILIATE
========================================================= */
.affiliate-panel {
  border: 1px solid var(--bloom-border);
  box-shadow: 0 18px 45px rgba(71, 37, 120, 0.07);
}
.affiliate-stat {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--bloom-border);
  border-radius: 18px;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.affiliate-stat span {
  color: var(--bloom-muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.affiliate-stat strong {
  color: var(--bloom-ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
}
/* =========================================================
   CHILD PROFILE
========================================================= */
.child-profile-dialog {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  color: var(--bloom-ink);
  box-shadow: 0 28px 90px rgba(33, 24, 59, 0.2);
}
.child-profile-dialog::backdrop {
  background: rgba(33, 24, 59, 0.5);
  backdrop-filter: blur(5px);
}
.child-profile-form {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 30px;
}
.child-profile-form h2 {
  margin: 10px 0 0;
  font-family: "Baloo 2", sans-serif;
  font-size: 28px;
  font-weight: 800;
}
.child-profile-form > p {
  margin: 0 0 8px;
  color: var(--bloom-muted);
  font-size: 14px;
  line-height: 1.5;
}
.child-profile-form label {
  margin-top: 5px;
  color: #5b5073;
  font-size: 14px;
  font-weight: 800;
}
.child-profile-form input,
.child-profile-form select {
  width: 100%;
  border: 1px solid var(--bloom-border);
  border-radius: 12px;
  background: #fcfaff;
  padding: 12px 14px;
  color: var(--bloom-ink);
}
.profile-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f6f2fb;
  color: #6d5e80;
  font-size: 24px;
  cursor: pointer;
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.profile-actions button {
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}
.profile-cancel {
  border: 1px solid var(--bloom-border);
  background: #ffffff;
  color: #6f6680;
}
.profile-save {
  border: 0;
  background: var(--gradient-brand);
  color: #ffffff;
}
/* =========================================================
   LIBRARY NAVBAR COMPATIBILITY
========================================================= */
#library-main-navbar {
  width: 100%;
  max-width: 100vw;
}
#library-main-navbar .relative.mx-auto {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
}
/* =========================================================
   BUTTON COMPATIBILITY
========================================================= */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-main {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.btn-primary,
.btn-main {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.2);
}
.btn-secondary {
  background: var(--bloom-purple-soft);
  color: var(--bloom-purple-dark);
  border: 1px solid rgba(124, 58, 237, 0.1);
}
.btn-outline {
  background: #ffffff;
  color: var(--bloom-ink);
  border: 1px solid var(--bloom-border);
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover,
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.14);
}
/* =========================================================
   FOCUS
========================================================= */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.22);
  outline-offset: 3px;
}
/* =========================================================
   SCROLLBAR
========================================================= */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.22) transparent;
}
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(124, 58, 237, 0.4),
    rgba(236, 72, 153, 0.3),
    rgba(59, 130, 246, 0.3)
  );
  border-radius: 999px;
}
/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 640px) {
  body {
    background:
      radial-gradient(
        circle at top left,
        rgba(243, 232, 255, 0.7),
        transparent 35%
      ),
      #fff9fc;
  }
  .bloom-container,
  .container {
    width: min(calc(100% - 1.25rem), 1200px);
  }
  .hero-premium {
    border-radius: 0 0 28px 28px;
    box-shadow: 0 18px 45px rgba(124, 58, 237, 0.1);
  }
  .hero-action {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 13px;
  }
  .hero-stat {
    padding: 9px 10px;
  }
  .hero-stat strong {
    font-size: 17px;
  }
  .hero-stat span {
    font-size: 10px;
  }
  .adventure-card {
    min-height: 145px;
    padding: 15px;
    border-radius: 21px;
  }
  .adventure-card h3 {
    font-size: 18px;
  }
  .adventure-card p {
    font-size: 12px;
  }
  .continue-learning-card {
    padding: 18px;
    border-radius: 23px;
  }
  .continue-button {
    width: 100%;
    min-height: 44px;
  }
  .parent-corner {
    padding: 22px;
    border-radius: 24px;
  }
  .parent-corner-content {
    align-items: flex-start;
  }
  .new-resource-scroller {
    gap: 12px;
  }
  .new-resource-scroller > * {
    min-width: 245px;
  }
  .language-switcher {
    display: none;
  }
  .library-command-bar {
    min-height: auto;
    padding: 8px;
    border-radius: 19px;
  }
  .library-search-input {
    height: 44px;
    font-size: 14px;
  }
}
/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width: 380px) {
  .adventure-card {
    min-height: 135px;
  }
  .new-resource-scroller > * {
    min-width: 225px;
  }
}
/* =========================================================
   REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
