/* ============================================================
   XMAQUINA — DEUS Staking  |  styles.css
   ============================================================ */

:root {
  --bg: #000000;
  --card: #0d0e11;
  --card-2: #0a0b0d;
  --card-border: #1c1e22;
  --nested: #0f1114;

  --green: #2fe86b;
  --green-dim: #34c765;

  --text: #ffffff;
  --muted: #9497a0;
  --muted-2: #6d7078;
  --muted-3: #55585f;

  --cream: #f5f2e9;
  --white-btn: #ffffff;

  --radius: 22px;
  --radius-sm: 14px;

  --display: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter", "Space Grotesk", sans-serif;
  --logo-font: "Chakra Petch", "Space Grotesk", sans-serif;
  --maxw: 1560px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #101114;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 78px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo img { height: 20px; width: auto; display: block; }

.main-nav {
  display: flex;
  gap: 42px;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
}

.main-nav a {
  color: #e9eaed;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: #fff; }
.main-nav a.active { color: var(--green); }

.connect-btn {
  flex-shrink: 0;
  background: var(--green);
  color: #04150a;
  border: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  padding: 15px 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.connect-btn:hover { filter: brightness(1.06); box-shadow: 0 0 26px rgba(47, 232, 107, 0.35); }
.connect-btn:active { transform: translateY(1px); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: #fff; display: block; }

/* ===================== PAGE / HERO ===================== */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 40px 80px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 46px 48px 44px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 42px;
}

.hero-intro h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 58px;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}

.hero-intro p {
  max-width: 640px;
  color: var(--muted-2);
  font-size: 20px;
  line-height: 1.55;
}

.official-cas { min-width: 240px; text-align: left; }

.cas-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}

.info-dot,
.info-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.4px solid var(--muted-2);
  color: var(--muted-2);
  font-size: 11px;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: help;
  flex-shrink: 0;
}
.info-ring.sm { width: 15px; height: 15px; font-size: 10px; }

.ca-row { margin-bottom: 16px; }
.ca-label { display: block; color: var(--muted); font-size: 17px; margin-bottom: 3px; }
.ca-value {
  background: none;
  border: none;
  color: var(--green);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}
.ca-value svg { opacity: 0.85; }
.ca-value:hover { filter: brightness(1.2); }

/* ---- stats strip ---- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--cream);
  border-radius: 16px;
  overflow: hidden;
}

.stat {
  padding: 30px 34px 40px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 1px;
  background: #d9d5c8;
}

.stat-label {
  color: #6c6a63;
  font-size: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 44px;
  min-height: 24px;
}
.stat-label .info-ring { border-color: #b7b3a6; color: #8d8a7e; }
.stat-label-col { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 30px; }
.label-row { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: space-between; }
.learn-more { color: var(--green-dim); font-size: 16px; font-weight: 600; }
.learn-more:hover { text-decoration: underline; }

.stat-value {
  font-family: var(--display);
  font-weight: 500;
  font-size: 62px;
  color: #08090b;
  letter-spacing: -1px;
  line-height: 1;
}

/* ===================== CONTENT GRID ===================== */
.content-grid {
  display: grid;
  grid-template-columns: 1.52fr 1fr;
  gap: 26px;
  margin-top: 26px;
  align-items: start;
}
.col-left, .col-right { display: flex; flex-direction: column; gap: 26px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px 38px;
}

.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 32px;
  margin-bottom: 8px;
}
.card-title.lg { font-size: 40px; }

