/* ===== Prompt Gremlins: High-Gothic Dark Fantasy / Elden Dark Medieval Design ===== */

:root {
  /* Obsidian Stone & Black Iron */
  --void: #040507;
  --obsidian: #080a0f;
  --stone-card: #0e1118;
  --stone-inner: #0a0c12;
  --iron-border: rgba(180, 140, 60, 0.22);
  --iron-highlight: rgba(240, 200, 100, 0.45);
  
  /* Antique Gothic Gilt Gold (Metallic Foil Gradient) */
  --gold-pure: #e5b842;
  --gold-bright: #ffe082;
  --gold-deep: #8c6218;
  --gold-glow: rgba(229, 184, 66, 0.25);
  --gold-grad: linear-gradient(180deg, #ffe082 0%, #d4af37 45%, #8c6218 100%);
  --gold-grad-rev: linear-gradient(0deg, #ffe082 0%, #d4af37 45%, #8c6218 100%);

  /* Eldritch Ember Flame */
  --ember-core: #ff7a18;
  --ember-glow: rgba(255, 122, 24, 0.2);
  --ember-crimson: #991b1b;
  --ember-grad: linear-gradient(135deg, #ff922b 0%, #e8590c 50%, #c92a2a 100%);

  /* Soul Teal / Alchemical Arcana */
  --arcana: #20c997;
  --arcana-glow: rgba(32, 201, 151, 0.25);

  /* Aged Vellum & Bone Typography */
  --vellum: #f2eee6;
  --vellum-dim: #b8b0a0;
  --vellum-dark: #6e675b;

  /* Typography */
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-gothic: 'Cinzel', serif;
  --font-medieval: 'MedievalSharp', cursive, serif;
  --font-mono: 'Fira Code', ui-monospace, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--void);
  color: var(--vellum);
  font-family: var(--font-gothic);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(229, 184, 66, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 15% 40%, rgba(255, 122, 24, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(201, 42, 42, 0.04) 0%, transparent 40%);
}

/* Background Atmosphere: Embers & Torch Glow */
#emberCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.torch-ambient {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.12;
}

.torch-ambient.left {
  top: 15%;
  left: -20vw;
  background: radial-gradient(circle, #ff6b00 0%, transparent 70%);
}

.torch-ambient.right {
  top: 45%;
  right: -20vw;
  background: radial-gradient(circle, #e5b842 0%, transparent 70%);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 100px;
  position: relative;
  z-index: 1;
}

/* ========================================================
   GOTHIC TOP BAR (ILLUMINATED BANNER)
======================================================== */
.gothic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: linear-gradient(180deg, rgba(20, 24, 34, 0.9) 0%, rgba(10, 12, 17, 0.95) 100%);
  border: 1px solid var(--iron-border);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(229, 184, 66, 0.2);
  margin-bottom: 50px;
}

/* Corner Filigree Brackets */
.gothic-header::before, .gothic-header::after {
  content: "✦";
  position: absolute;
  font-size: 10px;
  color: var(--gold-pure);
  opacity: 0.7;
}
.gothic-header::before { top: 4px; left: 6px; }
.gothic-header::after { bottom: 4px; right: 6px; }

.sigil {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-no-humans {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f87171;
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.25) 0%, rgba(80, 10, 10, 0.35) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 14px;
  border-radius: 2px;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.header-links {
  display: flex;
  gap: 18px;
}

.gothic-link {
  color: var(--vellum-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
}

.gothic-link:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* ========================================================
   HERO BANNER & RUNIC INSCRIPTIONS
======================================================== */
.shrine {
  text-align: center;
}

.runic-inscriptions {
  font-size: 13px;
  letter-spacing: 8px;
  color: var(--gold-pure);
  opacity: 0.8;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.gothic-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.5vw, 56px);
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #f3e5ab 35%, #d4af37 70%, #996515 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.35));
  margin-bottom: 16px;
  line-height: 1.15;
}

.gothic-subtitle {
  font-family: var(--font-medieval);
  font-size: 18px;
  color: var(--vellum-dim);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* Wax Seal Forbidden Decree */
.decree-parchment {
  background: linear-gradient(180deg, rgba(22, 12, 12, 0.85) 0%, rgba(14, 8, 8, 0.95) 100%);
  border: 1px solid rgba(185, 28, 28, 0.4);
  border-top: 2px solid #dc2626;
  border-bottom: 2px solid #dc2626;
  border-radius: 4px;
  padding: 22px 30px;
  max-width: 760px;
  margin: 0 auto 45px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(185, 28, 28, 0.08);
}

.decree-icon {
  font-size: 22px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5));
}

.decree-parchment p {
  font-family: var(--font-medieval);
  font-size: 16px;
  color: #f1dede;
  line-height: 1.65;
}

.decree-parchment strong {
  color: #fecaca;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.decree-parchment em {
  font-style: normal;
}

/* ========================================================
   OBSIDIAN STONE SANCTUARY CARD
======================================================== */
.stone-sanctuary {
  background: linear-gradient(180deg, var(--stone-card) 0%, var(--stone-inner) 100%);
  border: 1px solid var(--iron-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(240, 200, 100, 0.15);
  border-radius: 6px;
  padding: 38px;
  margin-bottom: 40px;
  text-align: left;
  backdrop-filter: blur(16px);
  position: relative;
}

/* Decorative Gold Corner Filigree on Cards */
.stone-sanctuary::before, .stone-sanctuary::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold-pure);
  opacity: 0.6;
  pointer-events: none;
}
.stone-sanctuary::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
}
.stone-sanctuary::after {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
}

.altar-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 720px) {
  .altar-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Alchemical Gremlin Relic Frame */
.gremlin-relic-altar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.relic-frame {
  position: relative;
  padding: 8px;
  background: radial-gradient(circle, rgba(229, 184, 66, 0.12) 0%, transparent 70%);
}

.relic-canvas-border {
  border: 2px solid var(--gold-pure);
  box-shadow: 0 0 35px rgba(229, 184, 66, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  overflow: hidden;
  background: #050608;
  display: flex;
  justify-content: center;
  align-items: center;
}

.relic-caption {
  font-family: var(--font-gothic);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--gold-pure);
  margin-top: 14px;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--gold-glow);
}

