/* ==========================================================================
   STEM ATTENTION MASTERY WEBSITE DESIGN SYSTEM
   Project: "LÀM CHỦ SỰ CHÚ Ý TRONG KỈ NGUYÊN SỐ" (tremc.online)
   Theme: Professional Neo-Educational Infographic Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=Caveat:wght@600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Infographic Core Palette */
  --primary: #0284c7;        /* Sky Blue */
  --primary-dark: #0369a1;   /* Darker Sky Blue */
  --primary-light: #e0f2fe;  /* Sky 100 */
  --dark: #0f172a;           /* Slate Navy 900 */
  --slate-body: #1e293b;     /* Slate 800 */
  --light: #f8fafc;          /* Slate 50 */
  
  /* Accent Colors */
  --accent-teal: #0d9488;    /* Teal (Habits & Film 2) */
  --accent-gold: #f59e0b;    /* Warm Amber (Film 3 & Quotes) */
  --accent-purple: #9333ea;  /* Purple (Film 4 & Digital Agency) */
  --accent-emerald: #10b981; /* Emerald (7-Day Success & Growth) */
  --accent-rose: #f43f5e;    /* Rose (Urgent warnings) */
}

/* ================= Base Styles & Overflow Prevention ================= */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  color: var(--slate-body);
  background-color: var(--light);
}

/* Typography Helpers */
.font-outfit {
  font-family: 'Outfit', sans-serif;
}

.font-calligraphy {
  font-family: 'Caveat', cursive;
}

/* ================= Glassmorphism ================= */
.glass-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(224, 242, 254, 0.85);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

/* ================= Gradients ================= */
.gradient-hero-title {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-sky-bar {
  background: linear-gradient(90deg, #0284c7, #06b6d4, #38bdf8);
}

/* ================= Badges ================= */
.badge-circle {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.3);
  flex-shrink: 0;
}

/* Format Badges (PDF, DOCX, ZIP) */
.format-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 0.375rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.format-badge-pdf {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
.format-badge-docx {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.format-badge-zip {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

/* ================= Visitor Counter UI ================= */
.live-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #10b981;
  animation: pulseGreen 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseGreen {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
}

/* Digital Counter Display Boxes in Footer */
.counter-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 12px rgba(2, 132, 199, 0.2);
}

.counter-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

/* ================= Custom Scrollbar ================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ================= Video Player & Modal Glow ================= */
.video-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(2, 132, 199, 0.15), 0 8px 10px -6px rgba(2, 132, 199, 0.1);
}

/* ================= Hover Effects ================= */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 26px -6px rgba(15, 23, 42, 0.08), 0 8px 12px -6px rgba(15, 23, 42, 0.04);
}

/* ================= 7-Day Challenge States ================= */
.challenge-item {
  transition: all 0.25s ease-in-out;
}
.challenge-item.completed {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.challenge-item.completed .day-title {
  text-decoration: line-through;
  color: #047857;
}

/* Search Highlights */
mark.highlight {
  background-color: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
}

/* Custom Floating Animation */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-gentle {
  animation: floatGentle 4s infinite ease-in-out;
}

/* Trophy Glow Effect */
@keyframes trophyGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.8);
  }
}
.trophy-glow {
  animation: trophyGlow 2.5s infinite ease-in-out;
}
