:root {
  --bg: #0b0b0b;
  --fg: #e5e5e5;
  --accent: #c8ad7f; /* antiqued gold */
  --muted: #8a8a8a;
  /* serif font stack for historical vibe */
  --title-font: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fg);
  /* keep the radial gradient but place it under a fixed pattern overlay */
  background: radial-gradient(60% 60% at 50% 40%, #141414, #060606);
  font-family: var(--title-font), ui-serif, system-ui, -apple-system, serif;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
}

/* overlay a subtle cryptic pattern to reinforce secret history vibes */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./bg-pattern.png') repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  width: min(960px, 92vw);
  padding: 32px;
  text-align: center;
  /* ensure the content sits above the decorative background overlay */
  position: relative;
  z-index: 1;
}

.title {
  letter-spacing: 0.2em;
  font-weight: 800;
  margin: 0 0 6px;
  font-size: clamp(28px, 5vw, 40px);
  color: var(--fg);
  text-shadow: 0 0 24px rgba(200,173,127,.25);
  font-family: var(--title-font), ui-serif;
}

.subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--title-font), ui-serif;
}

.cryptex {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; justify-items: center;
  margin: 20px auto 18px;
}

.ring {
  width: 150px; height: 150px; border-radius: 999px;
  border: 2px solid rgba(200,173,127,.55);
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 32% 30%, #2a2419, #0f0d09);
  box-shadow: inset 0 0 20px rgba(0,0,0,.7), 0 4px 30px rgba(200,173,127,.15);
  cursor: pointer; transition: transform .2s ease;
}

.ring:hover { transform: translateY(-2px) scale(1.01); }

.ring::before {
  content: attr(data-label);
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
}

.ring::after {
  content: "";
  position: absolute; inset: 10px;
  border-radius: 999px;
  border: 1px dashed rgba(200,173,127,.35);
}

form { margin-top: 10px; }

#hiddenInput {
  width: min(560px, 92vw);
  padding: 12px 14px; font-size: 16px; border-radius: 10px;
  background: #0f0f0f; color: var(--fg); border: 1px solid #262626;
  outline: none; margin: 10px auto; display: block;
}

#unlockBtn {
  margin-top: 6px;
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid rgba(200,173,127,.55);
  background: linear-gradient(180deg, #1a160f, #0e0c08);
  color: var(--fg); font-weight: 800; letter-spacing: 0.2em;
  cursor: pointer;
}

.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.msg { min-height: 22px; margin: 12px 0 0; }

.footer { margin-top: 36px; color: #6f6f6f; }
