@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@400;600;700&display=swap");

:root {
  --bg: #f6f4f0;
  --gold: #d4a843;
  --red: #c21e3a;
  --ink: #1b1517;
  --muted: #6f6368;
  --stroke: rgba(20, 16, 18, 0.12);
  --panel: rgba(255, 255, 255, 0.86);
  --panel-shadow: rgba(24, 18, 22, 0.08);
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #f7fbf5 0%, #edf5e9 55%, #e4efe0 100%);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
}

.page {
  padding: 32px 6vw 48px;
  display: grid;
  gap: 28px;
}

.top {
  display: grid;
  gap: 12px;
  justify-items: start;
  position: relative;
  padding-right: min(420px, 40vw);
}

h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.06em;
  color: var(--gold);
}

.battle {
  width: min(520px, 100%);
}

.battle-track {
  position: relative;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3c650 0%, #f0a33b 24%, #f7f3e8 50%, #9bb77b 76%, #4b8a78 100%);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.battle-track.pulse {
  animation: pulse 0.6s ease;
}

.battle-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 2px;
  height: 40px;
  background: rgba(27, 21, 23, 0.35);
}

.battle-marker {
  --pos: 50%;
  position: absolute;
  top: -10px;
  left: var(--pos);
  width: 12px;
  height: 44px;
  background: #1b1517;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(27, 21, 23, 0.2);
  transition: left 0.4s ease;
}

.battle-marker::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 18px;
  height: 18px;
  background: #1b1517;
  border-radius: 50%;
  transform: translateX(-50%);
}

.battle-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(520px, 100%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.battle-labels span:nth-child(2) {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(27, 21, 23, 0.4);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #3b2c12;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qty-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--muted);
}

.qty-btn {
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 16px var(--panel-shadow);
}

.qty-btn.active {
  background: #1b1517;
  color: #ffffff;
}

.qty.inline {
  gap: 6px;
}

.qty.inline .qty-btn {
  padding: 5px 10px;
  font-size: 0.85rem;
}

.note {
  font-size: 0.8rem;
  color: var(--muted);
}

.email {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
}

.email-float {
  position: absolute;
  top: 0;
  right: 0;
}

.email label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  color: var(--muted);
}

.email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.email input {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 18px var(--panel-shadow);
}

.btn {
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 20px var(--panel-shadow);
}

.btn.pray {
  padding: 12px 22px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.btn.pray.glory-btn {
  background: #f6d37a;
  border-color: rgba(157, 113, 34, 0.35);
  color: #3b2c12;
}

.btn.pray.bottle-btn {
  background: #f4c4cc;
  border-color: rgba(160, 34, 61, 0.3);
  color: #3c121c;
}

.fixture {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.fixture-inline {
  width: min(320px, 100%);
  padding: 12px 14px;
  border-radius: 16px;
  background: #fdfbf7;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 24px var(--panel-shadow);
}

.slot {
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: #ffffff;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.value {
  font-size: 1.1rem;
  outline: none;
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.about-card {
  background: #ffffff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px var(--panel-shadow);
  display: grid;
  gap: 8px;
}

.about-card h2 {
  font-size: 1.1rem;
}

.about-card .muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: #1b1517;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 16px 30px rgba(27, 21, 23, 0.25);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.disclaimer {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.disclaimer p + p {
  margin-top: 4px;
}

.disclaimer-header {
  text-align: left;
  max-width: 520px;
}

.panel {
  position: relative;
  min-height: 380px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  background-image: url("assets/glory-bottle.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(246, 244, 240, 0.8));
}

.panel.glory {
  background-position: left center;
}

.panel.bottle {
  background-position: right center;
}

.panel-title {
  position: absolute;
  top: 18px;
  left: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  z-index: 1;
}

.panel-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  padding: 48px 20px 24px;
  min-height: 100%;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 260px) 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.side-icons {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.side-icons.bottles {
  justify-items: center;
}

.table-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--stroke);
  width: 100%;
  box-shadow: 0 12px 30px var(--panel-shadow);
}

.table-title {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--gold);
}

