/* ============================================================
   ครูฝน.Tech — Design System (Glassmorphism / Neon Tech)
   ============================================================ */

::selection { background: rgba(34,229,255,.3); }

html { scroll-behavior: smooth; }

body {
  --glow-cyan: rgba(34, 229, 255, .5);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: linear-gradient(#22e5ff88, #34d39988); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(#22e5ffcc, #34d399cc); }

/* Glass card */
.glass-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.25rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.03);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34,229,255,.5);
  box-shadow: 0 20px 60px -20px rgba(34,229,255,.3), 0 0 0 1px rgba(34,229,255,.1);
}

/* Neon text gradient */
.text-gradient {
  background: linear-gradient(90deg, #0284c7, #059669 55%, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn-neon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: .9rem;
  font-weight: 600;
  font-family: 'Prompt', sans-serif;
  background: linear-gradient(135deg, rgba(34,229,255,.25), rgba(52,211,153,.15));
  border: 1px solid rgba(34,229,255,.6);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(34,229,255,.2);
  transition: all .3s ease;
}
.btn-neon:hover {
  box-shadow: 0 4px 20px rgba(34,229,255,.4), 0 0 40px rgba(34,229,255,.15);
  transform: translateY(-2px);
  border-color: rgba(34,229,255,.8);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: .9rem;
  font-weight: 600;
  font-family: 'Prompt', sans-serif;
  color: #475569;
  border: 1px solid rgba(0,0,0,.1);
  transition: all .3s ease;
}
.btn-ghost:hover {
  color: #0f172a;
  border-color: rgba(0,0,0,.25);
  background: rgba(0,0,0,.04);
}

/* Section badge/eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Prompt', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .35rem .9rem;
  border-radius: 999px;
  color: #0e7490;
  background: rgba(34,229,255,.15);
  border: 1px solid rgba(34,229,255,.4);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Progress ring / bar */
.progress-track { background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg,#22e5ff,#34d399); box-shadow: 0 0 12px rgba(34,229,255,.5); }

/* Quiz choice buttons */
.choice-btn {
  text-align: left;
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: .9rem;
  border: 1px solid rgba(0,0,0,.1);
  background: rgba(0,0,0,.02);
  color: #1e293b;
  transition: all .2s ease;
  font-family: 'Sarabun', sans-serif;
}
.choice-btn:hover:not(:disabled) {
  border-color: rgba(34,229,255,.6);
  background: rgba(34,229,255,.1);
  transform: translateX(4px);
}
.choice-btn.correct { border-color: #34d399; background: rgba(52,211,153,.2); box-shadow: 0 4px 15px rgba(52,211,153,.15); color: #064e3b; }
.choice-btn.wrong { border-color: #f87171; background: rgba(248,113,113,.15); box-shadow: 0 4px 15px rgba(248,113,113,.15); color: #7f1d1d; }
.choice-btn:disabled { cursor: not-allowed; opacity: .7; }

/* Drag & drop match game */
.match-term {
  cursor: grab;
  user-select: none;
}
.match-term:active { cursor: grabbing; }
.match-drop {
  min-height: 4rem;
  border: 2px dashed rgba(0,0,0,.2);
  border-radius: .9rem;
  transition: all .2s ease;
}
.match-drop.drag-over { border-color: #0284c7; background: rgba(34,229,255,.1); }
.match-drop.filled-correct { border-style: solid; border-color: #34d399; background: rgba(52,211,153,.15); }
.match-drop.filled-wrong { border-style: solid; border-color: #f87171; background: rgba(248,113,113,.15); }

/* Timeline (PA showcase) */
.pa-timeline::before {
  content: '';
  position: absolute;
  left: 1.15rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #22e5ff, #34d399, #f2c14e);
  opacity: .4;
}
@media (min-width: 768px) {
  .pa-timeline::before { left: 50%; margin-left: -1px; }
}

/* Focus ring accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #22e5ff;
  outline-offset: 2px;
}

/* ============================================================
   New Effects: Spotlight & Dragging
   ============================================================ */

/* Spotlight Reveal Effect */
.spotlight-card {
  position: relative;
  /* overflow: hidden; */ /* Removing overflow hidden to not clip glowing elements if any */
}
.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(34, 229, 255, 0.25),
    transparent 50%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: multiply;
}
.spotlight-card:hover::after {
  opacity: 1;
}

/* Profile Image Object Position */
#profileImage {
  object-position: var(--obj-x, 50%) var(--obj-y, 50%);
}
#profileImage.is-dragging {
  cursor: grabbing !important;
  transform: scale(1.03);
}

