/* =========================================
   Kindergartenschätze - Main Stylesheet
   ========================================= */

:root {
  --primary: #E8604C;
  --primary-light: #FF8A73;
  --primary-dark: #C94B38;
  --secondary: #4CAF82;
  --secondary-light: #6BCF9E;
  --accent: #F5BA2E;
  --accent-light: #FFD86B;
  --purple: #8B5CF6;
  --teal: #0EA5E9;
  --bg: #FFFAF7;
  --bg-alt: #FFF5F0;
  --surface: #FFFFFF;
  --surface-2: #FFF0EB;
  --text: #2D1B14;
  --text-muted: #7A5F56;
  --text-light: #B89389;
  --border: #F0DDD8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --font-main: 'Nunito', sans-serif;
  --font-display: 'Fredoka One', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Kindergarten side decorations ---- */
/* Shown only on very wide screens (≥ 1400px) */
@media (min-width: 1400px) {
  body::before, body::after {
    content: '';
    position: fixed; top: 0; bottom: 0; width: calc((100vw - 1300px) / 2);
    z-index: -1; pointer-events: none;
    background-image:
      radial-gradient(circle, #FFB7C5 2px, transparent 2px),
      radial-gradient(circle, #FFD86B 1.5px, transparent 1.5px),
      radial-gradient(circle, #87CEEB 1.5px, transparent 1.5px),
      radial-gradient(circle, #4ADE80 1px, transparent 1px),
      radial-gradient(circle, #C4B5FD 1.5px, transparent 1.5px);
    background-size: 60px 60px, 40px 40px, 50px 50px, 35px 35px, 45px 45px;
    background-position: 10px 10px, 25px 30px, 5px 45px, 35px 15px, 18px 55px;
    opacity: 0.55;
  }
  body::before { left: 0; }
  body::after  { right: 0; }
}

/* Decorative vertical side strips — always visible (subtle) */
.side-deco-left, .side-deco-right {
  position: fixed; top: 0; bottom: 0; width: 48px;
  z-index: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 120px 0 40px;
  overflow: hidden;
}
.side-deco-left  { left: 0; }
.side-deco-right { right: 0; }

/* Only show strips when viewport > 1300px */
@media (max-width: 1300px) {
  .side-deco-left, .side-deco-right { display: none; }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: var(--font-main); cursor: pointer; border: none; outline: none; }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-weight: 700; font-size: 15px; transition: var(--transition);
  white-space: nowrap; cursor: pointer;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 16px rgba(232,96,76,0.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(232,96,76,0.45); }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 4px 16px rgba(76,175,130,0.3); }
.btn-secondary:hover { background: #3d9a6e; transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-large { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255,250,247,0.95); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; color: var(--primary);
}
.logo-icon { font-size: 28px; }
.nav-logo-img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); transition: transform 0.3s ease; }
.nav-logo:hover .nav-logo-img { transform: rotate(-8deg) scale(1.1); }
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-full);
  font-weight: 600; color: var(--text-muted);
  transition: var(--transition);
}
.nav-link:hover { color: var(--primary); background: var(--surface-2); }
.nav-toggle { display: none; background: none; font-size: 24px; color: var(--text); }

/* Navbar always visible on light hero background */

/* ---- Hero ---- */
.hero-section {
  background: #FFF8F2;
  position: relative; overflow: hidden;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 80px;
}
/* Scattered pastel blobs for warm feel */
.hero-shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.shape {
  position: absolute; border-radius: 50%;
}
.shape-1 { width: 420px; height: 420px; top: -80px; right: -80px; background: radial-gradient(circle, #FFD6CC 0%, transparent 70%); }
.shape-2 { width: 280px; height: 280px; bottom: 10%; left: -60px; background: radial-gradient(circle, #FFEFC0 0%, transparent 70%); }
.shape-3 { width: 200px; height: 200px; top: 20%; right: 38%; background: radial-gradient(circle, #C8F0D8 0%, transparent 70%); opacity: 0.7; }
.shape-4 { width: 120px; height: 120px; top: 15%; left: 25%; background: radial-gradient(circle, #D0E8FF 0%, transparent 70%); }
.shape-5 { width: 180px; height: 180px; bottom: 15%; right: 8%; background: radial-gradient(circle, #E8D5FF 0%, transparent 70%); }

/* hero = inner grid container */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center; max-width: 1200px; width: 100%;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FFF0EB; color: var(--primary-dark);
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; margin-bottom: 20px;
  border: 1.5px solid #FFD0C0;
}
.hero-content { text-align: left; }
.hero-title {
  font-family: var(--font-display); font-size: clamp(32px, 4.5vw, 56px);
  color: var(--text); line-height: 1.15; margin-bottom: 16px;
  text-align: left;
}
.hero-title-highlight {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary) 0%, #FF8A73 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { font-size: 18px; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; text-align: left; }
.hero-description { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; max-width: 480px; text-align: left; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; justify-content: flex-start; }
.hero-stats { display: flex; align-items: center; gap: 20px; justify-content: flex-start; }
.stat { text-align: left; }
.stat-number { font-family: var(--font-display); font-size: 26px; color: var(--primary); display: block; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-divider { width: 1px; height: 36px; background: var(--border); }
@keyframes rainbow-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Hero kids illustration */
.hero-kids-wrap {
  width: 100%;
  max-width: 520px;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 12px 28px rgba(200,100,60,0.18));
}
.kids-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Legacy hero-logo-wrap (navbar/footer) */
.hero-logo-wrap {
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(10px);
  border: 3px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
}
.hero-logo-img {
  width: 220px; height: 220px; object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}
.floating-card {
  position: absolute; width: 60px; height: 60px;
  background: rgba(255,255,255,0.9); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: var(--shadow-lg);
  /* Start hidden at chest center — JS animates them flying out */
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
  will-change: transform, opacity;
}
.card-1 { top: 30px; left: 20px; }
.card-2 { top: 20px; right: 40px; }
.card-3 { bottom: 60px; left: 30px; }
.card-4 { bottom: 40px; right: 20px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---- Season Banner ---- */
.season-banner {
  background: var(--surface); border-bottom: 2px solid var(--border);
  padding: 0;
  position: sticky; top: 60px; z-index: 900;
  box-shadow: var(--shadow-sm);
}
.season-tabs {
  display: flex; flex-wrap: nowrap;
  gap: 0; overflow-x: auto; scrollbar-width: none;
}
.season-tabs::-webkit-scrollbar { display: none; }
.season-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px; font-weight: 700; font-size: 14px;
  color: var(--text-muted); white-space: nowrap; cursor: pointer;
  border-bottom: 3px solid transparent; transition: var(--transition);
  flex-shrink: 0;
}
.season-tab:hover { color: var(--primary); background: var(--bg-alt); }
.season-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--bg-alt); }
.season-tab-icon { font-size: 20px; }
.season-tab-mehr { margin-left: auto; border-left: 1px solid var(--border); }

/* Season tab wrap (tab + optional subcategory chips) */
.season-tab-wrap { display: flex; flex-direction: column; flex-shrink: 0; }

/* Overflow extra row (appears below tabs when "Mehr" clicked) */
.season-tabs-extra {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px 0 12px; border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.season-tab-wrap-extra {
  flex-direction: row; align-items: center; flex-wrap: wrap;
}
.season-tab-wrap-extra .season-tab {
  padding: 10px 18px; font-size: 13px;
}

/* Subcategory hover panel — overlays content below the sticky banner */
.season-subcat-panel {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 10px 24px;
  display: flex; flex-wrap: wrap; gap: 8px;
  z-index: 890;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  animation: subcatFadeIn 0.15s ease;
}
@keyframes subcatFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.season-tab.has-subcats { position: relative; }
.season-subcat-chip {
  font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--bg-alt); color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
  border: 1.5px solid var(--border); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.season-subcat-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.season-subcat-chip small { font-size: 11px; opacity: 0.65; }

/* --- Subcategory expand panel in category cards --- */
.cat-expand-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  transition: max-height 0.32s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.22s ease, padding-top 0.22s ease;
}
.category-card.expanded .cat-expand-panel {
  max-height: 200px;
  opacity: 1;
  padding-top: 10px;
}
.cat-subcat {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.cat-subcat:hover {
  background: var(--primary);
  color: #fff;
}
.cat-expand-all {
  background: color-mix(in srgb, var(--card-color, var(--primary)) 18%, var(--surface));
  color: var(--text);
}
.cat-expand-all:hover {
  background: var(--card-color, var(--primary));
  color: #fff;
}
.cat-expand-chevron {
  font-size: 10px;
  opacity: 0.45;
  margin-left: 3px;
  transition: transform 0.25s ease;
  display: inline-block;
}
.category-card.expanded .cat-expand-chevron {
  transform: rotate(180deg);
}

/* ---- Categories ---- */
.categories-section { padding: 80px 0 40px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px);
  color: var(--text); margin-bottom: 12px;
}
.section-subtitle { font-size: 17px; color: var(--text-muted); }
.section-filters { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.filter-btn {
  padding: 8px 20px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 14px; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border);
  color: var(--text-muted); transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px 20px 20px; text-align: center; cursor: pointer;
  border: 2px solid var(--border); transition: var(--transition);
  position: relative; overflow: hidden;
}
.category-card.has-children { overflow: visible; }
.category-card.has-children::before { border-radius: var(--radius-xl); }
.category-card.expanded { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.category-card::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0; transition: var(--transition);
  background: var(--card-color, var(--primary));
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.category-card:hover::before { opacity: 0.08; }
.category-card.active { border-color: var(--primary); background: var(--surface-2); }
.cat-icon { font-size: 40px; margin-bottom: 12px; }
.cat-name { font-weight: 800; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.cat-count { font-size: 12px; color: var(--text-muted); }
.cat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--card-color, var(--primary));
  margin: 8px auto 0;
}

/* ---- Resources ---- */
.resources-section { padding: 40px 0 80px; }
.resources-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.resources-grid.grid-large {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 28px;
}
.resources-grid.grid-large .resource-preview-img { height: 180px; }
.resources-grid.grid-large .resource-title { font-size: 20px; }
.resources-grid.grid-medium {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.resources-grid.grid-medium .resource-preview-img { height: 110px; }
.resources-grid.grid-medium .resource-title { font-size: 15px; }
.resources-grid.grid-medium .resource-description { font-size: 13px; }
.resources-grid.grid-medium .resource-card-header { padding: 16px 16px 0; }
.resources-grid.grid-medium .resource-card-body { padding: 10px 16px; }
.resources-grid.grid-medium .resource-card-footer { padding: 10px 16px 14px; }

/* Small = compact list rows */
.resources-grid.grid-small {
  grid-template-columns: 1fr; gap: 8px;
}
.resources-grid.grid-small .resource-card {
  flex-direction: row; align-items: center; padding: 10px 16px; gap: 14px;
}
.resources-grid.grid-small .resource-preview-img { display: none; }
.resources-grid.grid-small .resource-card-header {
  padding: 0; flex-shrink: 0; border: none;
}
.resources-grid.grid-small .resource-type-badge { display: none; }
.resources-grid.grid-small .resource-card-body {
  padding: 0; flex: 1; display: flex; align-items: center; gap: 12px;
}
.resources-grid.grid-small .resource-title {
  font-size: 14px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
}
.resources-grid.grid-small .resource-description { display: none; }
.resources-grid.grid-small .resource-meta { margin: 0; }
.resources-grid.grid-small .resource-card-footer {
  padding: 0; border: none; flex-shrink: 0; margin-top: 0;
}
.resources-grid.grid-small .resource-price { display: none; }
.resources-grid.grid-small .download-badge { display: none; }
.resources-grid.grid-small .file-icon-wrapper { width: 36px; height: 36px; font-size: 18px; flex-shrink: 0; }
.view-toggle { display: flex; gap: 6px; align-items: center; }
.view-toggle-btn {
  width: 34px; height: 34px; border: 2px solid var(--border); background: var(--surface);
  border-radius: var(--radius); cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 15px; color: var(--text-muted); transition: var(--transition);
}
.view-toggle-btn:hover, .view-toggle-btn.active {
  border-color: var(--primary); color: var(--primary); background: #fff3ee;
}
.resource-preview-img {
  width: 100%; height: 120px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0; display: block;
}
.resource-card {
  background: var(--surface); border-radius: var(--radius-xl);
  overflow: hidden; border: 2px solid var(--border);
  transition: var(--transition); cursor: pointer;
  display: flex; flex-direction: column;
}
.resource-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }

.resource-card-header {
  padding: 24px 24px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.resource-type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  flex-shrink: 0;
}
.badge-free { background: #E8F5E9; color: #2E7D32; }
.badge-premium { background: #FFF3E0; color: #E65100; }
.badge-sub { background: #F3E5F5; color: #6A1B9A; }

.resource-card-body { padding: 16px 24px; flex: 1; }
.resource-title { font-weight: 800; font-size: 18px; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.resource-description { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.resource-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.resource-category {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-alt); padding: 4px 10px; border-radius: var(--radius-full);
}
.resource-file-type {
  font-size: 12px; color: var(--text-light); font-weight: 600;
  background: var(--border); padding: 2px 8px; border-radius: var(--radius-full);
  text-transform: uppercase;
}
.resource-card-footer {
  padding: 16px 24px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.resource-price {
  font-family: var(--font-display); font-size: 20px;
  color: var(--primary);
}
.resource-price.free { color: var(--secondary); }
.resource-actions { display: flex; gap: 8px; }

/* File type icons */
.file-icon-wrapper {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.file-icon-pdf { background: #FFF0EF; }
.file-icon-image { background: #F0FFF4; }
.file-icon-word { background: #EFF6FF; }
.file-icon-audio { background: #FFF5F5; }
.file-icon-video { background: #F5F0FF; }
.file-icon-other { background: var(--bg-alt); }

/* ---- Download count ---- */
.download-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-light);
}

/* ---- News / Aktuelles Feed ---- */
.news-section { padding: 60px 0 80px; background: var(--bg-alt); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px; border: 2px solid var(--border);
  transition: var(--transition); cursor: default;
  display: flex; flex-direction: column; gap: 14px;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.news-card-emoji { font-size: 36px; line-height: 1; }
.news-card-title {
  font-family: var(--font-display); font-size: 20px;
  color: var(--text); line-height: 1.3;
}
.news-card-content {
  font-size: 15px; color: var(--text-muted); line-height: 1.65;
  white-space: pre-wrap;
}
.news-card-date {
  font-size: 12px; color: var(--text-light); font-weight: 600;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.news-skeleton { height: 180px; border-radius: var(--radius-xl); }

@media (max-width: 768px) {
  .news-section { padding: 48px 0 60px; }
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .news-grid { gap: 16px; }
  .news-card { padding: 20px; }
}

/* ---- Pricing ---- */
.pricing-section { padding: 80px 0; }
.pricing-bg {
  background: linear-gradient(135deg, #FFF5F0 0%, #FFF0EB 100%);
  padding: 80px 0;
}
.pricing-toggle {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 48px;
}
.toggle-label { font-weight: 700; color: var(--text-muted); }
.toggle-switch {
  position: relative; display: inline-block;
  width: 56px; height: 28px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: var(--radius-full);
  transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 20px; width: 20px; left: 4px; bottom: 4px;
  background: #fff; border-radius: 50%; transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(28px); }
.badge-save {
  background: var(--secondary); color: #fff;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; margin-left: 8px;
}

.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; max-width: 700px; margin: 0 auto;
}
.pricing-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 36px; border: 2px solid var(--border);
  transition: var(--transition); position: relative;
}
.pricing-card-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232,96,76,0.1), var(--shadow-lg);
  transform: scale(1.02);
}
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  padding: 6px 20px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.pricing-header { text-align: center; margin-bottom: 28px; }
.pricing-icon { font-size: 48px; margin-bottom: 12px; }
.pricing-name { font-family: var(--font-display); font-size: 24px; margin-bottom: 12px; }
.price-amount { font-family: var(--font-display); font-size: 44px; color: var(--primary); }
.price-period { font-size: 14px; color: var(--text-muted); }
.pricing-features { list-style: none; margin-bottom: 28px; }
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 600;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i.fa-check { color: var(--secondary); }
.pricing-features li i.fa-times { color: var(--text-light); }
.pricing-features li.disabled { color: var(--text-light); }

/* ---- About ---- */
.about-section { padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-circles { position: relative; height: 320px; }
.about-circle {
  position: absolute; width: 100px; height: 100px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  box-shadow: var(--shadow-md);
}
.c1 { background: #FFE4E0; top: 20px; left: 20px; }
.c2 { background: #E8F5E9; top: 10px; right: 40px; animation: float 3.5s ease-in-out infinite; }
.c3 { background: #E3F2FD; bottom: 40px; left: 80px; animation: float 4s ease-in-out infinite 0.5s; }
.c4 { background: #F3E5F5; bottom: 20px; right: 20px; animation: float 3s ease-in-out infinite 1s; }
.about-text { font-size: 17px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }
.about-features { display: flex; flex-direction: column; gap: 20px; }
.about-feature {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface); padding: 20px; border-radius: var(--radius);
  border: 2px solid var(--border);
}
.about-feature-icon { font-size: 28px; flex-shrink: 0; }
.about-feature h4 { font-weight: 800; margin-bottom: 4px; }
.about-feature p { font-size: 14px; color: var(--text-muted); }

/* ---- Footer ---- */
.footer { background: var(--text); color: rgba(255,255,255,0.8); padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; color: #fff;
  margin-bottom: 16px;
}
.footer-logo-img {
  width: 40px; height: 40px; object-fit: contain;
  filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.footer-brand p { font-size: 14px; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px; background: rgba(255,255,255,0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: var(--transition);
}
.social-link:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-links h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
#footerCategories {
  columns: 2; column-gap: 24px;
}
#footerCategories a {
  white-space: nowrap;
}
.footer-links a {
  display: block; padding: 4px 0; font-size: 14px;
  color: rgba(255,255,255,0.7); transition: var(--transition);
  break-inside: avoid;
}
.footer-links a:hover { color: var(--accent); }
.footer-contact h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-contact p { font-size: 14px; margin-bottom: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-legal a:hover { color: #fff; }

/* ---- Modals ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px); transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-bottom: 2px solid var(--border);
  gap: 16px; position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-family: var(--font-display); font-size: 20px; display: flex; align-items: center; gap: 10px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); transition: var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: var(--primary); color: #fff; }

/* Search Modal */
.modal-search { max-width: 600px; }
.search-input-wrap { position: relative; padding: 20px 28px; }
.search-icon-input {
  position: absolute; left: 44px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 18px;
}
.search-input-wrap input {
  width: 100%; padding: 14px 16px 14px 48px;
  border-radius: var(--radius-full); border: 2px solid var(--border);
  font-family: var(--font-main); font-size: 16px; font-weight: 600;
  background: var(--bg-alt); color: var(--text);
  transition: var(--transition);
}
.search-input-wrap input:focus { border-color: var(--primary); outline: none; }
.search-results { padding: 0 28px 24px; min-height: 200px; }
.search-placeholder { color: var(--text-muted); text-align: center; padding: 40px 0; }
.search-result-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition); border: 2px solid transparent;
}
.search-result-item:hover { background: var(--bg-alt); border-color: var(--border); }

/* Viewer Modal */
.modal-viewer { max-width: 900px; height: 85vh; display: flex; flex-direction: column; }
.viewer-container {
  flex: 1; overflow: auto; padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  background: #F5F5F5; position: relative;
}
.viewer-pdf-frame, .viewer-office-frame {
  width: 100%; height: 100%;
  border: none; border-radius: var(--radius);
  background: #fff;
}
.viewer-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.viewer-audio-wrap, .viewer-video-wrap { width: 100%; padding: 40px 20px; text-align: center; background: #fff; border-radius: var(--radius); }
.viewer-audio-wrap audio, .viewer-video-wrap video { width: 100%; }
.viewer-generic {
  background: #fff; border-radius: var(--radius);
  padding: 40px; text-align: center; width: 100%;
}
.viewer-generic-icon { font-size: 64px; margin-bottom: 20px; }

/* Watermark overlay */
.watermark-overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10;
}
.watermark-text {
  font-family: var(--font-display); font-size: 28px; color: rgba(232,96,76,0.35);
  transform: rotate(-35deg); user-select: none; white-space: nowrap;
  position: absolute; pointer-events: none;
}

/* Locked preview */
.locked-preview {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFF5F0, #FFE4DC);
  border-radius: var(--radius); text-align: center; padding: 40px;
}
.lock-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.7; }
.locked-preview h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 12px; }
.locked-preview p { color: var(--text-muted); margin-bottom: 24px; }

.viewer-purchase-bar {
  padding: 20px 28px; border-top: 2px solid var(--border);
  background: var(--surface);
}
.purchase-bar-content {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.purchase-bar-price { font-family: var(--font-display); font-size: 24px; color: var(--primary); }
.purchase-bar-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.viewer-actions { display: flex; align-items: center; gap: 12px; }

/* Payment Modal */
.modal-payment { max-width: 480px; }
.payment-content { padding: 28px; }
.payment-resource-info {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 16px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.stripe-placeholder { margin: 20px 0; }
.stripe-demo-notice {
  background: #FFF3CD; border: 1px solid #FFCA28;
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: #7C5900;
}
.payment-note { font-size: 13px; color: var(--text-muted); margin: 8px 0 16px; }

/* Subscription Modal */
.modal-subscription { max-width: 480px; }
.sub-content { padding: 28px; }
.sub-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.sub-option {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; cursor: pointer; transition: var(--transition);
}
.sub-option:hover { border-color: var(--primary); }
.sub-option.active { border-color: var(--primary); background: var(--surface-2); }
.sub-option-label { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.sub-option-price { font-family: var(--font-display); font-size: 18px; color: var(--primary); }
.sub-features { margin-bottom: 24px; }
.sub-feature {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-weight: 600; font-size: 15px;
}
.sub-feature i { color: var(--secondary); }

/* Access Modal */
.modal-access { max-width: 460px; }
.modal-legal { max-width: 680px; max-height: 80vh; display: flex; flex-direction: column; }
.legal-content { padding: 28px; overflow-y: auto; flex: 1; line-height: 1.75; white-space: pre-wrap; color: var(--text); font-size: 15px; }
.access-content { padding: 28px; }
.access-content p { margin-bottom: 16px; color: var(--text-muted); }
.access-result {
  margin-top: 20px; padding: 16px; border-radius: var(--radius);
  background: var(--bg-alt);
}

/* Form elements */
.form-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.form-input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-main); font-size: 15px; color: var(--text);
  background: var(--bg-alt); transition: var(--transition); margin-bottom: 16px;
}
.form-input:focus { border-color: var(--primary); outline: none; background: var(--surface); }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--text); color: #fff;
  border-radius: var(--radius); padding: 16px 24px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-xl); font-weight: 600;
  transform: translateY(100px); opacity: 0;
  transition: var(--transition); pointer-events: none;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success .toast-icon { color: var(--secondary); }
.toast.toast-error .toast-icon { color: #EF4444; }
.toast.toast-info .toast-icon { color: var(--accent); }
.toast-icon { font-size: 20px; flex-shrink: 0; }

/* ---- Loading ---- */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(255,250,247,0.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.loading-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Empty/Error states ---- */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 22px; margin-bottom: 8px; }

/* ---- Load more ---- */
.load-more-container { text-align: center; margin-top: 40px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 40px; }
}

@media (max-width: 768px) {
  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-section { padding: 80px 16px 60px; }
  .hero-image { display: none; }
  .hero-content { text-align: center; }
  .hero-title { text-align: center; }
  .hero-subtitle { text-align: center; }
  .hero-description { text-align: center; margin: 0 auto 32px; }
  .hero-actions { justify-content: center; flex-wrap: wrap; gap: 12px; }
  .hero-stats { justify-content: center; gap: 16px; }
  .stat { text-align: center; }
  .hero-badge { font-size: 13px; }
  .stat-number { font-size: 24px; }

  /* Navbar */
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); flex-direction: column;
    padding: 16px 24px; box-shadow: var(--shadow-md);
    border-top: 2px solid var(--border); gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; padding: 12px 16px; }
  .nav-container { padding: 0 16px; }

  /* Sections */
  .container { padding: 0 16px; }
  .categories-section { padding: 60px 0 30px; }
  .resources-section { padding: 30px 0 60px; }
  .about-section { padding: 60px 0; }
  .section-header { margin-bottom: 32px; }

  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
  .resources-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { display: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer { padding: 48px 0 0; }

  /* Pricing */
  .pricing-section { padding: 60px 0; }
  .pricing-bg { padding: 60px 0; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
  .pricing-card-featured { transform: none; }

  /* Purchase/viewer bar */
  .purchase-bar-content { flex-direction: column; }
  .modal-viewer { height: 95vh; }

  /* Season tabs */
  .season-banner { top: 56px; }
}

@media (max-width: 480px) {
  /* Extra small phones */
  .hero-section { padding: 72px 12px 48px; }
  .hero-title { font-size: clamp(28px, 8vw, 36px); }
  .hero-subtitle { font-size: 17px; }
  .hero-description { font-size: 15px; }
  .btn-large { padding: 14px 28px; font-size: 15px; }

  .season-tab { padding: 12px 14px; font-size: 13px; }
  .season-tab-icon { font-size: 18px; }

  .modal { border-radius: var(--radius) var(--radius) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-header { padding: 20px 20px; }

  .resource-card-header { padding: 18px 18px 0; }
  .resource-card-body { padding: 12px 18px; }
  .resource-card-footer { padding: 12px 18px 16px; }
  .resource-title { font-size: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-legal { flex-wrap: wrap; justify-content: center; gap: 16px; }

  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
  .category-card { padding: 20px 12px; }
  .cat-icon { font-size: 32px; }

  .pricing-card { padding: 28px 20px; }
  .price-amount { font-size: 36px; }

  .navbar { padding: 12px 0; }
  .nav-logo { font-size: 18px; }
  .nav-logo-img { width: 36px; height: 36px; }

  /* Touch-friendly buttons */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* Smooth tap highlight removal on mobile */
@media (hover: none) {
  .btn:active { opacity: 0.85; transform: scale(0.98); }
  .resource-card:active { transform: none; }
  .category-card:active { transform: none; }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* ---- Skeleton loading ---- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-alt) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* ---- Auth Modal ---- */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.auth-tab:hover { color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-error {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }
.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 16px 0;
}
#navUserArea { display: flex; align-items: center; gap: 8px; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.nav-user-btn:hover { background: var(--border); }
.nav-user-btn i { color: var(--primary); }

/* ---- Profile Modal ---- */
.profile-stat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.profile-stat:last-child { border-bottom: none; }
.profile-stat span:first-child { color: var(--text-muted); }
.profile-stat strong { color: var(--text); }
.profile-purchases { margin-top: 20px; }
.profile-purchases h4 { font-family: var(--font-display); margin-bottom: 12px; }
.purchase-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 14px;
}
.purchase-item i { color: var(--primary); }

.skeleton-card {
  height: 220px; border-radius: var(--radius-xl);
}

/* ---- Ticket FAB ---- */
.ticket-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: linear-gradient(135deg, #E8604C, #ff8c6e);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(232,96,76,0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ticket-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232,96,76,0.5);
}
.ticket-fab .fab-label { display: inline; }
@media (max-width: 480px) { .ticket-fab .fab-label { display: none; } .ticket-fab { padding: 14px; } }

/* ---- Chest Child Animation ---- */
.chest-child { pointer-events: none; transition: none; }
.chest-child #childHead,
.chest-child #childArms,
.chest-child #childStars { transition: none; }
