/* ===== Global variables ===== */
@font-face {
  font-family: "Alarm Clock";
  src: url("../fonts/AlarmClock.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Evolventa";
  src: url("../fonts/Evolventa-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Evolventa";
  src: url("../fonts/Evolventa-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}
:root {
  --bg-main: #000000;
  --bg-card: #1c1c1c;
  --bg-card-soft: #151515;
  --text-main: #ffffff;
  --text-muted: #bcbcbc;
  --text-soft: #8f8f8f;
  --border-soft: #2b2b2b;
  --accent: #ffffff;
  --accent-soft: #dcdcdc;
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #000000;
  --radius-lg: 10px;
  --radius-xl: 999px;
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.8);
  --app-max-width: 480px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: "Evolventa", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  padding: 20px 25px 28px;
}

/* Top bar ------------------------------------------------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.brand-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.top-center-icon {
  width: 35px;
  height: 35px;
  border-radius: 999px;
  background: #f3b940;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-left: 45px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
}

/*
.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #6d6d6d;
  background: transparent;
  color: var(--text-main);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
*/

.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #6d6d6d;
  background: transparent;
  color: var(--text-main);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

/* 按下时的高亮状态，用 JS 来加/减这个 class */
.wallet-btn--pressed {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  transform: scale(0.97); /* 轻微压下感，可按需删掉 */
}

.wallet-icon {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wallet-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* 不变形、清晰缩放 */
  display: block;
}

/* Nav tabs ------------------------------------------------ */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 15px;
  margin-bottom: 14px;
}

.nav-tab {
  position: relative;
  font-size: 16px;
  color: var(--text-soft);
  cursor: pointer;
  padding-bottom: 4px;
}

.nav-tab.active {
  color: var(--text-main);
  font-weight: 700;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: var(--accent);
  border-radius: 999px;
}

/* Main container ------------------------------------------ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Section heading (with lines) ---------------------------- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  margin-top: 10px;
}

.section-heading::before,
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #404040;
}

.section-heading span {
  font-size: 16px;
  color: var(--text-soft);
}

/* Card base ----------------------------------------------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}

.card-light {
  background: var(--bg-card-soft);
}

.card-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.card-half {
  flex: 1;
}

.label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.value-lg {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.value-md {
  font-size: 16px;
  /*
  font-weight: 700;
  */
}

.value-sm {
  font-size: 14px;
  font-weight: 400;
}

/* Buttons ------------------------------------------------- */
.btn-primary {
  width: 100%;
  border-radius: var(--radius-xl);
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  height: 54px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(255, 255, 255, 0.05);
  margin-top: 5px;
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.9);
}

.btn-outline {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--accent-soft);
  background: transparent;
  color: var(--text-main);
  height: 54px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 12px;
}

/* Copy row ------------------------------------------------ */
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-text {
  font-size: 13px;
  color: #f5f5f5;
  word-break: break-all;
}

.copy-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
}

.copy-btn-wrap {
  position: relative;
  display: inline-flex;      /* 或 flex 都行，这里推荐 inline-flex 更贴合按钮 */
  align-items: center;
  justify-content: center;
}

