@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=Quicksand:wght@500;600;700;800&display=swap');

:root {
  --primary-font: 'Nunito', 'Quicksand', system-ui, -apple-system, sans-serif;
  --display-font: 'Baloo 2', 'Nunito', cursive;
}

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

body {
  font-family: var(--primary-font);
  background: #e2e8f0;
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 100vh;
}

@media (min-width: 640px) {
  body {
    background: radial-gradient(circle at top, #bae6fd 0%, #cbd5e1 100%);
  }
}

h1, h2, h3, h4, .font-display {
  font-family: var(--display-font);
}

/* App Container (Strict Non-Overlapping Mobile Frame) */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, #38bdf8 0%, #7dd3fc 15%, #f0f9ff 35%, #f8fafc 100%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* 3D Grid Card Buttons - Guaranteed No Overlap */
.grid-card-btn {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 16px -3px rgba(0, 0, 0, 0.15);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.grid-card-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.22);
}

.grid-card-btn:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.2);
}

.grid-card-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero Section (Non-overlapping structured card) */
.hero-wrapper {
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 50%, #fef3c7 100%);
  border: 3px solid #fde047;
  border-radius: 28px;
  box-shadow: 0 10px 20px -4px rgba(234, 179, 8, 0.3);
}

/* 3D Play Button */
.btn-hoc-ngay {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 4px 0 #15803d, 0 6px 12px rgba(22, 163, 74, 0.35);
  transition: all 0.12s ease;
}

.btn-hoc-ngay:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #15803d, 0 2px 4px rgba(22, 163, 74, 0.2);
}

/* Bottom Nav */
.bottom-bar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 -8px 20px -4px rgba(0, 0, 0, 0.08);
}

.nav-pill-active {
  background: #fce7f3;
  color: #db2777;
  border-radius: 18px;
}

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

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

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(234, 179, 8, 0.4)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.8)); }
}

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

/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
