/* ============================================
   WAKAO LOADING SCREEN STYLES
   Beautiful, theme-aware loading screen
   ============================================ */

/* CSS Variables for Theme Support */
:root {
  /* Light Theme Colors - Full White Design */
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-pattern: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --accent-primary: #007bff;
  --accent-secondary: #0056b3;
  --border-color: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --glow-color: rgba(0, 123, 255, 0.3);
}

[data-theme="dark"] {
  /* Dark Theme Colors - Still Full White for Loading */
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-pattern: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --accent-primary: #007bff;
  --accent-secondary: #0056b3;
  --border-color: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --glow-color: rgba(0, 123, 255, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Force center everything */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Container */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Background Pattern - Removed for clean white design */

/* Main Content */
.loading-content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  animation: fadeInUp 1s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Section */
.logo-section {
  margin-bottom: 3rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.logo {
  width: 200px;
  height: 200px;
  border-radius: 40px;
  box-shadow: 0 12px 48px var(--shadow-color);
  animation: logoFloat 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

.app-title {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}

.app-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Loading Progress */
.loading-progress {
  margin-bottom: 3rem;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

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

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Loading Steps - Removed for simplified design */

/* Additional Loading Bar - Removed for single loading bar design */

/* Footer - Removed for simplified design */

/* Responsive Design */
@media (max-width: 768px) {
  .app-title {
    font-size: 3rem;
  }
  
  .logo {
    width: 160px;
    height: 160px;
  }
  
  .logo-glow {
    width: 200px;
    height: 200px;
  }
  
  .app-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .app-title {
    font-size: 2.5rem;
  }
  
  .app-subtitle {
    font-size: 1rem;
  }
  
  .logo {
    width: 140px;
    height: 140px;
  }
  
  .logo-glow {
    width: 180px;
    height: 180px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --shadow-color: rgba(0, 0, 0, 0.3);
  }
  
  [data-theme="dark"] {
    --border-color: #ffffff;
    --shadow-color: rgba(255, 255, 255, 0.3);
  }
}
