/* Paleta de Tailwind usada por Hydro Tracker (blue / cyan / slate / indigo). */
:root {
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-800: #1e40af;
  --blue-950: #172554;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-800: #155e75;
  --cyan-950: #083344;
  --indigo-500: #6366f1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-900: #0f172a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  /* Tema oscuro (por defecto, como la web original) */
  --page-from: var(--blue-950);
  --page-via: var(--slate-900);
  --page-to: var(--cyan-950);
  --orb-a: linear-gradient(135deg, var(--blue-500), var(--indigo-500));
  --orb-b: linear-gradient(45deg, var(--cyan-400), #93c5fd);
  --orb-c: linear-gradient(90deg, var(--blue-800), var(--cyan-800));
  --orb-opacity: 0.5;
  --grid-line: rgba(255, 255, 255, 0.05);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: var(--slate-400);
  --brand-from: var(--blue-400);
  --brand-to: var(--cyan-400);
  --notice-bg: rgba(245, 158, 11, 0.1);
  --notice-border: rgba(245, 158, 11, 0.25);
  --notice-fg: #fcd34d;
  --pill-bg: rgba(0, 0, 0, 0.2);
  --pill-border: rgba(255, 255, 255, 0.05);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --page-from: #dbeafe;
    --page-via: #f8fafc;
    --page-to: #cffafe;
    --orb-a: linear-gradient(135deg, var(--blue-600), #4f46e5);
    --orb-b: linear-gradient(45deg, var(--cyan-500), var(--blue-400));
    --orb-c: linear-gradient(90deg, var(--blue-400), var(--cyan-400));
    --orb-opacity: 0.4;
    --grid-line: rgba(15, 23, 42, 0.03);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: #e2e8f0;
    --text: var(--slate-900);
    --muted: var(--slate-500);
    --brand-from: var(--blue-600);
    --brand-to: var(--cyan-600);
    --notice-bg: #fffbeb;
    --notice-border: #fde68a;
    --notice-fg: #b45309;
    --pill-bg: rgba(255, 255, 255, 0.4);
    --pill-border: rgba(255, 255, 255, 0.5);

    color-scheme: light;
  }
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--page-via);
  background-image: linear-gradient(to bottom right, var(--page-from), var(--page-via), var(--page-to));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Fondo animado ---------- */
.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 9999px;
  filter: blur(100px);
  opacity: var(--orb-opacity);
  will-change: transform;
}

.orb-a {
  width: 600px;
  height: 600px;
  background: var(--orb-a);
  animation: orbit-a 20s infinite linear;
}

.orb-b {
  width: 550px;
  height: 550px;
  background: var(--orb-b);
  animation: orbit-b 25s infinite linear;
}

.orb-c {
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  filter: blur(140px);
  background: var(--orb-c);
  transform: translate(-50%, -50%);
  animation: pulse-intense 12s infinite ease-in-out;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
}

@keyframes orbit-a {
  0%   { transform: translate(70vw, -10vh) scale(1); }
  25%  { transform: translate(10vw, 30vh) scale(1.2); }
  50%  { transform: translate(-20vw, 70vh) scale(0.9); }
  75%  { transform: translate(30vw, 40vh) scale(1.1); }
  100% { transform: translate(70vw, -10vh) scale(1); }
}

@keyframes orbit-b {
  0%   { transform: translate(-20vw, 80vh) scale(1.2); }
  33%  { transform: translate(60vw, 10vh) scale(0.8); }
  66%  { transform: translate(10vw, -20vh) scale(1.1); }
  100% { transform: translate(-20vw, 80vh) scale(1.2); }
}

@keyframes pulse-intense {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50%      { transform: translate(-50%, -50%) scale(1.3); opacity: 0.4; }
}

/* ---------- Layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 28rem;
  margin-top: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 2rem;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: rise 0.7s ease-out both;
}

.card-head {
  padding: 2.5rem 1.5rem 0;
  text-align: center;
}

.logo {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--blue-500), var(--cyan-500));
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.25), 0 4px 6px -4px rgba(59, 130, 246, 0.25);
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: rotate(3deg);
}

.brand {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.card-body {
  padding: 2rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  color: var(--notice-fg);
  font-size: 0.95rem;
  line-height: 1.45;
}

.notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.info {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: linear-gradient(to right, var(--blue-600), var(--cyan-600));
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -4px rgba(59, 130, 246, 0.1);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
}

/* ---------- Pie ---------- */
.foot {
  width: 100%;
  max-width: 28rem;
  margin-top: auto;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: rise 1s ease-out both;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dot {
  position: relative;
  display: flex;
  width: 0.5rem;
  height: 0.5rem;
}

.ping,
.core {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
}

.ping {
  background: var(--amber-400);
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.core {
  background: var(--amber-500);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.pill-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  color: var(--muted);
}

.copy {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--slate-500);
  opacity: 0.8;
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
