:root {
  --bg: #07110d;
  --panel: rgba(8, 18, 14, 0.72);
  --panel-strong: rgba(9, 20, 16, 0.9);
  --text: #f3f8ef;
  --muted: #b9c8b6;
  --gold: #ffc857;
  --green: #44d17a;
  --cyan: #48d8ff;
  --stone: #8b9a91;
  --danger: #ff7b61;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(68, 209, 122, 0.16), transparent 28%),
    radial-gradient(circle at 88% 24%, rgba(255, 200, 87, 0.1), transparent 26%),
    linear-gradient(180deg, #102819 0%, #0d1b12 42%, #07100c 100%);
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.42s ease, transform 0.42s ease, filter 0.42s ease;
}

main {
  flex: 1 0 auto;
}

body.page-ready {
  opacity: 1;
  transform: translateY(0);
}

body.page-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.992);
  filter: blur(4px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(180deg, rgba(83, 174, 87, 0.38) 0 18%, transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, rgba(98, 66, 39, 0.8) 0 25%, rgba(64, 46, 31, 0.84) 25% 50%, rgba(30, 35, 33, 0.88) 50% 75%, rgba(88, 90, 82, 0.58) 75%);
  background-size: auto, 64px 64px, 64px 64px, 128px 128px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  opacity: 0.5;
  image-rendering: pixelated;
}

body.home::before {
  background-image: url("assets/reliccraft-hero.png");
  background-size: cover;
  background-position: center;
  opacity: 0.46;
  transform: scale(1.03);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(0, 0, 0, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 12, 10, 0.1), rgba(5, 12, 10, 0.9));
  background-size: 32px 32px, 32px 32px, auto;
  animation: gridDrift 22s steps(12, end) infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 32px 32px, 32px 32px, 0 0; }
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.sky span {
  position: absolute;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 24px var(--c);
  opacity: 0.62;
  animation: floatBits var(--d) ease-in-out infinite alternate;
}

@keyframes floatBits {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(var(--mx), var(--my), 0) rotate(12deg); }
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 12, 9, 0.75);
  backdrop-filter: blur(18px);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(68, 209, 122, 0.9), rgba(255, 200, 87, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(0, 0, 0, 0.16) 8px 16px);
  box-shadow: 0 0 28px rgba(68, 209, 122, 0.38);
  color: #07110d;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 14px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  border-radius: 7px;
  background: rgba(255, 200, 87, 0.11);
  color: #ffe4a0;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(54px, 10vw, 118px);
  line-height: 0.86;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: #dce8d7;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.55;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.connect-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-top: 26px;
}

.connect-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.connect-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.connect-item strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.copy-btn {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 38px;
  border: 1px solid rgba(72, 216, 255, 0.32);
  border-radius: 7px;
  color: var(--text);
  background: rgba(72, 216, 255, 0.14);
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s, background 0.18s;
}

.copy-btn:hover {
  transform: translateY(-2px);
  background: rgba(72, 216, 255, 0.24);
}

.btn {
  --btn-a: var(--green);
  --btn-b: var(--gold);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #07110d;
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 12px 30px rgba(68, 209, 122, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(255, 255, 255, 0.12) 12px 13px);
  transform: translateX(-140%);
  transition: transform 0.45s;
}

.btn:hover {
  transform: translateY(-3px);
  filter: saturate(1.12);
  box-shadow: 0 18px 42px rgba(68, 209, 122, 0.34), 0 0 34px rgba(255, 200, 87, 0.22);
}

.btn:hover::before {
  transform: translateX(140%);
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn.alt {
  --btn-a: rgba(72, 216, 255, 0.18);
  --btn-b: rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-panel,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 20px;
}

.server-card {
  min-height: 390px;
  display: grid;
  align-content: end;
  padding: 20px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent, rgba(6, 14, 11, 0.85)),
    url("assets/reliccraft-hero.png") center / cover;
  overflow: hidden;
}

