:root {
  --bg: #070707;
  --panel: rgba(16, 16, 16, 0.86);
  --panel-border: rgba(212, 175, 55, 0.38);
  --text: #f7f4eb;
  --muted: #b9b39f;
  --gold: #d4af37;
  --fuchsia: #ff2f92;
  --danger: #f04b4b;
  --ok: #20cc84;
  --radius: 14px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  background: radial-gradient(circle at 15% 5%, rgba(255, 47, 146, 0.12), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(212, 175, 55, 0.15), transparent 50%),
    linear-gradient(135deg, #080808, #0f0a0a 50%, #050505 100%);
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(6, 6, 6, 0.82);
  border-bottom: 1px solid rgba(212, 175, 55, 0.24);
  backdrop-filter: blur(7px);
}

.topbar-inner {
  width: min(1200px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0;
}

.brand {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.top-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.top-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}

.top-links a:visited {
  color: var(--text);
}

.top-links a:hover {
  border-bottom-color: var(--fuchsia);
}

.session-chip {
  margin: 0;
  border: 1px solid rgba(255, 47, 146, 0.45);
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  color: #ffd2e8;
  font-size: 0.78rem;
  white-space: nowrap;
}

.hero {
  margin: 1rem auto 0;
  width: min(1200px, 94vw);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  filter: saturate(0.86) brightness(0.72);
}

.hero-copy {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  display: grid;
  align-content: end;
  padding: 2rem;
  gap: 0.85rem;
}

.badge {
  margin: 0;
  width: fit-content;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 47, 146, 0.5);
  color: var(--fuchsia);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.hero h1 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  color: var(--gold);
}

.hero p {
  max-width: 740px;
  margin: 0;
}

.hero-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions a {
  text-decoration: none;
}

.hero-actions a:visited {
  color: inherit;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.6rem 0.95rem;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(120deg, #d4af37, #a98218);
  color: #1f1502;
}

.btn-secondary {
  background: linear-gradient(120deg, #ff2f92, #de1476);
  color: #fff;
}

.layout {
  width: min(1200px, 94vw);
  margin: 1.25rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.card h2 {
  margin: 0 0 0.9rem;
  font-family: 'Cinzel', serif;
  color: var(--gold);
}

.card h3 {
  margin: 0 0 0.6rem;
  color: var(--fuchsia);
  font-size: 0.95rem;
}

.intro {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.story-grid,
.benefits-grid,
.pricing-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metrics-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: 12px;
  padding: 0.75rem;
}

.metric-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  margin: 0.22rem 0 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

.story-grid article,
.benefits-grid article,
.price-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: 12px;
  padding: 0.8rem;
}

.story-grid article p,
.benefits-grid article p,
.price-box p {
  margin: 0;
  color: var(--muted);
}

.price-box.featured {
  border-color: rgba(255, 47, 146, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 47, 146, 0.25);
}

.price-box h3 {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
}

.price-tag {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fuchsia);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.87rem;
  color: var(--muted);
}

.chip.active {
  border-color: rgba(255, 47, 146, 0.6);
  color: #ffd6e9;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.auth-split {
  align-items: start;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 0.8rem;
}

form,
.inline-form {
  display: grid;
  gap: 0.6rem;
}

.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 0.6rem;
}

.inline-form > form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 0.65rem;
}

input,
select,
button,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.58rem 0.62rem;
  font: inherit;
}

input:focus,
select:focus,
button:focus,
textarea:focus {
  outline: 2px solid rgba(255, 47, 146, 0.55);
  outline-offset: 1px;
}

button {
  background: linear-gradient(120deg, #d4af37, #a98218);
  color: #1f1502;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(120deg, #ff2f92, #de1476);
  color: #fff;
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fuchsia);
  font-weight: 600;
  justify-self: start;
}

.text-link:hover {
  filter: none;
  text-decoration: underline;
}

button:hover {
  filter: brightness(1.07);
}

.state {
  padding: 0.6rem;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.state.warning {
  border-left-color: var(--fuchsia);
  color: #f0c5dc;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  padding: 0.5rem;
}

th {
  color: var(--gold);
}

pre {
  max-height: 300px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 0.75rem;
  margin: 0.6rem 0 0;
  white-space: pre-wrap;
}

footer {
  width: min(1200px, 94vw);
  margin: 0 auto 2rem;
  color: var(--muted);
}

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.6rem;
  z-index: 999;
}

.toast {
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 0.65rem 0.72rem;
  min-width: 240px;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--ok);
}

.card.locked {
  opacity: 0.72;
}

[data-protected='true'] {
  display: none;
}

#logout-btn {
  width: fit-content;
}

.logged-box {
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
}

.logged-actions {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.logged-actions a {
  text-decoration: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 1200;
}

.modal-card {
  width: min(520px, 96vw);
  background: #0d0d0d;
  border: 1px solid rgba(212, 175, 55, 0.33);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
  position: relative;
  display: grid;
  gap: 0.65rem;
}

.modal-close {
  position: absolute;
  right: 0.45rem;
  top: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  cursor: pointer;
}

.token-details {
  margin-top: 0.25rem;
}

.token-details summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
}

.token-details form {
  margin-top: 0.6rem;
}

@media (max-width: 780px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero img {
    height: 240px;
  }

  .hero-copy {
    padding: 1.2rem;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}
