/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-container {
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 20px;
}

.video-wrapper {
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.video-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    rgba(79, 70, 229, 0.3) 0%,
    rgba(79, 70, 229, 0) 70%
  );
  filter: blur(40px);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.video-container {
  position: relative;
  max-width: 600px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 80px rgba(79, 70, 229, 0.3);
  border: 3px solid #4f46e5;
  background: #000;
  animation: videoFloat 3s ease-in-out infinite;
}

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

#loading-video {
  width: 100%;
  height: auto;
  display: block;
}

/* Decorative corner accents */
.video-container::before,
.video-container::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid #4f46e5;
  z-index: 1;
  animation: cornerPulse 2s ease-in-out infinite;
}

.video-container::before {
  top: -3px;
  left: -3px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 20px;
}

.video-container::after {
  bottom: -3px;
  right: -3px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 20px;
}

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

.loading-text {
  margin-top: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.loading-title {
  font-size: 36px;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(79, 70, 229, 0.5);
}

.loading-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.loading-dots {
  display: inline-block;
}

.loading-dots span {
  animation: blink 1.4s infinite;
  animation-fill-mode: both;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}

.sound-indicator {
  margin-top: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  background: rgba(79, 70, 229, 0.2);
  border-radius: 50px;
  border: 1px solid rgba(79, 70, 229, 0.3);
  backdrop-filter: blur(10px);
}

.sound-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
}

.sound-bar {
  width: 3px;
  background: #4f46e5;
  border-radius: 2px;
  animation: soundWave 0.8s ease-in-out infinite;
}

.sound-bar:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}

.sound-bar:nth-child(2) {
  height: 14px;
  animation-delay: 0.2s;
}

.sound-bar:nth-child(3) {
  height: 18px;
  animation-delay: 0.4s;
}

.sound-bar:nth-child(4) {
  height: 12px;
  animation-delay: 0.6s;
}

@keyframes soundWave {
  0%,
  100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Skip button */
.skip-button {
  align-self: center;
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  letter-spacing: 0.5px;
}

.skip-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Progress bar */
.progress-bar-container {
  margin-top: 30px;
  width: 100%;
  max-width: 400px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* Initially hide main content */
body.loading #main-content {
  opacity: 0;
}

#main-content {
  transition: opacity 0.5s ease-in;
}

/* Particle effects */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(79, 70, 229, 0.3);
  border-radius: 50%;
  animation: particleFloat 4s ease-in-out infinite;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(50px);
  }
}

.sound-gate-panel {
  margin: 28px auto 0;
  padding: 24px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 560px;
  width: 100%;
  backdrop-filter: blur(12px);
}

.sound-gate-panel.hidden {
  display: none;
}

.sound-gate-title {
  font-size: 19px;
  font-weight: 800;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
}

.sound-gate-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.75);
  max-width: 440px;
}

.sound-gate-note {
  margin: 0;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.sound-gate-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 220px;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(120deg, #4338ca, #6366f1);
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(76, 81, 191, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sound-gate-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.sound-gate-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(76, 81, 191, 0.5);
}

.sound-gate-button-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(99, 102, 241, 0.3));
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.35);
  position: relative;
}

.sound-gate-button-icon::before,
.sound-gate-button-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(79, 70, 229, 0.5);
  width: 70%;
  height: 70%;
}

.sound-gate-button-icon::after {
  width: 100%;
  height: 100%;
  border-color: rgba(99, 102, 241, 0.25);
  animation: gongPulse 1.8s ease-in-out infinite;
}

.sound-gate-button-label {
  position: relative;
  z-index: 1;
}

@keyframes gongPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.7;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .loading-container {
    padding: 15px;
  }

  .video-container {
    max-width: 100%;
    border-radius: 15px;
  }

  .loading-title {
    font-size: 28px;
  }

  .loading-subtitle {
    font-size: 16px;
  }

  .video-container::before,
  .video-container::after {
    width: 30px;
    height: 30px;
  }

  .sound-gate-panel {
    padding: 20px;
  }

  .sound-gate-button {
    width: 100%;
  }

  .skip-button {
    margin-top: 24px;
    padding: 10px 24px;
    font-size: 13px;
  }
}
.loading-slogan {
  font-size: 17px;
  font-weight: 800;
  color: #4f46e5;
  margin: 16px auto 16px;
  padding: 14px 24px;
  background: rgba(79, 70, 229, 0.15);
  border-radius: 12px;
  border: 2px solid rgba(79, 70, 229, 0.3);
  animation: slideInLeft 0.8s ease-out;
  max-width: 95%;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.5;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .loading-slogan {
    font-size: 14px;
    padding: 12px 18px;
    margin: 12px auto;
  }
}