.copy-feedback {
  position: absolute;
  bottom: calc(100% + 4px);  /* 在按钮上方 4px 的位置 */
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-size: 9px;
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

/* 有 copied 状态时，淡入&上移一点点 */
.copy-btn-wrap.copied .copy-feedback {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 复制按钮按下时的“变暗”效果 */
.copy-btn {
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.copy-btn--pressed {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(0.94);
}

/* Hint text ----------------------------------------------- */
.hint {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 10px;
}

/* Mint page ----------------------------------------------- */
.tab-mint {
  animation: fadeIn 0.18s ease-out;
}

.countdown-block {
  text-align: center;
  margin-bottom: 30px;
}

.countdown-labels {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 9px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.countdown-digits {
  font-family: "Alarm Clock", "Evolventa", system-ui, sans-serif;
  font-size: 26px;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.remaining-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.remaining-title {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 0 12px;
  font-size: 15px;
  color: var(--text-soft);
  /*background: var(--bg-main);*/
  text-align: center;
  white-space: nowrap;
}

.remaining-main {
  text-align: left;
  margin-bottom: 12px;
}

.remaining-main .value-lg {
  font-size: 24px;
  letter-spacing: 0.05em;
}

.progress-wrapper {
  position: relative;
  margin-top: 6px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #3c3c3c;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #bcbcbc, #fefefe);
  border-radius: 999px;
  transform: translateZ(0);
}

.progress-percent {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  transform: translateX(-50%);
  font-size: 10px;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.progress-percent span {
  display: inline-block;
  padding: 3px 5px 3px 5px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: transparent;
  box-shadow: 0 0 4px #fff100;
}

.minted-text {
  margin-top: 35px;
  font-size: 15px;
  color: var(--text-soft);
  text-align: left;
}

.select-amount-title {
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--text-soft);
}

.amount-grid {
  display: flex;
  gap: 10px;
  position: relative;
}
/*
.amount-card {
  flex: 1;
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}
*/

/* 每个选项块：本身边框设为透明，让高亮边框来画边框 */
.amount-card {
  flex: 1;
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;                  /* 保证在高亮边框之上 */
}

/*
.amount-card.active {
  border-color: #ffffff;
}
*/
.amount-card-line1 {
  position: relative;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 18px;
}

/* 滑动的高亮边框 */
.amount-highlight {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;                     /* 初始化为 0，JS 会设置为卡片宽度 */
  border-radius: var(--radius-lg);
  border: 1px solid #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 2;
  /* 加速感 / 弹性感的运动曲线（可以微调） */
  transition:
    transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.amount-card-line1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 86%;
  height: 1px;
  background-color: var(--border-soft);
  opacity: 1;
}

.amount-card-line2 {
  font-size: 12px;
  color: var(--text-soft);
}

.wallet-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 8px 2px;
  font-size: 13px;
  color: var(--text-soft);
}

.wallet-small-icon {
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-small-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Assets page --------------------------------------------- */
.tab-assets {
  animation: fadeIn 0.18s ease-out;
}

.assets-balance {
  text-align: center;
}

.assets-balance .label {
  margin-bottom: 8px;
}

.assets-balance .value-lg {
  font-size: 32px;
}

.two-col-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.two-col-row .card {
  margin-bottom: 0;
}

.claim-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.claim-item {
  flex: 1;
}

.claim-item .value-md {
  margin-top: 4px;
}

/* Rewards page -------------------------------------------- */
.tab-rewards {
  animation: fadeIn 0.18s ease-out;
}

.rewards-total {
  text-align: left;
}

.rewards-total-main {
  margin: 8px 0 14px;
}

.rewards-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 2px;
}

.rewards-row .label {
  margin-bottom: 2px;
}

/* Footer -------------------------------------------------- */
footer {
  margin-top: 30px;
  text-align: center;
  font-size: 11px;
  color: #3c3c3c;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.social-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.social-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

/* ========== Skeleton / Shimmer Loading ========== */

.skeleton-container {
  animation: fadeIn 0.18s ease-out;
}

.skeleton-block {
  background: #161616;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.skeleton-header {
  width: 50%;
  height: 16px;
  border-radius: 8px;
  background: #262626;
  margin: 0 auto 18px;
}

.skeleton-line {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #262626;
  margin-bottom: 10px;
}

.skeleton-pill {
  width: 30%;
  height: 18px;
  border-radius: 999px;
  background: #262626;
  margin-top: 6px;
}

.skeleton-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.skeleton-half {
  flex: 1;
  height: 60px;
  border-radius: var(--radius-lg);
  background: #191919;
  position: relative;
  overflow: hidden;
}

/* shimmer 扫光效果，附在 block / half 上 */
.skeleton-block::before,
.skeleton-half::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.10) 30%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: skeletonShimmer 1.4s infinite;
}

/* 轻微淡入动画可复用原来的 fadeIn / 或重新定义 */
@keyframes skeletonShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* === XPAY 追加的最终按钮禁用效果 === */
.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.5 !important;
  pointer-events: none;
}

/* Animations & responsive -------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 360px) {
  .nav-tabs {
    gap: 26px;
  }
  .brand-title {
    font-size: 12px;
  }
}

/* ========== Node Reward Modal ========== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  width: 90%;
  max-width: 420px;
  background: #121212;
  border-radius: var(--radius-lg);
  border: 1px solid #2b2b2b;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

.modal-field {
  margin-bottom: 12px;
}

.field-label {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.field-value {
  font-size: 10px;
  word-break: break-all;
  background: #181818;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
}

.modal-input,
.modal-textarea {
  width: 100%;
  background: #161616;
  border-radius: 8px;
  border: 1px solid #2b2b2b;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
}

.modal-input::placeholder,
.modal-textarea::placeholder {
  color: var(--text-soft);
}

.modal-input:focus,
.modal-textarea:focus {
  border-color: var(--accent-main);
}

.modal-textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* 小号次级按钮 */
.btn-secondary {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-main);
}

/* Node Apply 按钮略小一点 */
.card-node-earns .btn-node-apply {
  width: 80%;
  padding-block: 7px;
  font-size: 11px;
}

/* Pending 状态文案 */
.node-earns-pending {
  font-size: 12px;
  color: var(--text-soft);
}

/* Rewards 页面「Apply / Submit」按钮专用缩小版 */
.btn-node-small {
  padding: 0px 0px !important;   /* 全局按钮是 ~20px 40px，这里缩小 */
  font-size: 12px !important;      /* 全局是 18px，这里更精致 */
  height: 30px !important;         /* 全局高度 ~62px，改小 */
  border-radius: 22px !important;  /* 与整体风格一致但比例更合适 */
}