.status-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.stat {
  padding: 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat strong {
  display: block;
  color: var(--gold);
  font-size: 22px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 72px 0;
}

.section:last-of-type {
  padding-bottom: 48px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section h2,
.page-title h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
}

.section p,
.page-title p,
.card p,
.panel p {
  color: var(--muted);
  line-height: 1.65;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.feature-strip {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  align-items: stretch;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(72, 216, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36), 0 0 38px rgba(72, 216, 255, 0.12);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(5, 12, 10, 0.14), rgba(5, 12, 10, 0.82)),
    url("https://img.youtube.com/vi/u31qwQUeGuM/maxresdefault.jpg") center / cover;
}

.video-fallback span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #07110d;
  box-shadow: 0 16px 45px rgba(68, 209, 122, 0.28);
  font-weight: 900;
}

.video-frame iframe:not([src]) {
  display: none;
}

.card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 29, 22, 0.86), rgba(9, 19, 16, 0.72));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.card.warn {
  border-color: rgba(255, 200, 87, 0.34);
  background: linear-gradient(180deg, rgba(44, 32, 14, 0.82), rgba(13, 29, 22, 0.74));
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(68, 209, 122, 0.16);
  border: 1px solid rgba(68, 209, 122, 0.32);
  color: var(--green);
  font-weight: 900;
}

.page-title {
  padding: 72px 0 38px;
}

.panel {
  padding: 26px;
}

.list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #dce8d7;
}

.list li::before {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 0 18px rgba(68, 209, 122, 0.45);
}

.steps {
  counter-reset: step;
}

.steps .card {
  position: relative;
}

.steps .card::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(255, 255, 255, 0.12);
  font-size: 46px;
  font-weight: 900;
}

.footer {
  flex-shrink: 0;
  padding: 22px 0;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(5, 12, 9, 0.72), rgba(5, 12, 9, 0.94));
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 44px;
}

.bank-shell {
  padding: 46px 0 72px;
}

.bank-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: start;
}

.bank-auth,
.bank-panel,
.bank-widget,
.bank-table {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 18, 14, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.bank-auth,
.bank-panel,
.bank-widget {
  padding: 22px;
}

.bank-panel {
  display: grid;
  gap: 16px;
}

.bank-auth.bank-hidden + .bank-panel {
  grid-column: 1 / -1;
  max-width: 900px;
}

.bank-cardline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bank-metric {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(68, 209, 122, 0.12), rgba(255, 255, 255, 0.06));
}

.bank-metric small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.bank-metric strong {
  display: block;
  font-size: clamp(22px, 4vw, 34px);
  overflow-wrap: anywhere;
}

.bank-form {
  display: grid;
  gap: 12px;
}

.bank-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bank-form input,
.bank-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  outline: none;
}

.bank-form select option {
  color: #07110d;
}

.bank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bank-actions .btn {
  min-height: 46px;
}

.bank-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.bank-status {
  min-height: 22px;
  color: var(--gold);
  font-weight: 900;
}

.bank-status.ok {
  color: var(--green);
}

.bank-status.bad {
  color: var(--danger);
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bank-widget {
  min-width: 0;
}

.bank-table {
  overflow: hidden;
}

.bank-table h3 {
  padding: 18px 20px 0;
}

.bank-history {
  display: grid;
  max-height: 360px;
  overflow: auto;
  padding: 12px 20px 20px;
}

.bank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bank-row:last-child {
  border-bottom: 0;
}

.bank-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.bank-amount.plus {
  color: var(--green);
}

.bank-amount.minus {
  color: var(--danger);
}

.bank-hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .nav-inner,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid,
  .grid,
  .grid.two,
  .feature-strip,
  .bank-layout,
  .bank-cardline,
  .bank-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .status-line {
    grid-template-columns: 1fr;
  }

  .connect-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 22px, 1120px);
  }

  h1 {
    font-size: 52px;
  }

  .nav-links a {
    padding: 9px 8px;
  }

  .btn {
    width: 100%;
  }
}
