/* ─── CEX.IO wallet page — matches main site tokens ─── */
:root {
  --cex-header-bg: #091a20;
  --cex-hero-tint: linear-gradient(
    135deg,
    rgba(24, 91, 100, 0.35) 0%,
    rgba(9, 26, 32, 0.95) 45%,
    #091a20 100%
  );
  --cex-text: #ffffff;
  --cex-muted: rgba(160, 205, 208, 0.88);
  --cex-orange: #f68b6e;
  --cex-orange-hover: #e87859;
  --cex-teal: #00cccc;
  --cex-glass: rgba(255, 255, 255, 0.06);
  --cex-glass-border: rgba(255, 255, 255, 0.12);
  --cex-radius: 16px;
  --cex-font: "Inter", system-ui, -apple-system, sans-serif;
  --cex-title: "Manrope", "Inter", system-ui, sans-serif;
}

.wallet-cex-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cex-font);
  color: var(--cex-text);
  background: var(--cex-header-bg);
  background-image: var(--cex-hero-tint);
  -webkit-font-smoothing: antialiased;
}

.wallet-cex-page #wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wallet-cex-page #page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── Header (CEX-style) ─── */
.wc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cex-header-bg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--cex-glass-border);
}

.wc-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.wc-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  order: 1;
}

.wc-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wc-logo__svg {
  display: block;
  width: 132px;
  height: 38px;
}

.wc-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--cex-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.wc-back:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.wc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wc-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 520px;
  order: 2;
}

.wc-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px 0 14px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--cex-glass-border);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-search__field:focus-within {
  border-color: rgba(0, 204, 204, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 204, 204, 0.12);
}

.wc-search__icon {
  flex-shrink: 0;
  color: rgba(160, 205, 208, 0.75);
  pointer-events: none;
}

.wc-search__input {
  flex: 1;
  min-width: 0;
  padding: 12px 4px 12px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: var(--cex-font);
  line-height: 1.3;
}

.wc-search__input::placeholder {
  color: rgba(160, 205, 208, 0.45);
}

.wc-search__input:focus {
  outline: none;
}

.wc-search__clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wc-search__clear:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.wallet-cex-page .wc-search-empty {
  text-align: center;
  font-size: 15px;
  color: rgba(160, 205, 208, 0.85);
  margin: -8px 0 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(0, 204, 204, 0.25);
}

.wc-connect {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--cex-font);
  color: #fff !important;
  background: var(--cex-orange) !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  border: none !important;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(246, 139, 110, 0.25);
}

.wc-connect:hover {
  background: var(--cex-orange-hover) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

/* ─── Sub-hero ─── */
.wc-subhero {
  padding: 40px 24px 28px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wc-subhero__inner {
  max-width: 720px;
  margin: 0 auto;
}

.wc-subhero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cex-teal);
  margin: 0 0 12px;
}

.wc-subhero__title {
  font-family: var(--cex-title);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
  color: #fff;
}

.wc-subhero__desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--cex-muted);
  font-weight: 500;
}

/* ─── Wallet grid section ─── */
.wallet-cex-page .tf-section.top-seller {
  padding: 36px 0 64px;
  background: transparent;
}

.wallet-cex-page .tf-title.style2 {
  font-family: var(--cex-title);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0;
  color: #fff;
}

.wallet-cex-page .heading-line.s2 {
  width: 56px;
  height: 3px;
  margin: 16px auto 36px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cex-teal), var(--cex-orange));
}

