/* ═══════════════════════════════════════════════════════════
   RESET & BASE — Global Reset + Animations
   GeniusHub v20.0
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--txt);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

::selection { background: rgba(77, 142, 247, .25); }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .08);
  border-radius: 99px;
}

button {
  font-family: var(--f);
  cursor: pointer;
  -webkit-appearance: none;
}

input, textarea {
  font-family: var(--f);
  -webkit-appearance: none;
  border-radius: 0;
}

/* iOS Touch Fix */
button, .bg, .bp, .nt {
  -webkit-tap-highlight-color: transparent;
}

/* Touch targets (44px min) + iOS zoom prevention */
button, select { min-height: 44px; }
input, textarea { min-height: 44px; font-size: 16px; }


/* ── Loader ── */
#ld {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s;
}
#ld.out { opacity: 0; pointer-events: none; }
#ld .logo {
  font-family: var(--s);
  font-size: 32px;
  font-weight: 700;
  background: var(--g1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 1.5s ease-in-out infinite;
}


/* ── Animations ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(20px, -15px); }
  100% { transform: translate(-10px, 10px); }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@keyframes betaGlow {
  0%, 100% { opacity: .7; box-shadow: 0 0 12px rgba(160, 122, 240, .15); }
  50%      { opacity: 1;  box-shadow: 0 0 24px rgba(160, 122, 240, .3); }
}

@keyframes blockIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes barFill {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Math page transitions */
@keyframes mathOutUp {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-30px); }
}
@keyframes mathInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mathOutDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(30px); }
}
@keyframes mathInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
