/* ============================================================
   RoboEdu Vietnam — main.css
   Custom utilities that complement TailwindCSS CDN.
   ============================================================ */

/* === BASE ================================================= */
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: #FBF8F3; color: #4A4A6A; overflow-x: hidden; }

/* === NAVBAR =============================================== */
#nav {
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#nav.nav-scrolled {
  background-color: #fff;
  box-shadow: 6px 6px 16px rgba(163,153,140,0.18), -2px -2px 8px rgba(255,255,255,0.60);
}

/* === NEUMORPHISM =========================================== */
.neu    { background: #F0EDE8; box-shadow:  8px  8px 20px rgba(163,153,140,.35), -8px  -8px 20px rgba(255,255,255,.82); }
.neu-sm { background: #F0EDE8; box-shadow:  5px  5px 13px rgba(163,153,140,.30), -5px  -5px 13px rgba(255,255,255,.78); }
.neu-lg { background: #F0EDE8; box-shadow: 12px 12px 30px rgba(163,153,140,.42), -12px -12px 30px rgba(255,255,255,.88); }
.neu-in { background: #F0EDE8; box-shadow: inset 4px 4px 10px rgba(163,153,140,.28), inset -4px -4px 10px rgba(255,255,255,.72); }

/* === GLASS ================================================ */
.glass  {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255,255,255,.80);
  box-shadow: 0 8px 32px rgba(26,26,46,.07);
}
.glass-c {
  background: rgba(255,255,255,.20);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.34);
}

/* === BUTTON SHIMMER ======================================= */
.btn-shim { position: relative; overflow: hidden; }
.btn-shim::after {
  content: ''; position: absolute; top: -50%; left: -80%; width: 48%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-22deg);
  animation: shim 4s ease-in-out infinite;
}

/* === DOT GRID ============================================= */
.dot-grid {
  background-image: radial-gradient(circle, rgba(124,92,191,.14) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

/* === GRADIENT TEXT ======================================== */
.gt-warm  { background: linear-gradient(135deg, #FF6B35, #FF8C42);           -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gt-cool  { background: linear-gradient(135deg, #FF6B35, #7C5CBF, #22D3EE); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gt-green { background: linear-gradient(135deg, #6BCB77, #22D3EE);           -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* === ACCENT UNDERLINE ===================================== */
.accent-ul { position: relative; display: inline-block; }
.accent-ul::after {
  content: ''; position: absolute; bottom: 3px; left: 0; right: 0;
  height: 6px; background: #FFD93D; border-radius: 3px; z-index: -1; opacity: .65;
}

/* === SCROLLBAR ============================================ */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #F0EDE8; }
::-webkit-scrollbar-thumb { background: rgba(255,107,53,.4); border-radius: 9px; }

#modal-comp ::-webkit-scrollbar-thumb { background: rgba(124,92,191,.45); }

/* === FOCUS ================================================ */
:focus-visible { outline: 2.5px solid #FF6B35; outline-offset: 3px; border-radius: 6px; }

/* === STAT LABELS: swap text below 490px =================== */
.stat-short { display: none; }
@media (max-width: 489px) {
  .stat-long  { display: none; }
  .stat-short { display: inline; }
}

/* === FEATURE CARD: mobile — icon + title inline =========== */
.feature-top-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.feature-icon > div:first-child { margin-bottom: 6px; }
.feature-icon > div:last-child  { margin-bottom: 0; }

@media (min-width: 900px) {
  .feature-top-title              { display: block; margin-bottom: 0; }
  .feature-icon > div:first-child { margin-bottom: 1.5rem; }
  .feature-icon > div:last-child  { margin-bottom: 1.25rem; }
}

/* === ACCOUNT TOP DRAWER ================================== */
#tai-khoan {
  transform: translateY(-100%);
  /*transition: transform .38s cubic-bezier(.34,1.56,.64,1);*/ /* use animation `Overshoot` */
  transition: transform .42s cubic-bezier(0.16, 1, 0.3, 1); /* use animation `Ease` */
}
#tai-khoan.tk-open { transform: translateY(0); }
#tk-overlay { transition: opacity .3s; }
#tk-overlay.tk-overlay-open { opacity: 1 !important; pointer-events: auto !important; }

/* === REDUCED MOTION ======================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* === OTP INPUTS =========================================== */
.otp-input {
  width: 48px; height: 52px; border-radius: 14px;
  text-align: center;
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 20px;
  color: #1A1A2E; caret-color: #FF6B35; outline: none;
  border: 2px solid #E8E5DF; background: #F0EDE8;
  box-shadow: inset 4px 4px 10px rgba(163,153,140,.28), inset -4px -4px 10px rgba(255,255,255,.72);
  transition: border-color .2s, box-shadow .2s;
}
.otp-input:focus {
  border-color: rgba(255,107,53,.5);
  box-shadow: inset 4px 4px 10px rgba(163,153,140,.28), inset -4px -4px 10px rgba(255,255,255,.72), 0 0 0 3px rgba(255,107,53,.14);
}
.otp-input.filled { border-color: rgba(255,107,53,.4); background: #FFF4F0; }

/* === MODALS =============================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,46,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-box {
  width: 100%; background: #fff;
  border-radius: 2rem; overflow: hidden;
  position: relative; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(26,26,46,.22);
}
.dot-grid-dark {
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(.80); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes confettiDrop {
  from { transform: translateY(0) rotate(0deg); opacity: 1; }
  to   { transform: translateY(300px) rotate(720deg); opacity: 0; }
}
.animate-slide-up { animation: modalSlideUp .42s cubic-bezier(.34,1.56,.64,1) both; }
.animate-pop-in   { animation: modalPopIn .5s cubic-bezier(.34,1.56,.64,1) both; }
.confetti-piece {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  animation: confettiDrop 1.2s ease-out forwards; pointer-events: none;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-6px); }
  40%, 80%  { transform: translateX(6px); }
}
.animate-shake { animation: shake .4s ease both; }
.input-error {
  box-shadow: inset 4px 4px 10px rgba(163,153,140,.28), inset -4px -4px 10px rgba(255,255,255,.72),
              0 0 0 2.5px rgba(239,68,68,.30) !important;
  background-color: #fff8f8 !important;
}

/* === NEWSLETTER INPUT — always transparent ================ */
#nl-email,
#nl-email:hover,
#nl-email:focus,
#nl-email:active {
  background-color: transparent !important;
  background-image: none !important;
  caret-color: #fff !important;
  color: #fff !important;
}
#nl-email:-webkit-autofill,
#nl-email:-webkit-autofill:hover,
#nl-email:-webkit-autofill:focus,
#nl-email:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: #fff !important;
  transition: background-color 9999s ease-in-out 0s;
}
