:root {
  --bg: #0d0a08;
  --ink: #efe6d6;
  --muted: #a99a84;
  --gold: #d9a441;
  --gold-hi: #f4cf7a;
  --ember: #c2481f;
  --card: rgba(24, 18, 13, 0.82);
  --line: rgba(217, 164, 65, 0.28);
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.sky {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 50% 110%, rgba(194, 72, 31, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(217, 164, 65, 0.10), transparent 70%),
    linear-gradient(#120d0a, #0d0a08 60%, #170c07);
}

.embers { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.embers span {
  position: absolute; bottom: -10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 8px 2px rgba(244, 160, 70, 0.7);
  opacity: 0;
  animation: rise 9s linear infinite;
}
.embers span:nth-child(3n)   { left: 12%; animation-delay: -1s; animation-duration: 11s; }
.embers span:nth-child(3n+1) { left: 48%; animation-delay: -4s; }
.embers span:nth-child(3n+2) { left: 81%; animation-delay: -7s; animation-duration: 13s; }
.embers span:nth-child(4n)   { left: 27%; animation-delay: -2.5s; }
.embers span:nth-child(5n)   { left: 66%; animation-delay: -6s; animation-duration: 10s; }
.embers span:nth-child(7n)   { left: 92%; animation-delay: -3s; }
@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: .9; }
  100% { transform: translate(40px, -105vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }

main {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px; text-align: center;
}

h1 {
  font: 700 clamp(2.6rem, 9vw, 5.2rem)/1 Cinzel, serif;
  letter-spacing: .04em;
  margin: 0;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #8c5e1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(217, 164, 65, 0.15);
}
h1 span { display: block; font-size: .5em; letter-spacing: .5em; margin-top: .35em; padding-left: .5em; }

.tag { color: var(--muted); margin: 18px 0 44px; }

.cta {
  display: inline-block;
  font: 700 1.15rem Cinzel, serif; letter-spacing: .14em; text-transform: uppercase;
  color: #1a1006; text-decoration: none;
  padding: 18px 44px; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 0 0 1px #8c5e1c inset, 0 10px 30px rgba(217, 164, 65, 0.25), 0 0 60px rgba(194, 72, 31, 0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #8c5e1c inset, 0 14px 36px rgba(217, 164, 65, 0.35), 0 0 80px rgba(194, 72, 31, 0.35); }
.cta:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.cta.small { font-size: .95rem; padding: 14px 28px; width: 100%; margin-top: 8px; }

.hint { color: var(--muted); font-size: .9rem; margin-top: 18px; }
.hint a { color: var(--gold-hi); }
code { color: var(--ink); }

.hello { font-size: 1.15rem; margin: 0 0 22px; }

.card {
  width: 100%; max-width: 380px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; text-align: left;
  backdrop-filter: blur(6px);
}
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs a {
  flex: 1; text-align: center; padding: 8px; border-radius: 4px;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
.tabs a.on { color: var(--gold-hi); border-color: var(--line); background: rgba(217, 164, 65, 0.06); }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
label small { display: block; font-size: .75rem; opacity: .8; }
input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 4px;
}
input:focus { outline: none; border-color: var(--gold); }

.error {
  color: #ffd2c2; background: rgba(194, 72, 31, 0.18); border: 1px solid rgba(194, 72, 31, 0.5);
  padding: 8px 10px; border-radius: 4px; font-size: .9rem;
}

.logout button {
  margin-top: 28px; background: none; border: 0; color: var(--muted);
  font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer;
}

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 16px; opacity: .6; }