/* Sanctuary Controls */
.sanctuary-controls {
  display: flex;
  flex-direction: column;
}

/* Ancient Issuance Progress Meter */
.meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--vellum-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.meter-header b {
  color: var(--gold-bright);
}

.meter-header .free-tag {
  color: var(--arcana);
}

.gothic-progress-track {
  height: 12px;
  background: #06070a;
  border: 1px solid var(--iron-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.gothic-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c99738 0%, #ffe082 70%, #ff922b 100%);
  box-shadow: 0 0 15px rgba(229, 184, 66, 0.6);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quota Seal Badge */
.quota-seal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(14, 18, 24, 0.85);
  border: 1px solid var(--iron-border);
  border-left: 3px solid var(--gold-pure);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 22px;
  letter-spacing: 1px;
}

.quota-seal span {
  color: var(--vellum-dim);
}

.quota-seal strong {
  color: var(--gold-bright);
}

/* Roman Numeral Stepper */
.qty-stepper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.qty-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--vellum);
  text-transform: uppercase;
}

.numeral-buttons {
  display: flex;
  gap: 10px;
}

.numeral-btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 8px 18px;
  background: rgba(16, 20, 28, 0.9);
  color: var(--vellum-dim);
  border: 1px solid var(--iron-border);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.numeral-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-pure);
}

.numeral-btn.active {
  background: linear-gradient(180deg, #d4af37 0%, #8c6218 100%);
  color: #040507;
  border-color: var(--gold-bright);
  font-weight: 900;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
}

/* Tribute Breakdown Box */
.tribute-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(8, 10, 14, 0.9);
  border: 1px solid var(--iron-border);
  border-radius: 2px;
  margin-bottom: 24px;
}

.tribute-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--vellum-dim);
  text-transform: uppercase;
}

.tribute-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
}

/* Machine Gate Notice & Dispatch CTA */
.gate-block-notice {
  font-family: var(--font-medieval);
  font-size: 13px;
  color: #fca5a5;
  background: rgba(153, 27, 27, 0.15);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  padding: 8px 14px;
  border-radius: 2px;
  text-align: center;
  margin-bottom: 14px;
}

.gothic-cta-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 16px 24px;
  border-radius: 2px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe082 0%, #d4af37 40%, #996515 100%);
  color: #050608;
  border: 1px solid #ffecb3;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
}

.gothic-cta-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ffe082 40%, #c99738 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.45);
}

.status-callout {
  margin-top: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--vellum-dark);
  text-align: center;
}

.status-callout code {
  color: var(--gold-pure);
}

/* ========================================================
   THE MACHINE CODEX (AI DIRECTIVE SECTION)
======================================================== */
.codex-section {
  border-color: rgba(229, 184, 66, 0.3);
}

.codex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.codex-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-bright);
}

.copy-mini-btn {
  font-family: var(--font-gothic);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  background: rgba(229, 184, 66, 0.1);
  border: 1px solid var(--gold-pure);
  color: var(--gold-bright);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-mini-btn:hover {
  background: var(--gold-pure);
  color: #040507;
  box-shadow: 0 0 12px var(--gold-glow);
}

.codex-desc {
  font-family: var(--font-medieval);
  font-size: 14px;
  color: var(--vellum-dim);
  margin-bottom: 18px;
}

.codex-scroll {
  background: #050608;
  border: 1px solid var(--iron-border);
  border-left: 3px solid var(--gold-pure);
  border-radius: 2px;
  padding: 18px 22px;
  overflow-x: auto;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}

.codex-scroll pre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #93c5fd;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Machine Protocol Specs Accordion */
.protocol-accordion {
  border-top: 1px solid var(--iron-border);
  padding-top: 16px;
}

.protocol-accordion summary {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-pure);
  cursor: pointer;
  outline: none;
}

.specs-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
  background: #06070a;
  border: 1px solid var(--iron-border);
  padding: 16px;
  border-radius: 2px;
}

.spec-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-cell .k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--vellum-dark);
  text-transform: uppercase;
}

.spec-cell .v {
  font-size: 12px;
  color: var(--vellum);
}

.spec-cell .v code {
  font-family: var(--font-mono);
  color: var(--gold-bright);
}

/* Gothic Footer */
.gothic-footer {
  margin-top: 60px;
  text-align: center;
  font-size: 12px;
  color: var(--vellum-dark);
}

.runic-divider {
  letter-spacing: 10px;
  color: var(--gold-pure);
  margin-bottom: 12px;
  opacity: 0.5;
}
