﻿:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top left, #07111f 0%, #030713 45%, #01020a 100%);
  color: #f7f9ff;
  position: relative;
  cursor: pointer;
}

body.loaded .loading-screen {
  opacity: 0;
  transform: translateY(-16px) scale(0.97);
  pointer-events: none;
}

body.loaded .hint {
  opacity: 0;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.8;
  animation: twinkle var(--duration) ease-in-out infinite alternate;
  box-shadow: 0 0 6px rgba(255,255,255,0.8);
}

.loading-screen {
  position: relative;
  z-index: 2;
  width: min(92vw, 480px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  transition: transform 500ms ease, opacity 500ms ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 24px rgba(255,255,255,0.05), 0 0 40px rgba(34,211,238,0.12);
  transform: rotate(-20deg);
  animation: spin 7s linear infinite;
}

.ring::before,
.ring::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring::before {
  border-top-color: #22d3ee;
  border-right-color: #8b5cf6;
  animation: spin 3.2s linear infinite reverse;
}

.ring::after {
  inset: 18%;
  border-bottom-color: rgba(255,255,255,0.7);
  border-left-color: rgba(255,255,255,0.35);
  animation: spin 2.4s linear infinite;
}

.core {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(34,211,238,0.16));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 26px rgba(255,255,255,0.12), 0 0 50px rgba(34,211,238,0.18);
  animation: pulse 2.2s ease-in-out infinite;
}

.loader-card {
  position: relative;
  z-index: 2;
  width: min(80%, 280px);
  padding: 1.15rem 1rem;
  border-radius: 24px;
  background: rgba(8, 15, 32, 0.72);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.36);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: #8ddcff;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.55rem;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6 0%, #22d3ee 100%);
  box-shadow: 0 0 18px rgba(34,211,238,0.25);
  transition: width 180ms linear;
}

.percent {
  font-size: 0.95rem;
  font-weight: 700;
  color: #dfe9ff;
}

.hint {
  position: fixed;
  left: 50%;
  bottom: 1.3rem;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(4, 8, 20, 0.65);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.86rem;
  color: #c9d7ef;
  letter-spacing: 0.02em;
  transition: opacity 400ms ease;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.92; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes twinkle {
  0% { transform: scale(0.7); opacity: 0.35; }
  100% { transform: scale(1.3); opacity: 1; }
}
