:root {
  --navy: #0f1035;
  --navy-soft: #1a1c4a;
  --cyan: #2dd4bf;
  --purple: #7c3aed;
  --indigo: #4f46e5;
  --white: #ffffff;
  --gray-100: #f4f6fb;
  --gray-400: #94a3b8;
  --gradient: linear-gradient(135deg, var(--cyan) 0%, var(--indigo) 55%, var(--purple) 100%);
  --shadow: 0 24px 60px rgba(15, 16, 53, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--navy);
  background: var(--gray-100);
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Background rings */
.bg-rings {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--gradient) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.08;
  animation: pulse-ring 8s ease-in-out infinite;
}

.ring-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -150px;
}

.ring-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
  animation-delay: -3s;
}

.ring-3 {
  width: 250px;
  height: 250px;
  top: 40%;
  left: 10%;
  animation-delay: -5s;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.06; }
  50% { transform: scale(1.08); opacity: 0.12; }
}

/* Animated bars motif (logo-inspired) */
.bars {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bars span {
  display: block;
  width: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--gradient);
  animation: bar-dance 1.4s ease-in-out infinite;
}

.bars span:nth-child(1)  { height: 28px; animation-delay: 0s; }
.bars span:nth-child(2)  { height: 42px; animation-delay: 0.1s; }
.bars span:nth-child(3)  { height: 55px; animation-delay: 0.2s; }
.bars span:nth-child(4)  { height: 38px; animation-delay: 0.3s; }
.bars span:nth-child(5)  { height: 62px; animation-delay: 0.4s; }
.bars span:nth-child(6)  { height: 48px; animation-delay: 0.5s; }
.bars span:nth-child(7)  { height: 70px; animation-delay: 0.6s; }
.bars span:nth-child(8)  { height: 52px; animation-delay: 0.7s; }
.bars span:nth-child(9)  { height: 36px; animation-delay: 0.8s; }
.bars span:nth-child(10) { height: 58px; animation-delay: 0.9s; }
.bars span:nth-child(11) { height: 44px; animation-delay: 1s; }
.bars span:nth-child(12) { height: 66px; animation-delay: 1.1s; }
.bars span:nth-child(13) { height: 50px; animation-delay: 1.2s; }
.bars span:nth-child(14) { height: 34px; animation-delay: 1.3s; }
.bars span:nth-child(15) { height: 60px; animation-delay: 0.15s; }
.bars span:nth-child(16) { height: 46px; animation-delay: 0.25s; }
.bars span:nth-child(17) { height: 72px; animation-delay: 0.35s; }
.bars span:nth-child(18) { height: 40px; animation-delay: 0.45s; }
.bars span:nth-child(19) { height: 56px; animation-delay: 0.55s; }
.bars span:nth-child(20) { height: 32px; animation-delay: 0.65s; }

@keyframes bar-dance {
  0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Language switcher */
.lang-switcher {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: fade-down 0.8s ease 0.2s both;
}

.lang-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.25s, background 0.25s;
}

.lang-btn:hover {
  color: var(--navy);
}

.lang-btn.active {
  color: var(--white);
  background: var(--navy);
}

.lang-divider {
  color: #e2e8f0;
  font-size: 0.75rem;
  user-select: none;
}

/* Main content */
.container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  padding: 48px 32px;
  margin: 24px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  animation: fade-up 1s ease both;
}

.logo-wrap {
  margin-bottom: 28px;
  animation: fade-up 0.9s ease 0.15s both;
}

.logo {
  max-width: min(280px, 70vw);
  height: auto;
  animation: logo-float 4s ease-in-out infinite;
}

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

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gradient);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  animation: fade-up 0.9s ease 0.3s both;
}

.title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  animation: fade-up 0.9s ease 0.4s both;
}

.subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  color: var(--gray-400);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 32px;
  animation: fade-up 0.9s ease 0.5s both;
}

/* Progress indicator */
.progress {
  margin-bottom: 28px;
  animation: fade-up 0.9s ease 0.6s both;
}

.progress-track {
  height: 4px;
  background: #e8ecf4;
  border-radius: 999px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto 16px;
}

.progress-fill {
  height: 100%;
  width: 40%;
  background: var(--gradient);
  border-radius: 999px;
  animation: progress-slide 2.5s ease-in-out infinite;
}

@keyframes progress-slide {
  0% { width: 15%; margin-left: 0; }
  50% { width: 55%; margin-left: 25%; }
  100% { width: 15%; margin-left: 85%; }
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: background 0.4s, transform 0.4s;
}

.dot.active {
  background: var(--indigo);
  transform: scale(1.2);
}

.footer-note {
  font-size: 0.85rem;
  color: var(--gray-400);
  animation: fade-up 0.9s ease 0.7s both;
}

/* Entrance animations */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Text transition on language switch */
[data-i18n] {
  transition: opacity 0.3s ease;
}

[data-i18n].switching {
  opacity: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 36px 24px;
    border-radius: 20px;
  }

  .lang-switcher {
    top: 16px;
    right: 16px;
  }

  .bars {
    gap: 4px;
    height: 50px;
  }

  .bars span {
    width: 3px;
  }
}

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