:root {
  --bg: #070b14;
  --bg-2: #0d1526;
  --panel: rgba(16, 26, 46, 0.82);
  --border: rgba(127, 211, 255, 0.18);
  --ice: #7fd3ff;
  --ice-dim: #4a90b8;
  --gold: #e8c26a;
  --gold-deep: #b8892f;
  --text: #e6edf7;
  --muted: #93a3bd;
  --danger: #ff7b7b;
  --ok: #5fe08f;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(127, 211, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(232, 194, 106, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  line-height: 1.6;
}

a { color: var(--ice); }
a:hover { color: #b5e6ff; }

h1, h2, .brand {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.03em;
}

h1 { color: var(--gold); margin: 0 0 0.5rem; font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { color: var(--gold); margin: 0 0 1rem; font-size: 1.3rem; }

/* --- Barra superior --- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 0 18px rgba(232, 194, 106, 0.35);
}

nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--ice); border-bottom-color: var(--ice); }

/* --- Contenido --- */
main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero { text-align: center; padding: 3rem 0 2.5rem; }

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 800;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(127, 211, 255, 0.25));
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 600;
}

.lead { color: var(--muted); font-size: 1.1rem; margin: 0 auto 2rem; max-width: 34rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card.narrow { max-width: 460px; margin: 1rem auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* --- Estado del reino --- */
.status-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.status-head h2 { margin: 0; }

.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.dot.off { background: var(--danger); box-shadow: 0 0 12px var(--danger); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 0;
}

.stats div {
  background: rgba(127, 211, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.stats dt { color: var(--muted); font-size: 0.8rem; }
.stats dd { margin: 0.15rem 0 0; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Pasos --- */
.steps { padding-left: 1.25rem; margin: 0; }
.steps li { margin-bottom: 0.9rem; padding-left: 0.25rem; }
.steps li::marker { color: var(--gold); font-weight: 600; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: rgba(127, 211, 255, 0.08);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

pre {
  background: #050810;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 0;
  overflow-x: auto;
}

pre code { background: none; padding: 0; color: var(--ice); }

/* --- Formularios --- */
form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.5rem; }

label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 500; font-size: 0.95rem; }

input {
  font: inherit;
  color: var(--text);
  background: rgba(5, 8, 16, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

input:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(127, 211, 255, 0.2); }

small { color: var(--muted); font-weight: 400; font-size: 0.8rem; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  background: rgba(127, 211, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
}

.btn:hover { color: var(--text); background: rgba(127, 211, 255, 0.15); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  color: #1d1406;
  background: linear-gradient(180deg, #f6d98a, var(--gold) 50%, var(--gold-deep));
  border-color: #f6d98a;
  box-shadow: 0 4px 18px rgba(232, 194, 106, 0.25);
}

.btn.primary:hover { color: #1d1406; box-shadow: 0 4px 26px rgba(232, 194, 106, 0.45); }

.alert {
  color: #ffd6d6;
  background: rgba(255, 123, 123, 0.1);
  border: 1px solid rgba(255, 123, 123, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0 0;
}

.check {
  font-size: 2.5rem;
  color: var(--ok);
  margin: 0;
  line-height: 1;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
}