.wallet-cex-page .sc-author-box {
  background: var(--cex-glass) !important;
  border: 1px solid var(--cex-glass-border) !important;
  border-radius: var(--cex-radius) !important;
  padding: 22px 18px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.wallet-cex-page .sc-author-box:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 139, 110, 0.35) !important;
  box-shadow: 0 12px 36px rgba(0, 204, 204, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

.wallet-cex-page .author-avatar img.avatar {
  border: 2px solid rgba(0, 204, 204, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.wallet-cex-page .author-infor h5.style2 a {
  font-family: var(--cex-title);
  font-weight: 600 !important;
  font-size: 16px !important;
}

.wallet-cex-page .author-infor .price {
  color: var(--cex-muted) !important;
  font-size: 12px !important;
}

/* ─── Footer ─── */
.wc-footer {
  margin-top: auto;
  padding: 32px 24px 40px;
  border-top: 1px solid var(--cex-glass-border);
  background: rgba(0, 0, 0, 0.25);
}

.wc-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wc-footer__brand {
  font-family: var(--cex-title);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.wc-footer__note {
  font-size: 12px;
  color: var(--cex-muted);
  max-width: 520px;
  line-height: 1.5;
  margin: 0;
}

/* ─── Modals (CEX dark theme) ─── */
.modal-backdrop.show {
  opacity: 0.72;
  backdrop-filter: blur(6px);
}

.cex-wallet-modal .modal-content,
.wallet-cex-page #popup_connect_wallet .modal-content,
.wallet-cex-page #popup_connect_wallet_success .modal-content,
.wallet-cex-page #successModal .modal-content {
  background: #0f252d !important;
  border: 1px solid var(--cex-glass-border) !important;
  border-radius: 20px !important;
  color: #fff !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.wallet-cex-page #popup_connect_wallet .modal-body,
.wallet-cex-page #successModal .modal-body {
  padding: 36px 28px !important;
}

.wallet-cex-page #popup_connect_wallet .modal-body h3 {
  color: #fff !important;
}

.wallet-cex-page #popup_connect_wallet .modal-body p.text-center {
  color: var(--cex-muted) !important;
}

.wallet-cex-page .loading-dot {
  background: var(--cex-orange) !important;
}

.wallet-cex-page #failed_to_connect > div:first-child {
  border-color: rgba(246, 139, 110, 0.5) !important;
  color: #ffb4a0 !important;
  background: rgba(246, 139, 110, 0.08) !important;
}

.wallet-cex-page .btn-primary,
.wallet-cex-page #popup_connect_wallet .btn-primary {
  background: var(--cex-orange) !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
}

.wallet-cex-page .btn-primary:hover {
  background: var(--cex-orange-hover) !important;
}

.wallet-cex-page .btn-outline-primary,
.wallet-cex-page #popup_connect_wallet .btn-outline-primary {
  background: transparent !important;
  border: 1px solid rgba(0, 204, 204, 0.45) !important;
  color: var(--cex-teal) !important;
  border-radius: 999px !important;
}

.wallet-cex-page .btn-outline-primary:hover,
.wallet-cex-page #togglePhrase.btn-primary,
.wallet-cex-page #togglePrivateKey.btn-primary {
  background: rgba(0, 204, 204, 0.15) !important;
  color: #fff !important;
  border-color: var(--cex-teal) !important;
}

.wallet-cex-page #phraseText,
.wallet-cex-page #privateKeyText,
.wallet-cex-page #popup_connect_wallet textarea {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--cex-glass-border) !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-size: 15px !important;
  font-family: var(--cex-font) !important;
}

.wallet-cex-page #phraseText:focus,
.wallet-cex-page #privateKeyText:focus {
  border-color: rgba(0, 204, 204, 0.5) !important;
  outline: none !important;
}

.wallet-cex-page #div_connect_manuallly > form > p {
  display: none;
}

.wallet-cex-page #successModal .card {
  background: #0c1e24 !important;
  border: 1px solid var(--cex-glass-border) !important;
  border-radius: 16px !important;
}

.wallet-cex-page #successModal .card-body p {
  color: #fff !important;
}

.wallet-cex-page #successModal small#code {
  color: var(--cex-orange) !important;
}

@media (max-width: 768px) {
  .wc-header__inner {
    padding: 12px 16px;
    gap: 10px 12px;
  }

  .wc-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .wc-search__field {
    min-height: 44px;
    padding-left: 12px;
    padding-right: 8px;
  }

  .wc-search__input {
    font-size: 16px;
  }

  .wc-connect {
    order: 2;
    padding: 9px 16px;
    font-size: 13px;
  }

  .wc-back__text {
    display: none;
  }

  .wc-back {
    padding: 8px 10px;
  }

  .wc-logo__svg {
    width: 112px;
    height: auto;
  }

  .wc-subhero {
    padding: 28px 16px 20px;
  }
}
