* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(0, 92, 255, 0.12), transparent 38%),
    #02050c;
  color: #eaf3ff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

.preloader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at center, rgba(0, 94, 255, 0.13), transparent 34%),
    #02050c;
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease, visibility 600ms ease;
}

.preloader-mark {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}

.preloader-mark img {
  position: relative;
  z-index: 1;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(0, 111, 255, 0.34));
  animation: loader-logo 2.2s ease-in-out infinite;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(73, 155, 255, 0.12);
  border-top-color: rgba(92, 173, 255, 0.85);
  border-right-color: rgba(41, 123, 255, 0.36);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(0, 102, 255, 0.08);
  animation: loader-spin 1.8s linear infinite;
}

.preloader p {
  margin: 16px 0 12px;
  color: rgba(207, 227, 252, 0.52);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 4px;
}

.preloader-track {
  width: 126px;
  height: 1px;
  overflow: hidden;
  background: rgba(79, 153, 255, 0.12);
}

.preloader-track span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #2790ff, #9bd4ff);
  box-shadow: 0 0 12px #218aff;
  animation: loader-track 1.4s ease-in-out infinite;
}

body.is-ready .preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  will-change: opacity, transform;
  transition: opacity 800ms ease, transform 900ms cubic-bezier(.2,.8,.2,1);
}

.logo-glow {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.2);
  filter: blur(45px);
  animation: glow 5s ease-in-out infinite;
}

.logo {
  position: relative;
  width: clamp(230px, 32vw, 390px);
  height: auto;
  filter:
    drop-shadow(0 26px 38px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 20px rgba(0, 102, 255, 0.24));
  animation: float 6s ease-in-out infinite;
}

.corner-actions {
  position: fixed;
  z-index: 2;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 700ms ease 220ms, transform 700ms cubic-bezier(.2,.8,.2,1) 220ms;
}

body.is-loading main,
body.is-loading .corner-actions {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.about-trigger {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(74, 151, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 15, 31, 0.6);
  color: rgba(178, 207, 244, 0.48);
  font: 600 12px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.about-trigger:hover,
.about-trigger:focus-visible {
  border-color: rgba(74, 151, 255, 0.55);
  color: #89c6ff;
  transform: translateY(-2px);
  outline: none;
}

.credit {
  color: rgba(183, 208, 240, 0.32);
  font: 600 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 1.4px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
}

.credit .domain {
  display: inline-block;
  margin-left: 4px;
  background: linear-gradient(90deg, #3d91ff, #8fd2ff, #4a7dff, #3d91ff);
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: domain-gradient 5s linear infinite;
}

.credit .arrow {
  margin-left: 3px;
  color: rgba(50, 146, 255, 0.55);
}

.credit:hover,
.credit:focus-visible {
  color: rgba(203, 225, 255, 0.8);
  transform: translateY(-2px);
  outline: none;
}

.about-modal {
  width: min(570px, calc(100% - 32px));
  max-height: min(680px, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(72, 152, 255, 0.2);
  border-radius: 20px;
  background: rgba(4, 11, 24, 0.96);
  color: #eaf3ff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72), 0 0 60px rgba(0, 98, 255, 0.1);
  backdrop-filter: blur(24px);
  overscroll-behavior: contain;
}

.about-modal[open] {
  animation: modal-in 260ms cubic-bezier(.2,.8,.2,1);
}

.about-modal::backdrop {
  background: rgba(0, 3, 9, 0.72);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  padding: 42px;
  font-family: Arial, Helvetica, sans-serif;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(66, 145, 255, 0.08);
  color: rgba(207, 226, 252, 0.62);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(66, 145, 255, 0.16);
  color: #ffffff;
  outline: none;
}

.modal-kicker {
  margin: 0 0 11px;
  color: #4e9fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.about-modal h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: -1.5px;
}

.about-modal p:not(.modal-kicker) {
  margin: 0 0 17px;
  color: rgba(207, 222, 244, 0.68);
  font-size: 14px;
  line-height: 1.75;
}

.about-modal strong {
  color: rgba(242, 247, 255, 0.95);
}

.source-link {
  display: inline-block;
  margin-top: 5px;
  color: #62acff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-decoration: none;
  text-transform: uppercase;
}

.source-link:hover,
.source-link:focus-visible {
  color: #a2d0ff;
  outline: none;
}

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

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-logo {
  0%, 100% { opacity: 0.72; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.02); }
}

@keyframes loader-track {
  0% { transform: translateX(-110%); }
  60%, 100% { transform: translateX(250%); }
}

@keyframes glow {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@keyframes domain-gradient {
  to { background-position: 260% center; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .logo {
    width: min(72vw, 300px);
  }

  .corner-actions {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .modal-content {
    padding: 38px 24px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .logo-glow,
  .credit .domain,
  .preloader-mark img,
  .preloader-ring,
  .preloader-track span {
    animation: none;
  }

  main,
  .corner-actions,
  .preloader {
    transition-duration: 0.01ms;
  }
}
