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

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease-out;
  -webkit-transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease-out;
  overflow: hidden;
}

.splash-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(25, 118, 210, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  z-index: 1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  height: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  position: relative;
  z-index: 2;
  flex-direction: column;
  animation: fadeInUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.splash-image-container {
  margin-bottom: 30px;
  position: relative;
}

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

.splash-image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 10px 20px rgba(25, 118, 210, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: float 3s ease-in-out infinite;
}

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

.splash-image:hover {
  transform: scale(1.02) translateY(-5px);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.15),
    0 15px 30px rgba(25, 118, 210, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Loading Indicator */
.splash-loader {
  display: flex;
  gap: 8px;
  z-index: 3;
  margin-top: 20px;
}

.loader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  animation: bounce 1.5s infinite ease-in-out;
}

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

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

/* Loader visible on all screens */
.splash-loader {
  display: flex !important;
}

/* Desktop-specific adjustments */
@media (min-width: 768px) {
  .splash-content {
    max-width: 70vw;
    max-height: 70vh;
  }
  
  .splash-image {
    max-width: 70vw;
    max-height: 70vh;
    box-shadow: 
      0 25px 50px rgba(0, 0, 0, 0.12),
      0 15px 30px rgba(25, 118, 210, 0.15),
      inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    border-radius: 20px;
  }
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .splash-content {
    max-width: 60vw;
    max-height: 60vh;
  }
  
  .splash-image {
    max-width: 60vw;
    max-height: 60vh;
    box-shadow: 
      0 30px 60px rgba(0, 0, 0, 0.1),
      0 20px 40px rgba(25, 118, 210, 0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    border-radius: 24px;
  }
}

/* Very large screens */
@media (min-width: 1600px) {
  .splash-content {
    max-width: 50vw;
    max-height: 50vh;
  }
  
  .splash-image {
    max-width: 50vw;
    max-height: 50vh;
    box-shadow: 
      0 35px 70px rgba(0, 0, 0, 0.08),
      0 25px 50px rgba(25, 118, 210, 0.25),
      inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    border-radius: 28px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .splash-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Fix for older browsers */
.splash-screen {
  -ms-flex-align: center;
  -ms-flex-pack: center;
}

.splash-content {
  -ms-flex-align: center;
  -ms-flex-pack: center;
  display: -ms-flexbox;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top left, #e3f2fd 0%, #f4f6fb 40%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.5;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
}
