@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* Custom Utility Classes & Animations */
:root {
  --primary-navy: #0f172a;
  --secondary-navy: #1e293b;
  --deep-bg: #090d16;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--deep-bg);
  color: #f8fafc;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism effects */
.glass-panel {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-panel-hover {
  transition: all 0.3s ease;
}

.glass-panel-hover:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(6, 182, 212, 0.2);
}

.glass-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Custom Gradients */
.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-rose {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-hero-glow {
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0) 70%),
              radial-gradient(circle at 80% 60%, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0) 60%);
}

.bg-card-gradient {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.glow-cyan {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.glow-amber {
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out 2s infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 5px;
  border: 2px solid #090d16;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Accordion Transition */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease;
  opacity: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #38bdf8;
}

/* Flashcard Flip Animation */
.perspective-1000 {
  perspective: 1000px;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 20rem; /* 320px */
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flashcard-inner.is-flipped {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

/* Front card state */
.flashcard-inner:not(.is-flipped) .flashcard-front {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 20 !important;
  transform: rotateY(0deg) !important;
}

.flashcard-inner:not(.is-flipped) .flashcard-back {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
}

/* Flipped state: Front hides completely, Back displays facing front */
.flashcard-inner.is-flipped .flashcard-front {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
}

.flashcard-inner.is-flipped .flashcard-back {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 20 !important;
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}

.flashcard-back * {
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
}

/* ==========================================
   Kids Mode Visual Styles (.kids-mode)
   ========================================== */
body.kids-mode {
  background-color: #0c0a1d;
  background-image: 
    radial-gradient(at 10% 20%, rgba(244, 63, 94, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(245, 158, 11, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.12) 0px, transparent 50%);
}

body.kids-mode .glass-panel {
  background: rgba(23, 15, 38, 0.85);
  border-color: rgba(244, 63, 94, 0.25);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.25);
}

body.kids-mode .glass-header {
  background: rgba(12, 10, 29, 0.9);
  border-bottom-color: rgba(244, 63, 94, 0.2);
}

body.kids-mode .text-gradient-cyan {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.kids-mode .flashcard-front {
  background: linear-gradient(135deg, #1e1035 0%, #2e104d 100%) !important;
  border: 2px solid rgba(245, 158, 11, 0.4);
}

body.kids-mode .flashcard-back {
  background: linear-gradient(135deg, #3b0764 0%, #1e1b4b 100%) !important;
  border: 2px solid rgba(244, 63, 94, 0.4);
}

