@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Cinzel+Decorative:wght@700&family=Uncial+Antiqua&display=swap');


.hidden {
    display: none !important;
  }

/* Full-page background with overlay */
body {
  margin: 0;
  font-family: 'Cinzel Decorative', serif;
  background: url('images/town-render.webp') no-repeat center center fixed;
  background-size: cover;
  color: #f5e6c8;
  text-align: center;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.6); /* dark overlay for readability */
  z-index: -1;
}

/* Step cards with parchment tint */
.step-card {
  background: url('images/parchment.jpg') center/cover no-repeat rgba(59,42,26,0.9);
  background-blend-mode: multiply;
  border: 2px solid #a67c52;
  border-radius: 2px;
  padding: 1.5rem;
  margin: 1rem auto;
  width: 80%;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
  color: #f5e6c8;
}

/* Section titles */
.section-title {
  font-family: 'Cinzel', serif;
  color: gold;
  text-shadow: 0 0 8px #2c1a0f;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border: none; /* remove old border */
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
  box-shadow: 0 0 6px #ffcc66;
}


.header {
  background: url('images/stone.jpg') repeat;
  padding: 1rem;
}

h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  color: gold;
  text-shadow: 0 0 10px #ffcc66;
}

.hero-banner {
  background: url('textures/parchment.jpg') center/cover no-repeat;
  margin: 1rem auto;
  padding: 0.1rem;
  border: none; /* removes the border */
  border-radius: 8px;
  width: 20%;
}


input[type="text"] {
  display: block;
  margin: 0.5rem auto;
  padding: 0.5rem;
  border: 2px solid #a67c52;
  border-radius: 4px;
  background: #3b2a1a;
  color: #f5e6c8;
}

.error {
  color: red;
  font-size: 0.9rem;
}

.locked {
  opacity: 0.5;
  pointer-events: none;
}

