/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0e1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1f2e 0%, #0a0e1a 50%, #1a1f2e 100%);
  opacity: 0;
  display: none;
  transition: opacity 0.3s ease;
}

.loading-bg.loaded {
  background-image: url('loading-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Show background only on mobile */
@media (max-width: 768px) {
  .loading-bg {
    display: block;
    opacity: 1;
  }
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 26, 0.3);
}

.loading-box {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 600px;
  width: 90%;
}

.loading-bar-container {
  width: 100%;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  border: 4px solid var(--color-green);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 
    0 0 30px rgba(0, 255, 65, 0.6),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--color-green) 0%, 
    var(--color-cyan) 50%, 
    var(--color-green) 100%);
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.3s ease;
  animation: shimmer 2s linear infinite;
  box-shadow: 0 0 30px var(--color-green);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--color-green);
  text-shadow: 0 0 10px var(--color-green);
  margin-bottom: 30px;
}

.loading-tips {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: var(--color-yellow);
  line-height: 1.8;
  min-height: 50px;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .loading-bar-container {
    height: 35px;
  }
  
  .loading-text {
    font-size: 12px;
  }
  
  .loading-tips {
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .loading-bar-container {
    height: 30px;
  }
  
  .loading-text {
    font-size: 10px;
  }
  
  .loading-tips {
    font-size: 7px;
  }
}
