:root {
  color-scheme: dark;
  --bg: #080a0d;
  --panel: rgba(20, 24, 30, 0.88);
  --panel-strong: rgba(32, 37, 45, 0.94);
  --line: rgba(236, 203, 131, 0.22);
  --text: #f4ecd9;
  --muted: #aeb5be;
  --gold: #f0bd54;
  --green: #65d796;
  --red: #f06c5f;
  --shadow: rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.24) 48%, rgba(0, 0, 0, 0.72)),
    linear-gradient(145deg, rgba(42, 24, 20, 0.8), rgba(8, 12, 17, 0.92) 48%, rgba(14, 37, 37, 0.76)),
    url("/images/ui/alphscoundrel-banner-cropped.jpg") center / cover fixed,
    var(--bg);
}

button, input { font: inherit; }

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.mast {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10, 13, 18, 0.88), rgba(10, 13, 18, 0.62)),
    rgba(18, 22, 28, 0.76);
  box-shadow: 0 18px 44px var(--shadow);
  backdrop-filter: blur(14px);
}

.back-link {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 11px;
  font-size: 0.95rem;
  font-weight: 750;
}

.mark {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 3.4rem;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.mast-copy {
  min-width: 0;
}

.round-context {
  margin: 10px 0 0;
  color: #d9e3d8;
  font-size: 1.02rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 44px var(--shadow);
  backdrop-filter: blur(14px);
}

.economy {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.economy > div {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.label, .field span, dt {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

strong {
  display: block;
  margin-top: 7px;
  font-size: 1.38rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.boost-form {
  margin-top: 14px;
  padding: 16px;
}

.form-head {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.form-head strong {
  font-size: 1.18rem;
}

.entry-fee-note {
  min-width: 170px;
  text-align: right;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.entry-fee-note strong {
  color: #dfe7dd;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(180deg, #303a46, #1d242d);
  font-weight: 820;
  cursor: pointer;
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.preset.active {
  color: #1a1205;
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, #ffd477, #c78f32);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 5, 8, 0.76);
  color: var(--text);
  padding: 12px 14px;
  font-size: 1.16rem;
  font-weight: 760;
}

.boost-btn {
  width: 100%;
  margin-top: 12px;
  min-height: 52px;
  background: linear-gradient(180deg, #42a46c, #276947);
}

.details {
  margin-top: 14px;
  padding: 0 18px;
}

summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
  cursor: pointer;
}

.details[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

dl {
  margin: 0;
}

dl > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

dl > div:first-child {
  border-top: 0;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.ok { color: var(--green); }
.error { color: var(--red); }

@media (max-width: 860px) {
  .shell { padding: 16px; }
  .mast {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  .mark {
    width: 68px;
    height: 68px;
  }
  h1 {
    font-size: 2.45rem;
  }
  .round-context {
    font-size: 1rem;
  }
  .economy, .amount-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-head {
    display: grid;
    gap: 12px;
  }
  .entry-fee-note {
    min-width: 0;
    text-align: left;
  }
  dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .shell { padding: 12px; }
  .mast {
    padding: 14px;
  }
  h1 {
    font-size: 2.05rem;
  }
  .economy > div {
    min-height: 94px;
    padding: 14px;
  }
  .amount-grid {
    grid-template-columns: 1fr 1fr;
  }
}