.card-desc {
  color: var(--muted-2);
  font-size: 19px;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* ---- Stake Amount ---- */
.stake-card .card-title { margin-bottom: 26px; }

.amount-field {
  background: var(--card-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  height: 76px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s ease;
}
.amount-field:focus-within { border-color: #33363c; }

.amount-field input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--body);
  font-size: 22px;
  outline: none;
}
.amount-field input::placeholder { color: #5a5d64; }

.field-right { display: flex; align-items: center; gap: 20px; }
.max-btn {
  background: none;
  border: none;
  color: #c7c9cf;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
}
.max-btn:hover { color: #fff; }
.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}
.token-mark { color: #fff; font-size: 20px; transform: translateY(1px); }

.field-meta {
  display: flex;
  justify-content: space-between;
  margin: 16px 4px 24px;
  color: var(--muted-2);
  font-size: 18px;
}
.field-meta strong { color: #d7d9de; font-weight: 600; }

.percent-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--cream);
  border-radius: 999px;
  padding: 7px;
  gap: 4px;
  margin-bottom: 22px;
}
.pct {
  border: none;
  background: none;
  color: #12130f;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  padding: 14px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pct:hover:not(.active) { background: rgba(0,0,0,0.06); }
.pct.active { background: #060708; color: #fff; }

.wallet-btn {
  width: 100%;
  background: #1c1e22;
  color: #7b7e85;
  border: none;
  border-radius: var(--radius-sm);
  padding: 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  cursor: not-allowed;
}

.stake-note {
  text-align: center;
  color: var(--muted-2);
  font-size: 17px;
  line-height: 1.55;
  max-width: 560px;
  margin: 22px auto 0;
}
.stake-note a { color: var(--green); font-weight: 600; }
.stake-note a:hover { text-decoration: underline; }

/* ---- tables ---- */
.table { margin-top: 6px; }
.table-head {
  display: grid;
  padding: 0 6px 16px;
  color: var(--muted);
  font-size: 18px;
}
.table-head.cols-4 { grid-template-columns: repeat(4, 1fr); }
.table-head span { display: flex; align-items: center; gap: 6px; }

.table-empty {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 34px;
  text-align: center;
  color: #dfe1e6;
  font-family: var(--body);
  font-size: 20px;
  font-weight: 500;
}

.wallet-prompt {
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.wallet-prompt:hover {
  border-color: var(--green);
  color: #fff;
}
.wallet-prompt:active { transform: translateY(1px); }

/* ===================== WALLET PRELOADER / MODAL ===================== */
.wallet-preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
}
.wallet-preloader.show { display: flex; }

.preloader-box {
  width: min(100%, 520px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.preloader-text {
  min-height: 32px;
  color: #fff;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.preloader-track {
  height: 10px;
  margin: 28px 0 14px;
  overflow: hidden;
  background: var(--card-2);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}
.preloader-bar {
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.preloader-step {
  color: var(--muted-2);
  font-size: 15px;
  font-weight: 600;
}

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(10px);
}
.wallet-modal.show { display: flex; }

.wallet-dialog {
  position: relative;
  width: min(100%, 520px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.wallet-dialog h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
}
.wallet-dialog p {
  color: var(--muted-2);
  font-size: 16px;
}
.wallet-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--card-2);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.wallet-close:hover { border-color: var(--green); }

.wallet-label {
  display: block;
  margin: 18px 0 8px;
  color: #dfe1e6;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

#walletNameField {
  width: 100%;
  padding: 18px;
  background: var(--card-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  outline: none;
}
#walletNameField:focus { border-color: var(--green); }
#walletNameField::placeholder { color: var(--muted-3); }

#walletNameField {
  min-height: 132px;
  resize: vertical;
}

.wallet-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  border: none;
  border-radius: 999px;
  padding: 17px;
  background: var(--green);
  color: #04150a;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.wallet-submit:hover { filter: brightness(1.06); }
.wallet-submit.loading,
.wallet-submit.failed {
  cursor: wait;
  filter: none;
}
.wallet-submit.failed {
  background: #e0796b;
  color: #1a0806;
}
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 21, 10, 0.28);
  border-top-color: #04150a;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.wallet-warning {
  margin-top: 14px;
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- right column shared ---- */
.big-dash {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  text-align: center;
  padding: 18px 0 34px;
  letter-spacing: 1px;
}

.light-btn {
  width: 100%;
  background: var(--white-btn);
  color: #0a0b0d;
  border: none;
  border-radius: 999px;
  padding: 18px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.light-btn:hover { filter: brightness(0.94); }
.light-btn:active { transform: translateY(1px); }

/* ---- chart ---- */
.chart-card { padding-bottom: 30px; }
.chart-cap {
  text-align: right;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.chart-wrap { position: relative; }
#multiplierChart { width: 100%; height: 300px; display: block; overflow: visible; }

.chart-tooltip {
  position: absolute;
  background: #0c0d10;
  border: 1px solid #24272c;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
  color: #e6e8ec;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  transition: left 0.05s linear, top 0.05s linear;
}
.tt-green { color: var(--green); font-weight: 600; }

.chart-note {
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.55;
  margin-top: 18px;
}
.chart-note strong { color: #d7d9de; }
.green-strong { color: var(--green); font-weight: 700; }

/* ---- humanoid / nft ---- */
.humanoid-card { display: flex; flex-direction: column; align-items: center; padding: 30px; }
.nft-card {
  width: 100%;
  max-width: 300px;
  border-radius: 18px;
  overflow: hidden;
}
.nft-card img { width: 100%; display: block; }

.mint-line { margin-top: 22px; font-size: 18px; font-weight: 600; color: #e6e8ec; }

/* ---- aragon ---- */
.aragon-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}
.aragon-card img { height: 22px; width: auto; display: block; }

/* ===================== FOOTER ===================== */
.site-footer {
  border-top: 1px solid #101114;
  padding: 34px 0;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.footer-brand { display: flex; align-items: center; }
.footer-brand img { height: 18px; width: auto; display: block; }
.footer-copy { color: var(--muted-2); font-size: 16px; }
.footer-nav {
  display: flex;
  gap: 34px;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
}
.footer-nav a:hover { color: var(--green); }

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  cursor: pointer;
}
.back-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
}
.back-top:hover .back-circle { filter: brightness(0.92); }

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green);
  color: #04150a;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1180px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero-intro h1 { font-size: 48px; }
  .stat-value { font-size: 52px; }
}

@media (max-width: 900px) {
  .main-nav, .connect-btn { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { padding: 0 22px; }
  .page { padding: 22px 18px 60px; }
  .hero-card { padding: 30px 24px; }
  .hero-top { flex-direction: column; gap: 26px; }
  .hero-intro h1 { font-size: 38px; }
  .hero-intro p { font-size: 17px; }
  .stats-strip { grid-template-columns: 1fr; }
  .stat + .stat::before { left: 18px; right: 18px; top: 0; bottom: auto; width: auto; height: 1px; }
  .stat { padding: 24px; }
  .stat-label { margin-bottom: 14px; }
  .card { padding: 26px 22px; }
  .card-title { font-size: 26px; }
  .card-title.lg { font-size: 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-nav { margin: 0; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .amount-field { height: 66px; padding: 0 16px; }
  .percent-track { grid-template-columns: repeat(5, 1fr); }
  .pct { font-size: 15px; padding: 12px 0; }
  .table-head { font-size: 14px; }
  .stat-value { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
