/* Handoff note for the new developer team: review this file carefully before making changes. */
/* ===========================================
   PROFESSIONAL SPLASH SCREEN - NeoLife Wellness
   Developed by: Anirudha
   Date: April 8, 2026
   =========================================== */

:root {
  --splash-primary: #2F4F2F;
  --splash-accent: #FF6A00;
  --splash-gradient-start: #e8fff2;
  --splash-gradient-end: #c3efd8;
  --splash-text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== SPLASH SCREEN OVERLAY ===== */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--splash-gradient-start) 0%, var(--splash-gradient-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(2px);
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ===== SPLASH CONTENT CONTAINER ===== */
.splash-content {
  text-align: center;
  max-width: 600px;
  padding: 2rem;
  animation: splashFadeIn 0.8s ease-out;
}

@keyframes splashFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== LOGO CONTAINER ===== */
.splash-logo {
  margin-bottom: 2rem;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.splash-logo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(47, 79, 47, 0.2);
  border: 4px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.splash-logo img:hover {
  transform: scale(1.1);
  box-shadow: 0 25px 50px rgba(47, 79, 47, 0.3);
}

/* ===== BRAND NAME ===== */
.splash-brand {
  margin-bottom: 1rem;
}

.splash-brand h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--splash-primary);
  text-shadow: var(--splash-text-shadow);
  margin: 0;
  letter-spacing: -0.02em;
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% {
    text-shadow: var(--splash-text-shadow);
  }
  100% {
    text-shadow: var(--splash-text-shadow), 0 0 20px rgba(47, 79, 47, 0.3);
  }
}

.splash-brand .subtitle {
  font-size: 1.2rem;
  color: #1f5d3a;
  font-weight: 500;
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* ===== LOADING ANIMATION ===== */
.splash-loader {
  margin: 2rem 0;
  position: relative;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(47, 79, 47, 0.1);
  border-top: 4px solid var(--splash-primary);
  border-right: 4px solid var(--splash-accent);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 1rem;
  position: relative;
}

.loading-spinner::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 4px solid transparent;
  border-top: 4px solid rgba(255, 106, 0, 0.3);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
}

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

/* ===== PROGRESS BAR ===== */
.progress-container {
  width: 300px;
  height: 6px;
  background: rgba(47, 79, 47, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--splash-primary) 0%, var(--splash-accent) 100%);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== LOADING TEXT ===== */
.loading-text {
  font-size: 1rem;
  color: var(--splash-primary);
  font-weight: 500;
  margin-top: 1rem;
  animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== WELCOME MESSAGE ===== */
.welcome-message {
  margin-top: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-message p {
  font-size: 0.95rem;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  bottom: 15%;
  left: 20%;
  animation-delay: 4s;
}

.floating-element:nth-child(4) {
  bottom: 25%;
  right: 10%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.floating-element i {
  font-size: 2rem;
  color: var(--splash-primary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .splash-content {
    padding: 1.5rem;
    max-width: 90vw;
  }

  .splash-brand h1 {
    font-size: 2.5rem;
  }

  .splash-brand .subtitle {
    font-size: 1rem;
  }

  .loading-spinner {
    width: 60px;
    height: 60px;
  }

  .progress-container {
    width: 250px;
  }

  .splash-logo img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .splash-brand h1 {
    font-size: 2rem;
  }

  .progress-container {
    width: 200px;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .splash-logo,
  .loading-spinner,
  .loading-text,
  .floating-element,
  .progress-bar::after {
    animation: none !important;
  }

  #splash-screen {
    transition: opacity 0.3s ease;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  #splash-screen {
    background: white;
  }

  .splash-brand h1 {
    color: black;
  }

  .loading-spinner {
    border-color: black;
    border-top-color: var(--splash-primary);
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  #splash-screen {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }

  .splash-brand h1 {
    color: #f9fafb;
  }

  .splash-brand .subtitle,
  .loading-text,
  .welcome-message p {
    color: #d1d5db;
  }

  .progress-container {
    background: rgba(255, 255, 255, 0.1);
  }
}