.league {
  width: 100%;
  border-collapse: collapse;
  font-weight: 600;
  color: var(--ink);
}

.league th,
.league td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(20, 16, 18, 0.08);
  font-size: 0.9rem;
}

.league th:last-child,
.league td:last-child {
  text-align: right;
}

.league tbody tr:last-child td {
  border-bottom: none;
}

.trophy-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.bottle-img {
  width: 96px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.candles {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-self: end;
  margin-top: 28px;
}

.pray-row {
  margin-top: 18px;
}

.pray-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.candles-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}

.candle {
  width: 70px;
  height: 130px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fdf4db, #f1c79d 70%, #b98c5b 100%);
  position: relative;
  z-index: 1;
  box-shadow: inset 0 -16px 24px rgba(0, 0, 0, 0.25);
}

.candle.flash {
  animation: candleFlash 0.7s ease;
}

.candle.small {
  width: 50px;
  height: 96px;
  border-radius: 18px;
}

.candle:focus {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wick {
  position: absolute;
  width: 5px;
  height: 18px;
  background: #2a0c0c;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
}

.flame {
  position: absolute;
  width: 20px;
  height: 36px;
  background: radial-gradient(circle at 40% 30%, #fff7de, #ffd28a 45%, #ff9a3b 70%, #ff6a1d 100%);
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50%;
  filter: drop-shadow(0 0 18px rgba(255, 183, 71, 0.8));
  animation: flicker 1s infinite ease-in-out;
}

.flame::before {
  content: "";
  position: absolute;
  width: 60%;
  height: 70%;
  top: 15%;
  left: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 236, 186, 0.2));
  filter: blur(1px);
}

.flame::after {
  content: "";
  position: absolute;
  width: 90%;
  height: 90%;
  top: 5%;
  left: 5%;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 157, 0.5);
  opacity: 0.6;
}

.candle.small .flame {
  width: 14px;
  height: 26px;
  top: -28px;
}

.candle.small .wick {
  height: 14px;
  top: -12px;
}

.candle.small .wax {
  inset: 14px 10px 10px;
  border-radius: 14px;
}

.candle.out .flame {
  display: none;
}

.smoke {
  position: absolute;
  width: 70px;
  height: 70px;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  filter: blur(0.5px);
}

.candle.out .smoke {
  opacity: 0.75;
}

.candle.small .smoke {
  width: 54px;
  height: 54px;
  top: -46px;
}

.smoke span {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(120, 120, 120, 0.35);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(120, 120, 120, 0.05));
  animation: drift 2.8s infinite ease-in-out;
}

.smoke span:nth-child(2) {
  top: 12px;
  left: 16px;
  animation-delay: 0.6s;
}

.smoke span:nth-child(3) {
  top: -8px;
  left: -10px;
  animation-delay: 1.1s;
}

.wax {
  position: absolute;
  inset: 18px 12px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scale(1) rotate(-1deg);
  }
  35% {
    transform: translateX(-49%) scale(1.12) rotate(3deg);
  }
  70% {
    transform: translateX(-52%) scale(0.98) rotate(-4deg);
  }
  100% {
    transform: translateX(-50%) scale(1) rotate(2deg);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(6px) scale(0.9);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-18px) scale(1.1);
    opacity: 0.7;
  }
}

@keyframes pulse {
  0% {
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.6), 0 0 0 rgba(244, 211, 122, 0.4);
  }
  50% {
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.9), 0 0 24px rgba(244, 211, 122, 0.55);
  }
  100% {
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.6), 0 0 0 rgba(244, 211, 122, 0.4);
  }
}

@keyframes candleFlash {
  0% {
    transform: translateY(0);
    filter: drop-shadow(0 0 0 rgba(255, 183, 71, 0));
  }
  50% {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 12px rgba(255, 183, 71, 0.6));
  }
  100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 0 rgba(255, 183, 71, 0));
  }
}


@media (max-width: 720px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .top {
    padding-right: 0;
  }

  .email-float {
    position: static;
    width: 100%;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .candle {
    width: 64px;
    height: 120px;
  }

  .candle.small {
    width: 44px;
    height: 84px;
  }
}