/* Slider styling */
input[type=range] {
  -webkit-appearance: none;
  width: 80%;
  margin: 1rem auto;
  background: transparent;
  display: block;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 12px;
  background: linear-gradient(to right, #b8860b, #ffd700, #b8860b);
  border: 2px solid #a67c52;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
input[type=range]::-moz-range-track {
  height: 12px;
  background: linear-gradient(to right, #b8860b, #ffd700, #b8860b);
  border: 2px solid #a67c52;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 28px;
  width: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700 40%, #ffcc33 70%, #b8860b 100%);
  border: 2px solid #fff8dc;
  box-shadow: 0 0 15px gold, 0 0 25px #ffcc66;
  cursor: pointer;
  margin-top: -10px;
}
input[type=range]::-moz-range-thumb {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700 40%, #ffcc33 70%, #b8860b 100%);
  border: 2px solid #fff8dc;
  box-shadow: 0 0 15px gold, 0 0 25px #ffcc66;
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 80%;
  margin: 0.5rem auto;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  color: #ffd700;
  text-shadow: 0 0 5px #2c1a0f;
}

#amountInput {
  width: 100px;
  padding: 0.3rem;
  margin-left: 0.5rem;
  border: 2px solid #a67c52;
  border-radius: 4px;
  background: #3b2a1a;
  color: #f5e6c8;
  font-family: inherit;
  text-align: center;
  transition: all 0.3s ease;
}

button {
  background: linear-gradient(#a67c52, #6b4226);
  color: #fff;
  border: 2px solid #d4af37;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

button:disabled {
  background: #555;
  border-color: #333;
  cursor: not-allowed;
}

/* Overlay backdrop with subtle blur */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.8);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Parchment-styled dialog */
.overlay-content {
  position: relative;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 240, 205, 0.12) 0%, rgba(0,0,0,0) 60%),
    url('textures/parchment.jpg') center/cover no-repeat;
  border: 3px solid #a67c52;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  width: min(480px, 90vw);
  text-align: center;
  font-family: 'Cinzel Decorative', serif;
  color: #2c1a0f;
  box-shadow:
    0 0 0 4px rgba(166, 124, 82, 0.35),
    0 12px 30px rgba(0,0,0,0.7),
    inset 0 0 25px rgba(212,175,55,0.15);
  animation: modalReveal 280ms ease-out forwards;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}

@keyframes modalReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Title */
.overlay-content h2 {
  margin: 0.2rem 0 0.8rem;
  color: gold;
  text-shadow: 0 0 6px #3b1f0f;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}

/* Divider under title */
.overlay-content::after {
  content: "";
  display: block;
  width: 70%;
  height: 2px;
  margin: 0.6rem auto 1rem;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
  box-shadow: 0 0 8px rgba(212,175,55,0.6);
}

/* Confirmation text */
#confirmText {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c1a0f;
  background: rgba(255, 245, 225, 0.65);
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(166, 124, 82, 0.5);
  box-shadow: inset 0 0 10px rgba(212,175,55,0.15);
}

/* Buttons row */
.overlay-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.overlay-buttons button {
  min-width: 130px;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 2px solid #d4af37;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

#confirmYes {
  background: linear-gradient(#d4af37, #a67c52);
  color: #1b120b;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

#confirmNo {
  background: linear-gradient(#6b4226, #3b2a1a);
  color: #fff8dc;
  border-color: #a67c52;
}

#confirmYes:hover {
  transform: translateY(-1px);
  background: linear-gradient(#ffe08a, #d4af37);
  box-shadow: 0 0 14px gold, 0 0 24px #ffcc66;
}

#confirmNo:hover {
  transform: translateY(-1px);
  background: linear-gradient(#8b5a2b, #4a341f);
  box-shadow: 0 0 10px rgba(212,175,55,0.35);
}

/* Input focus glow */
input[type="text"]:focus, #amountInput:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 8px gold;
}

/* Themed error */
.error {
  color: #ff4444;
  font-weight: bold;
  text-shadow: 0 0 5px #ff0000;
}

/* Button hover enchantment */
button:hover {
  background: linear-gradient(#d4af37, #a67c52);
  box-shadow: 0 0 12px gold, 0 0 20px #ffcc66;
}

/* Hero banner text polish */
.hero-banner h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: gold;
  text-shadow: 0 0 6px #2c1a0f;
}

.divider-image {
  background: url('images/divider.png') no-repeat center center;
  background-size: contain;   /* keeps proportions */
  width: 200px;               /* adjust to your image */
  height: 40px;               /* adjust to your image */
  margin: 1.5rem auto;        /* centers it with spacing */
  opacity: 0.9;               /* optional: soften it */
}

.logo-frame {
  background: url('images/scroll.png') center/contain no-repeat;
  padding: 3.5rem;
  margin: 0 auto 1rem auto;
  width: 320px;
  height: auto;
  border-radius: 12px;

  animation: crestReveal 1s ease-out forwards;
  opacity: 0;
  transform: scale(0.95);
}

.logo {
  display: block;
  margin: 0 auto 1rem auto;
  max-width: 280px;
  height: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: logoReveal 1s ease-out forwards;
}


@keyframes logoReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bonus preview styling */
.bonus-preview {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  color: #ffd700;
  text-shadow: 0 0 6px #2c1a0f, 0 0 10px #ffcc66;
  font-weight: bold;
  transition: all 0.3s ease;
}

.bonus-preview.earned {
  color: #00ff99; /* green glow when bonus applies */
  text-shadow: 0 0 8px #12a512, 0 0 12px #2c1a0f;
}

.glow-green {
  color: gold;
  text-shadow: 0 0 6px #2c1a0f;
  font-weight: bold;
  text-decoration: underline;
}

/* Base track */
#amountSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 61%;
  height: 10px;
  background: #333;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Track styling */
#amountSlider::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(to right, #b8860b, #ffd700, #b8860b);
  border-radius: 5px;
}

#amountSlider::-moz-range-track {
  height: 10px;
  background: linear-gradient(to right, #b8860b, #ffd700, #b8860b);
  border-radius: 5px;
}


/* Thumb styling */
#amountSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: url('images/GoldenTreasureChest.png') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  margin-top: -11px; /* centers thumb on track */
}

#amountSlider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 6px #ffd700;
}

#amountSlider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: url('images/GoldenTreasureChest.png') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  margin-top: -11px; /* centers thumb on track */
}

.gold {
  color: #FFD700; /* gold */
  font-weight: bold;
  text-shadow: 1px 1px 2px #2c1a0f; /* subtle depth */
}

.amount {
  color: #4CAF50; /* green */
  font-weight: bold;
  text-shadow: 1px 1px 2px #2c1a0f;
}

.total {
  font-size: 1.1em;
}

.name {
  text-decoration: underline;
}

img.sparkle {
  filter: drop-shadow(0 0 4px gold);
}

.item-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 4px;
  filter: drop-shadow(0 0 3px gold);
}

.item-icon:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px #ffd700);
  transition: all 0.2s ease;
}

.slider-labels-absolute {
  position: relative;
  width: 60%; /* match your slider width */
  margin: 0.5em auto;
  height: 1em;
}

.slider-labels-absolute span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.8em;
  color: #c2a76d;
}

.slider-labels-absolute span::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 5px;
  background-color: #c2a76d;
}
