:root {
  --bg: #02060b;
  --text: #f5f7fa;
  --muted: #95a4b8;
  --cyan: #4fdcff;
  --cyan-strong: #25dfff;
  --panel: rgba(10, 18, 28, 0.72);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 40%, rgba(27, 88, 125, 0.18), transparent 28%),
    linear-gradient(180deg, #010409 0%, #02060b 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow: hidden;
}

/* Background Grid */
.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.07;
  pointer-events: none;
}

/* Ambient Glows */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: floatGlow 7s ease-in-out infinite;
}

.glow-1 {
  width: 320px;
  height: 320px;
  background: rgba(79, 220, 255, 0.12);
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.glow-2 {
  width: 220px;
  height: 220px;
  background: rgba(79, 220, 255, 0.06);
  bottom: 10%;
  right: 12%;
  animation-delay: 1.2s;
}

@keyframes floatGlow {
  0%, 100% {
    transform: translateY(0px);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.78;
  }
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(31, 110, 156, 0.18), transparent 34%),
    linear-gradient(180deg, #010409 0%, #02060b 100%);
}

.splash-screen.fade-out {
  animation: splashFadeOut 0.8s ease forwards;
}

@keyframes splashFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.splash-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.splash-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 28px;
  position: relative;
  z-index: 2;
  animation: splashPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(79, 220, 255, 0.35));
}

.splash-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(79, 220, 255, 0.2);
  box-shadow:
    0 0 25px rgba(79, 220, 255, 0.15),
    inset 0 0 25px rgba(79, 220, 255, 0.08);
  animation: ringPulse 2.2s ease-in-out infinite;
  top: -34px;
}

.splash-title {
  margin-top: 24px;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 0 24px rgba(79, 220, 255, 0.08);
}

.splash-subtitle {
  margin-top: 8px;
  color: #8fa3b8;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes splashPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.95;
  }
}

@keyframes ringPulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.95;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(79, 220, 255, 0.12), transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* Landing Brand */
.landing-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 24px 18px;
  margin-bottom: 8px;
}

.landing-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 24px;
  margin-bottom: 18px;
  box-shadow:
    0 0 25px rgba(0, 191, 255, 0.35),
    0 0 60px rgba(0, 191, 255, 0.15);
  animation: logoHoverGlow 3s ease-in-out infinite;
}

@keyframes logoHoverGlow {
  0%, 100% {
    transform: translateY(0px) scale(1);
    box-shadow:
      0 0 25px rgba(0, 191, 255, 0.35),
      0 0 60px rgba(0, 191, 255, 0.15);
  }
  50% {
    transform: translateY(-4px) scale(1.015);
    box-shadow:
      0 0 34px rgba(0, 191, 255, 0.5),
      0 0 70px rgba(0, 191, 255, 0.2);
  }
}

.landing-brand h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.tm {
  font-size: 0.32em;
  vertical-align: top;
  margin-left: 3px;
  opacity: 0.9;
}

.tagline {
  margin: 14px 0 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: #9fb3c8;
  letter-spacing: 0.04em;
  max-width: 420px;
  line-height: 1.5;
}

/* Button Group */
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 18px 28px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.18s ease;
  backdrop-filter: blur(14px);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, #5fe6ff 0%, #2ec4e6 100%);
  color: #021018;
  box-shadow:
    0 0 30px rgba(79, 220, 255, 0.35),
    inset 0 0 8px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  box-shadow:
    0 0 40px rgba(79, 220, 255, 0.45),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(79, 220, 255, 0.06);
}

.btn-secondary:hover {
  border-color: rgba(79, 220, 255, 0.35);
  box-shadow: 0 0 18px rgba(79, 220, 255, 0.12);
}

/* Authenticity Badge */
.auth-badge {
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(79, 220, 255, 0.08);
  border: 1px solid rgba(79, 220, 255, 0.25);
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

/* Status */
.system-status {
  margin-top: 22px;
  font-size: 0.85rem;
  color: #7fa0bc;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  max-width: 520px;
  line-height: 1.6;
}

/* Footer */
.footer-links {
  position: fixed;
  bottom: 16px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 18px;
  z-index: 2;
  opacity: 0.7;
}

.footer-links a {
  color: #8ea0b5;
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: white;
}

/* Entrance Animations */
.hero-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.is-ready .hero-reveal {
  animation: revealUp 0.8s ease forwards;
}

.is-ready .hero-reveal-1 { animation-delay: 0.1s; }
.is-ready .hero-reveal-2 { animation-delay: 0.2s; }
.is-ready .hero-reveal-3 { animation-delay: 0.3s; }
.is-ready .hero-reveal-4 { animation-delay: 0.4s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .landing-logo {
    width: 92px;
    height: 92px;
    border-radius: 20px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .btn {
    width: 100%;
  }

  .auth-badge {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .system-status {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }

  .footer-links {
    bottom: 20px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glow,
  .landing-logo,
  .splash-logo,
  .splash-ring,
  .is-ready .hero-reveal {
    animation: none !important;
    transition: none !important;
  }
}