/* Pre-loader Styles for My Venue */
:root {
  --primary-color: #990033;
  --secondary-color: #cc0044;
  --background-color: #ffffff;
  --text-color: #333333;
  --light-gray: #f5f5f5;
  --progress-bg: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Varela Round", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Pre-loader Container */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Logo Container */
.logo-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 40px;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: logoAnimation 2s ease-in-out infinite;
}

/* Logo Animation */
@keyframes logoAnimation {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1);
  }
  50% {
    transform: scale(1.1) rotate(-1deg);
    filter: brightness(1.2);
  }
  75% {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1);
  }
}

/* Pulse Ring Animation */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Progress Container */
.progress-container {
  width: 300px;
  max-width: 80%;
  margin-bottom: 30px;
}

/* Progress Bar */
.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background-color: var(--progress-bg);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

/* Shimmer Effect */
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

/* Percentage Text */
.percentage {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 1px;
}

/* Loading Message */
.loading-message {
  text-align: center;
  color: var(--text-color);
  font-size: 14px;
  margin-top: 20px;
  min-height: 20px;
  opacity: 0.8;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* App Name */
.app-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.app-tagline {
  font-size: 14px;
  color: #666;
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Loading Dots Animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Error State */
.error-container {
  text-align: center;
  padding: 20px;
}

.error-icon {
  font-size: 48px;
  color: #dc3545;
  margin-bottom: 20px;
}

.error-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
}

.error-message {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.retry-button {
  padding: 10px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.retry-button:hover {
  background-color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo-container {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
  }
  
  .app-name {
    font-size: 20px;
  }
  
  .app-tagline {
    font-size: 12px;
  }
  
  .progress-container {
    width: 250px;
  }
  
  .loading-message {
    font-size: 12px;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .logo,
  .pulse-ring,
  .progress-bar::after,
  .loading-message {
    animation: none;
  }
  
  .progress-bar {
    transition: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --light-gray: #2a2a2a;
    --progress-bg: #333333;
  }
  
  .preloader {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  }
  
  .app-tagline {
    color: #999;
  }
  
  .error-message {
    color: #999;
  }
}