:root {
  --bg-color: #090d16;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-border: rgba(255, 255, 255, 0.12);
  
  --gradient-1: #4f46e5;
  --gradient-2: #06b6d4;
  --gradient-3: #ec4899;
  --gradient-4: #8b5cf6;
}

:root[data-theme="light"] {
  --bg-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-border: rgba(255, 255, 255, 0.8);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --chip-bg: rgba(15, 23, 42, 0.04);
  --chip-border: rgba(15, 23, 42, 0.08);

  --gradient-1: #818cf8;
  --gradient-2: #22d3ee;
  --gradient-3: #f472b6;
  --gradient-4: #a78bfa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; overflow: hidden; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  color: var(--text-main);
  position: relative;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.aurora-container {
  position: absolute;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.7;
  animation: rotateAurora 25s linear infinite;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  animation: floatBlob 12s ease-in-out infinite alternate;
}

.blob-1 {
  top: 30%; left: 30%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, var(--gradient-1) 0%, rgba(0,0,0,0) 70%);
}
.blob-2 {
  top: 20%; right: 25%;
  width: 45vw; height: 45vw;
  background: radial-gradient(circle, var(--gradient-2) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -3s;
}
.blob-3 {
  bottom: 25%; left: 35%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, var(--gradient-3) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -6s;
}
.blob-4 {
  bottom: 20%; right: 30%;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, var(--gradient-4) 0%, rgba(0,0,0,0) 70%);
  animation-delay: -9s;
}

@keyframes rotateAurora {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.15); }
  100% { transform: translate(-5%, -4%) scale(0.95); }
}

.theme-toggle {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, background 0.3s ease;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }

.card {
  position: relative;
  z-index: 1;
  width: calc(100% - 40px);
  max-width: 460px;
  padding: 44px 36px;
  border-radius: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.gradient-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--gradient-2), var(--gradient-3), var(--gradient-1));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.host-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-main);
  margin-bottom: 30px;
}

.loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient-2);
  animation: pulse 1.5s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.2s; background: var(--gradient-3); }
.dot:nth-child(3) { animation-delay: 0.4s; background: var(--gradient-1); }

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.dynamic-message {
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
  color: var(--text-main);
  transition: opacity 0.5s ease;
  opacity: 1;
}
