:root{
  --bg:#0a0b0c;
  --surface:#0e0f10;
  --ink:#111316;
  --text:#e6eaf0;
  --muted:#88919a;
  --line:#202327;
  --accent:#00c2d1;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,Helvetica,sans-serif;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:inherit;text-decoration:none}

.container{max-width:1140px;margin:0 auto;padding:0 20px}

.header{position:sticky;top:0;z-index:40;background:rgba(10,11,12,.85);backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:40px;height:40px;background:#0f1112;color:#0ad;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line);font-weight:900;font-size:.9rem}
.brandname{font-weight:800;letter-spacing:.06em}
.menu{display:flex;gap:18px}
.menu a{font-weight:800;letter-spacing:.16em;color:#cdd3da;opacity:.9;text-transform:uppercase;font-size:.78rem;padding:8px 6px;border-radius:4px}
.menu a:hover{opacity:1;background:#101215;border:1px solid var(--line)}

.hero{padding:56px 0;border-bottom:1px solid var(--line)}
.hero-wrap{display:grid;grid-template-columns:1.1fr .9fr;gap:28px}
@media (max-width:980px){.hero-wrap{grid-template-columns:1fr}}
.kicker{color:var(--muted);font-weight:800;letter-spacing:.2em;text-transform:uppercase;font-size:.75rem}
.title{margin:6px 0 10px;font-size:2.05rem;line-height:1.05;font-weight:900;letter-spacing:.01em}
.lead{color:#b7c0c8;max-width:720px}
.btns{display:flex;gap:10px;margin-top:16px}
.btn{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 14px;border:1px solid var(--line);border-radius:4px;font-weight:900;letter-spacing:.04em}
.btn.primary{background:var(--accent);color:#031014;border-color:transparent}
.meta-row{display:flex;gap:14px;margin-top:14px;color:var(--muted);font-size:.9rem}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:14px}
.panel h3{margin:0 0 6px;font-size:1rem}
.panel .small{color:var(--muted);font-size:.9rem}

.section{padding:28px 0;border-bottom:1px solid var(--line)}
.section h2{margin:0 0 10px;font-size:1.15rem;letter-spacing:.02em}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media (max-width:980px){.grid-3{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.grid-3,.grid-2{grid-template-columns:1fr}}

.card{background:#0f1112;border:1px solid var(--line);border-radius:6px;padding:14px}
.card h3{margin:0 0 6px;font-size:1rem}
.card .small{color:var(--muted)}

.product{display:flex;flex-direction:column;gap:10px}
.product .img{height:150px;background:#0b0c0e;border:1px dashed #22252a;border-radius:4px;display:flex;align-items:center;justify-content:center;color:#6b7280;font-weight:800;font-size:.9rem}
.row{display:flex;align-items:center;justify-content:space-between}
.price{font-weight:900}

.footer{padding:28px 0;color:var(--muted)}
.small{font-size:.92rem}


/* Popup overlay */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.popup:target { display: flex; }

.popup-content {
  position: relative;
  background: var(--surface);
  padding: 20px;
  border-radius: 8px;
  width: min(400px, 90%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
}
.popup-content label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.popup-content input {
  background: #0b0c0e;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 8px;
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 20px;
  text-decoration: none;
  color: var(--text);
}
/* confirmation view */
.confirm-box{margin-top:8px;padding:12px;border:1px solid var(--line);border-radius:6px;background:#0f1112;display:flex;flex-direction:column;gap:8px}
.big-amount{font-size:1.2rem;font-weight:900}
.countdown{font-weight:800}
.meter{height:8px;background:#0b0c0e;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.meter .bar{height:100%;background:var(--accent);transition:width .25s linear}
/* make clickable things show the hand cursor */
.btn,
.popup-close,
.icon-btn {
  cursor: pointer;
}

/* (optional) a tiny hover feedback */
.btn:hover { filter: brightness(1.05); }

/* Moved from products.html */
.spinner {
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #00f2ff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}\n\n/* Popup headers */
.popup-header { text-align:center; margin-bottom:14px; }
.form-header    { opacity:.95; }
.confirm-header { opacity:1; }\n

/* overlay blur when popup is visible */
.popup { 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* nice fade for the timer/amount panel */
.fade-in { 
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
}
.fade-in.show {
  opacity: 1;
  transform: none;
}

/* minimal BTC paybox */
.btc-paybox{margin:10px 0 14px;padding:10px;border:1px solid #2a2a2a;border-radius:10px;background:rgba(255,255,255,.02)}
.btc-paybox .label{font-size:13px;opacity:.9;margin-bottom:6px}
.btc-paybox .row{display:flex;align-items:center;gap:8px}
.btc-paybox .mono{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}
.btc-paybox .sub{font-size:12px;opacity:.8;margin-top:6px}

/* Wallet copy button and toast */
.btn.sm {
  padding: 4px 8px;
  font-size: 12px;
  margin-left: 6px;
  background: #007bff;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn.sm:hover {
  background: #0056cc;
}
.copy-toast {
  font-size: 12px;
  color: #00ffcc;
  margin-left: 6px;
}


/* Copy button (themed, compact) */
.copy-btn{
  display:inline-block;
  background-color:#111;      /* dark background to match modal */
  color:#00e5ff;              /* cyan accent from theme */
  border:1px solid #00e5ff;   /* thin accent border */
  padding:4px 10px;           /* compact size */
  font-size:0.85em;           /* smaller text */
  border-radius:6px;
  cursor:pointer;
  line-height:1.2;
  margin-left:8px;            /* space from address */
  transition:background-color .2s ease, color .2s ease, border-color .2s ease;
}
.copy-btn:hover{
  background-color:#00e5ff;   /* invert on hover */
  color:#111;
  border-color:#00e5ff;
}


/* === Responsive tweaks for Register (mobile polish) === */
.buy-card .row { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 12px; 
  flex-wrap: wrap;
}
.amount-row { 
  display:flex; 
  align-items:center; 
  justify-content:flex-start; 
  gap:10px; 
  flex-wrap:wrap;
}
.amount-row .value { 
  font-weight: 900; 
  letter-spacing: .3px;
}
.address-row { 
  display:flex; 
  align-items:center; 
  gap:10px; 
  flex-wrap: wrap;
}
.address-row .copy-btn { 
  padding: 8px 12px; 
  font-size: .9rem;
}
/* small screens */
@media (max-width: 480px) {
  .amount-row, .address-row, .buy-card .row {
    justify-content: center;
    text-align: center;
  }
  #btcAddr { 
    max-width: 100%;
    word-break: break-all;
    font-size: .95rem;
  }
  .copy-btn { 
    margin-left: 0;
  }
}

/* ===== Center the registration card on every screen ===== */

/* 1) Make the page a centering context (safe for static sites) */
html, body { height: 100%; }
body {
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: flex-start;    /* keep content near the top */
}

/* 2) Constrain + center the main card (your wrapper uses .buy-card) */
.buy-card {
  width: min(92vw, 880px);   /* responsive width, max ~880px */
  margin-inline: auto;       /* center block horizontally */
  margin-top: 24px;          /* breathing room from top */
}

/* 3) Make inner rows balance visually */
.amount-row,
.address-row,
.buy-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 4) Tighten the “Copy” button so it doesn’t push content off center */
.copy-btn,
.address-row .copy-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* 5) Long address should wrap, not overflow */
#btcAddr {
  max-width: 100%;
  word-break: break-all;
}

/* 6) Small screens: center the rows fully */
@media (max-width: 640px) {
  .amount-row,
  .address-row,
  .buy-card .row {
    justify-content: center;
    text-align: center;
  }
  .copy-btn { margin-left: 0; }
}
/* ===== Perfect page centering for register.html only ===== */
.page-center{
  /* full viewport height with mobile-safe units */
  min-height: 100svh;          /* Safari/iOS-safe */
  display: grid;
  place-items: center;         /* centers both axes */
  padding: 24px;               /* breathing room on small screens */
}

@supports (height: 100dvh) {
  .page-center { min-height: 100dvh; } /* modern viewport unit fallback */
}

/* Keep the card at a balanced width on any device */
.page-center > .register-card{
  width: min(960px, 100%);
  margin: 0 auto;              /* belt & suspenders horizontal center */
}
/* ----- CAPTCHA mobile fixes ----- */
.captcha-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex  rap: nowrap;
}

.captcha-box {
  display: grid;
  place-items: center;
}

.captcha-box canvas {
  max-width: 100%;
  height: auto;
}

.captcha-input {
  flex: 1 1 180px;
  min-width: 160px;
}

@media (max-width: 480px) {
  .captcha-wrap {
    flex-wrap: wrap;
  }

  .captcha-box {
    flex: 0 0 100%;
    width: 100%;
  }

  .captcha-input {
    flex: 1 1 100%;
    width: 100%;
    font-size: 18px;
    line-height: 1.2;
    height: 48px;
    padding: 12px 14px;
    letter-spacing: 2px;
    box-sizing: border-box;
  }

  .captcha-refresh {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
  }
}