/* ==========================================================================
   Maths Genius Academy — Official Premium Countdown Stylesheet (English Edition)
   ========================================================================== */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono: 'Space Grotesk', 'Inter', monospace;

  /* Color Palette */
  --bg-dark: #060d19;
  --bg-darker: #03070e;
  --primary-blue: #0f75ff;
  --primary-cyan: #38c8ff;
  --accent-glow: #64d7ff;
  --text-main: #f0f7ff;
  --text-muted: #94adc9;
  --text-sub: #5f7a9d;
  
  /* Glass Surface */
  --glass-bg: rgba(10, 24, 46, 0.68);
  --glass-border: rgba(65, 140, 240, 0.24);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  
  /* Shadows & Glows */
  --glow-blue: 0 0 45px rgba(15, 117, 255, 0.35);
  --glow-cyan: 0 0 35px rgba(56, 200, 255, 0.25);
  --card-shadow: 0 32px 90px rgba(0, 5, 15, 0.75), 0 0 1px 1px rgba(65, 140, 240, 0.25);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-darker);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 20px;
}

/* --------------------------------------------------------------------------
   Ambient Background Effects & Particles Canvas
   -------------------------------------------------------------------------- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 580px;
  height: 580px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(15, 117, 255, 0.45) 0%, rgba(15, 117, 255, 0) 70%);
}

.glow-2 {
  width: 680px;
  height: 680px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(56, 200, 255, 0.35) 0%, rgba(56, 200, 255, 0) 70%);
  animation-duration: 22s;
  animation-delay: -5s;
}

.glow-3 {
  width: 480px;
  height: 480px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(30, 80, 160, 0.3) 0%, rgba(10, 25, 50, 0) 70%);
  animation-duration: 15s;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  z-index: 1;
  pointer-events: none;
}

@keyframes floatAmbient {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, 30px) scale(1.1);
  }
  100% {
    transform: translate(-30px, 50px) scale(0.95);
  }
}

/* --------------------------------------------------------------------------
   Layout Container
   -------------------------------------------------------------------------- */
.page-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 960px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}

/* --------------------------------------------------------------------------
   Brand Header & Official Animated Logo
   -------------------------------------------------------------------------- */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px;
  border-radius: 100px;
  background: rgba(15, 117, 255, 0.12);
  border: 1px solid rgba(56, 200, 255, 0.32);
  color: var(--accent-glow);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #38d68c;
  box-shadow: 0 0 10px #38d68c, 0 0 18px #38d68c;
  animation: liveBlink 1.8s infinite ease-in-out;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.brand-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 12px 28px rgba(15, 117, 255, 0.3));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo-container:hover {
  transform: scale(1.03);
}

/* Animated Logo exact styles from mga-academy-site */
.animated-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(390px, 86vw);
  height: clamp(60px, 12vw, 84px);
  flex: 0 0 auto;
}

.animated-logo-part {
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.animated-logo-mark {
  width: clamp(60px, 12vw, 82px);
  flex: 0 0 clamp(60px, 12vw, 82px);
}

.animated-logo-wordmark {
  height: 100%;
  flex: 1 1 auto;
  align-self: center;
  transform: translateX(-10px) scale(1.08);
  transform-origin: left center;
}

.animated-logo-wordmark img {
  object-position: left center;
}

.animated-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Hero Content
   -------------------------------------------------------------------------- */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 820px;
}

.main-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.18;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.main-headline span {
  display: block;
}

.gradient-text {
  background: linear-gradient(135deg, #53c8ff 0%, #a4e1ff 45%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(56, 200, 255, 0.35));
}

.sub-headline {
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.65;
  font-weight: 400;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Countdown Glass Card
   -------------------------------------------------------------------------- */
.countdown-section {
  width: 100%;
  display: flex;
  justify-content: center;
}

.countdown-glass-card {
  position: relative;
  width: 100%;
  max-width: 760px;
  padding: clamp(28px, 5vw, 46px) clamp(18px, 4vw, 38px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.countdown-glass-card:hover {
  border-color: rgba(65, 140, 240, 0.45);
}

.card-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: skewX(-20deg);
  animation: shimmerPass 7s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shimmerPass {
  0% { left: -100%; }
  35% { left: 200%; }
  100% { left: 200%; }
}

/* Countdown Grid */
.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 20px);
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 135px;
}

.time-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  background: linear-gradient(180deg, rgba(16, 36, 68, 0.82) 0%, rgba(8, 20, 40, 0.96) 100%);
  border: 1px solid rgba(80, 160, 255, 0.28);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.time-box:hover {
  transform: translateY(-2px);
  border-color: rgba(80, 180, 255, 0.55);
}

.time-number {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6.2vw, 3.8rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 25px rgba(56, 200, 255, 0.45);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.time-box.is-seconds .time-number {
  color: var(--primary-cyan);
  text-shadow: 0 0 30px rgba(56, 200, 255, 0.65);
}

.time-glow {
  position: absolute;
  bottom: -20px;
  width: 60px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-blue);
  filter: blur(20px);
  opacity: 0.35;
  z-index: 1;
}

.time-box.is-seconds .time-glow {
  background: var(--primary-cyan);
  opacity: 0.55;
}

.time-colon {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: rgba(80, 160, 255, 0.45);
  margin-top: -24px;
  animation: colonPulse 2s ease-in-out infinite;
}

@keyframes colonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.time-label {
  font-size: clamp(0.7rem, 1.4vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-glow);
  text-transform: uppercase;
}

/* Launch Meta Information */
.launch-meta {
  margin-top: clamp(22px, 4vw, 32px);
  padding-top: clamp(16px, 3vw, 22px);
  border-top: 1px solid rgba(80, 160, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: clamp(0.82rem, 1.8vw, 0.94rem);
  color: var(--text-muted);
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  width: 17px;
  height: 17px;
  color: var(--primary-cyan);
}

.meta-pill strong {
  color: #ffffff;
  font-weight: 600;
}

.meta-divider {
  color: rgba(80, 160, 255, 0.4);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.copyright {
  font-size: 0.88rem;
  color: var(--text-sub);
}

.copyright strong {
  color: var(--text-muted);
}

.footer-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(100, 215, 255, 0.7);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  body {
    padding: 24px 12px;
  }

  .page-container {
    gap: 26px;
  }

  .countdown-grid {
    gap: 6px;
  }

  .time-colon {
    font-size: 1.3rem;
    margin-top: -18px;
  }

  .time-box {
    border-radius: 14px;
  }

  .meta-divider {
    display: none;
  }

  .launch-meta {
    flex-direction: column;
    gap: 8px;
  }
}
