/* ===================================================================
   Jastip Nippon Webmail (mail.jastipnippon.com)
   Ultra-Smooth, Lightweight Monochrome Redirect Page
   100% Hardware-Accelerated (Zero Lag, Super Low CPU/Memory)
   =================================================================== */

:root {
  --bg-dark: #08080a;
  --bg-card: rgba(18, 18, 22, 0.88);
  --bg-card-border: rgba(255, 255, 255, 0.12);
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  
  --shadow-elevation: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 
                      0 0 0 1px rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Radial Glow (Static, GPU Composited) */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Lightweight CSS Ambient Stars (0% CPU, Pure GPU Transform) */
.stars-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.25;
  will-change: transform, opacity;
  animation: starTwinkle 5s ease-in-out infinite alternate;
}

.star-1 { width: 3px; height: 3px; top: 18%; left: 22%; animation-duration: 4s; }
.star-2 { width: 2px; height: 2px; top: 28%; right: 25%; animation-duration: 6s; opacity: 0.15; }
.star-3 { width: 4px; height: 4px; bottom: 22%; left: 30%; animation-duration: 5s; opacity: 0.2; }
.star-4 { width: 2px; height: 2px; bottom: 30%; right: 20%; animation-duration: 7s; opacity: 0.3; }
.star-5 { width: 3px; height: 3px; top: 65%; left: 18%; animation-duration: 4.5s; opacity: 0.15; }
.star-6 { width: 3px; height: 3px; top: 12%; right: 35%; animation-duration: 5.5s; opacity: 0.25; }

@keyframes starTwinkle {
  0% { transform: scale(0.8); opacity: 0.15; }
  100% { transform: scale(1.2); opacity: 0.45; }
}

/* Main Container */
.redirect-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

/* Glassmorphism Card (Lightweight, No Heavy Loops) */
.redirect-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--bg-card-border);
  border-radius: 26px;
  padding: 38px 30px 30px;
  box-shadow: var(--shadow-elevation);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle Top Edge Highlight */
.redirect-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Top Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 500;
  color: #e4e4e7;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* Icon Stage */
.icon-stage {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

/* Radar Ripples (Optimized Scale & Opacity Only) */
.radar-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
  will-change: transform, opacity;
  animation: rippleGpu 3s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.ripple-1 { width: 84px; height: 84px; animation-delay: 0s; }
.ripple-2 { width: 84px; height: 84px; animation-delay: 1.5s; }

@keyframes rippleGpu {
  0% {
    transform: translate3d(0, 0, 0) scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.65);
    opacity: 0;
  }
}

/* Orbit Ring with Beacon */
.orbit-ring {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  pointer-events: none;
  will-change: transform;
  animation: spinGpu 9s linear infinite;
}

.orbit-satellite {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffffff;
}

@keyframes spinGpu {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Email Icon Circle */
.icon-circle {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  will-change: transform;
  animation: levitateGpu 3.5s ease-in-out infinite alternate;
}

@keyframes levitateGpu {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -4px, 0); }
}

.email-icon {
  width: 30px;
  height: 30px;
}

/* Arrow Indicator */
.arrow-indicator {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.arrow-indicator svg {
  width: 14px;
  height: 14px;
}

/* Card Header */
.card-header {
  margin-bottom: 24px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 340px;
  margin: 0 auto;
}

/* Progress Section */
.progress-section {
  width: 100%;
  margin-bottom: 26px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.countdown-text strong {
  color: #ffffff;
  font-weight: 600;
  display: inline-block;
  min-width: 12px;
  text-align: center;
}

.percentage-text {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #ffffff;
}

/* Progress Track & ScaleX GPU Bar */
.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #71717a 0%, #e4e4e7 60%, #ffffff 100%);
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* Card Footer */
.card-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.security-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.security-tag svg {
  width: 14px;
  height: 14px;
  color: #a1a1aa;
}

/* Exit Transition when Redirect Triggers */
.redirecting-out {
  opacity: 0.4;
  transform: translate3d(0, -6px, 0) scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .redirect-container {
    padding: 16px;
  }
  
  .redirect-card {
    padding: 30px 18px 24px;
    border-radius: 22px;
  }
  
  .card-title {
    font-size: 1.38rem;
  }
  
  .card-subtitle {
    font-size: 0.82rem;
  }
}
