/* ═══════════════════════════════════════
   ULTRA-THIN XP BAR (old dark header removed)
═══════════════════════════════════════ */
.aurora { display: none; }
.grain  { display: none; }

/* Hide old header elements (kept for compat) */
.top-sticky, .header, .header-stats, .avatar,
.stars-chip, .progress-chip, .xp-strip, .xp-strip-inner { display: none !important; }

.top-xp-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(108,79,246,0.10);
  z-index: 200;
}
.top-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #e879f9, #f59e0b);
  transition: width 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 0 2px 2px 0;
  min-width: 4px;
}

.logo-img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 16px;
  display: block; pointer-events: none;
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
}
.fox-hero {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  pointer-events: none; -webkit-user-drag: none;
  user-select: none; -webkit-user-select: none;
}

/* ═══════════════════════════════════════
   BOTTOM NAV
═══════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 420px;
  height: 62px;
  background: rgba(14, 12, 38, 0.88);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 6px 4px;
  border: none;
  background: none;
  transition: all 0.2s var(--ease);
  position: relative;
  min-width: 44px;
  min-height: 50px;
  font-family: inherit;
}

.nav-icon {
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: background 0.25s var(--ease), transform 0.3s var(--spring);
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.4);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}

.nav-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
  letter-spacing: 0.1px;
}

.nav-item.active .nav-icon {
  transform: scale(1.08);
}

.nav-item[data-sec="home"].active   .nav-icon { background: rgba(124, 58, 237, 0.28); }
.nav-item[data-sec="learn"].active  .nav-icon { background: rgba(219, 39, 119, 0.28); }
.nav-item[data-sec="games"].active  .nav-icon { background: rgba(217, 119, 6, 0.28);  }
.nav-item[data-sec="me"].active     .nav-icon { background: rgba(22, 163, 74, 0.28);  }

.nav-item[data-sec="home"].active   .nav-icon svg { stroke: #a78bfa; }
.nav-item[data-sec="learn"].active  .nav-icon svg { stroke: #f472b6; }
.nav-item[data-sec="games"].active  .nav-icon svg { stroke: #fbbf24; }
.nav-item[data-sec="me"].active     .nav-icon svg { stroke: #4ade80; }

.nav-item[data-sec="home"].active   .nav-label { color: #a78bfa; }
.nav-item[data-sec="learn"].active  .nav-label { color: #f472b6; }
.nav-item[data-sec="games"].active  .nav-label { color: #fbbf24; }
.nav-item[data-sec="me"].active     .nav-label { color: #4ade80; }

.nav-indicator { display: none; }

/* ═══════════════════════════════════════
   FIRST-TIME NAV HINT
═══════════════════════════════════════ */
.nav-hint {
  position: fixed;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 12, 38, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 10px 16px 10px 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.nav-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-hint-text {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  direction: rtl;
}

.nav-hint-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}

/* ═══════════════════════════════════════
   SECTION SYSTEM
═══════════════════════════════════════ */
.section {
  display: none;
  padding: 0 16px;
}

.section.active {
  display: block;
  animation: sectionIn 0.35s var(--ease) both;
}

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ═══════════════════════════════════════
   SPLASH / LOADING SCREEN
═══════════════════════════════════════ */
.splash-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #4936e8 0%, #8b6ff8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10000;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-fox {
  width: 160px;
  height: 160px;
  animation: splash-bounce 1s var(--spring) infinite alternate;
}
.splash-fox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
}
@keyframes splash-bounce {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-14px) scale(1.08); }
}
.splash-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.splash-dots {
  display: flex;
  gap: 8px;
}
.splash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%,80%,100% { transform: scale(0.6); opacity: 0.5; }
  40%          { transform: scale(1);   opacity: 1; }
}

/* ═══════════════════════════════════════
   PULL TO REFRESH
═══════════════════════════════════════ */
#ptrIndicator {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  transition: top 0.35s var(--spring), opacity 0.2s;
  opacity: 0;
}
.ptr-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    0 0 0 2px rgba(155, 111, 248, 0.3),
    0 8px 28px rgba(73, 54, 232, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptr-fox {
  width: 36px;
  height: 36px;
  transition: transform 0.3s var(--spring);
  display: block;
}
#ptrIndicator.ptr-pulling  { opacity: 1; }
#ptrIndicator.ptr-ready .ptr-fox { transform: scale(1.25) rotate(15deg); }
#ptrIndicator.ptr-refreshing .ptr-fox {
  animation: ptrSpin 0.65s linear infinite;
}
@keyframes ptrSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pd-share-btn {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  letter-spacing: 0.02em;
}

/* Parent dashboard — settings & admin */
.pd-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.pd-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-setting-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  direction: rtl;
  min-width: 32px;
  text-align: right;
}
.pd-setting-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  direction: rtl;
}
.pd-setting-input:focus { border-color: var(--primary); }
.pd-action-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  background: var(--primary);
  color: white;
  cursor: pointer;
  white-space: nowrap;
}
.pd-gender-toggle {
  display: flex;
  gap: 8px;
  flex: 1;
}
.pd-gender-btn {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s;
}
.pd-gender-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.pd-danger-label { color: #dc2626 !important; }
.pd-danger-zone {
  background: #fff5f5;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 8px;
}
.pd-danger-desc {
  font-size: 12px;
  color: #7f1d1d;
  direction: rtl;
  margin-bottom: 12px;
  line-height: 1.5;
}
.pd-reset-btn {
  width: 100%;
  border: 2px solid #dc2626;
  border-radius: 12px;
  padding: 11px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  background: white;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.15s;
}


/* ═══════════════════════════════════════
   MONETIZATION UI — HIDDEN
   All payment/premium UI hidden until
   business model is finalized.
═══════════════════════════════════════ */
#storeHomeBtn,
#storeOverlay,
#paywallModal,
#pdPremiumSection,
.cu-premium-locked,
.gcard-premium-locked { display: none !important; }
