/* Deposit / Withdraw / Referral / History shared page styles */

.network-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}
.network-card {
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
  position: relative;
}
.network-card:hover { transform: translateY(-2px); border-color: var(--primary-2); }
.network-card.is-selected {
  background: linear-gradient(135deg, rgba(123,92,255,.2), rgba(43,225,255,.08));
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(123,92,255,.25);
}
.network-card-sym { font-weight: 800; font-size: 1.05rem; color: var(--text); }
.network-card p   { font-size: 0.82rem; color: var(--text-dim); margin: 0; }
.network-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(43,225,255,.1);
  display: grid; place-items: center;
  color: var(--primary-2); font-weight: 800; font-size: .9rem;
}

/* USDT two-card layout (deposit/withdraw) */
.network-cards--usdt {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 720px;
}
.network-cards--usdt .network-card {
  flex-direction: row; align-items: center; gap: 0.9rem;
  padding: 1rem 1.1rem;
}

.usdt-logo {
  position: relative; flex: 0 0 auto;
  display: inline-grid; place-items: center;
}
.usdt-logo svg { display: block; }
.usdt-net-badge {
  position: absolute; right: -6px; bottom: -6px;
  font-size: 0.62rem; font-weight: 800; color: #0b0f22;
  padding: 2px 6px; border-radius: 6px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  border: 1.5px solid rgba(255,255,255,.45);
}

/* File drop / image uploader */
.file-drop {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1.5px dashed var(--stroke);
  background: rgba(20,25,55,.4);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .12s;
}
.file-drop:hover { border-color: var(--primary-2); background: rgba(43,225,255,.05); }
.file-drop.is-hover { border-color: var(--primary); background: rgba(123,92,255,.08); transform: translateY(-1px); }
.file-drop.has-file { border-color: var(--success); border-style: solid; }
.file-drop input[type=file] {
  position: absolute; left: -9999px; opacity: 0; pointer-events: none;
}
.file-drop-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(123,92,255,.15), rgba(43,225,255,.08));
  border: 1px solid var(--stroke);
  display: grid; place-items: center; color: var(--primary-2); flex: 0 0 auto;
}
.file-drop-text { display: flex; flex-direction: column; gap: 2px; }
.file-drop-text small { color: var(--muted); }
.file-drop-preview { margin-top: 0.7rem; }
.file-preview-card {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 2.2rem 0.5rem 0.5rem;
  border: 1px solid var(--stroke);
  background: rgba(20,25,55,.55);
  border-radius: 12px;
}
.file-preview-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--stroke); }
.file-preview-info { display: flex; flex-direction: column; font-size: .82rem; color: var(--text-dim); }
.file-preview-info strong { color: var(--text); }
.file-preview-clear {
  position: absolute; right: 6px; top: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,91,127,.15); color: #ffbecb;
  border: 1px solid rgba(255,91,127,.45);
  cursor: pointer; font-size: 1rem; line-height: 1;
}

.amount-block { margin-top: 1rem; }
.amount-input { font-size: 1.1rem; font-weight: 700; }
.amount-hint  { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

.address-row {
  display: flex; gap: 0.6rem; align-items: stretch;
}
.address-row input { flex: 1; }

.qr-wrap { display: flex; justify-content: center; margin: 1rem 0; }
.qr-wrap img { background: #fff; padding: 10px; border-radius: 12px; }

.fee-notice {
  padding: 0.85rem 1rem;
  margin-top: 0.8rem;
  border-left: 3px solid var(--primary-2);
  border-radius: 10px;
  background: rgba(43,225,255,.05);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.warning-line {
  margin-top: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: rgba(255,91,127,.08);
  border: 1px solid rgba(255,91,127,.35);
  color: #ffbecb;
  font-size: 0.88rem;
}

.balance-badge {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  margin-bottom: 1rem;
}
.balance-badge strong { color: var(--primary-2); }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table.data-table {
  width: 100%; border-collapse: collapse; min-width: 520px; font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(123,92,255,.15);
}
.data-table th { color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 0.72rem; }
.data-table tbody tr:hover { background: rgba(123,92,255,.05); }

/* Referral page */
.ref-link-row { margin-top: 0.4rem; }

.stat-card {
  padding: 1rem;
  display: flex; align-items: center; gap: 1rem;
  border-radius: 14px;
  margin-top: 0.6rem;
}
.stat-card .num { font-size: 1.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; color: transparent; }
.stat-card .lbl { color: var(--text-dim); font-size: 0.9rem; }

.ref-program { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin-top: 0.6rem; padding: 1.1rem; }
.ref-tier { padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(20,25,55,.5); }
.ref-tier.is-line1 { border-color: var(--primary); background: linear-gradient(135deg, rgba(123,92,255,.15), transparent); }
.ref-tier.is-vip   { border-color: var(--primary-2); background: linear-gradient(135deg, rgba(43,225,255,.15), transparent); }
.ref-tier h3 { margin: 0 0 0.35rem; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 0.8rem; }

.ref-levels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; margin-top: 0.8rem; }
.ref-level-cell { padding: 0.9rem; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(20,25,55,.5); text-align: center; }
.ref-level-cell .lvl { font-size: 0.75rem; text-transform: uppercase; color: var(--text-dim); letter-spacing: .1em; }
.ref-level-cell .cnt { font-size: 1.5rem; font-weight: 800; color: var(--primary-2); }
.ref-level-cell .pct { color: var(--muted); font-size: 0.8rem; }

/* History summary cards */
.history-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem; margin-top: 0.5rem;
}
.history-summary { padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.history-summary .hs-label { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; color: var(--muted); }
.history-summary .hs-val   { font-size: 1.3rem; font-weight: 800; }
.history-summary .hs-sub   { color: var(--text-dim); font-size: .8rem; }

.history-filter-row {
  display: flex; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap;
  margin: 0.6rem 0;
}
.history-filter-row label { display: flex; flex-direction: column; font-size: .75rem; color: var(--text-dim); gap: 0.2rem; }
.history-filter-row input { min-width: 150px; }

.history-deep-table .is-pos { color: #2ee5a5; font-weight: 700; }
.history-deep-table .is-neg { color: #ff8aa3; font-weight: 700; }
.type-chip {
  display: inline-block; padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-transform: capitalize;
}
.history-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.8rem; }

/* History tabs */
.history-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.8rem 0; }
.history-tab-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 600;
}
.history-tab-btn.is-active {
  background: var(--grad); color: #fff; border-color: transparent;
}

/* Guides page */
.guides-toc { padding: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.guides-toc a { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--stroke); color: var(--text-dim); }
.guides-toc a:hover { color: var(--text); border-color: var(--primary-2); }
.guides-section { margin-top: 2rem; padding: 1.2rem; }
.steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 0.8rem; }
.step-card { padding: 1rem; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(20,25,55,.5); }
.step-card .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 0.85rem; }

/* Auth & landing */
.auth-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-top-bar { display: flex; align-items: center; gap: 1rem; padding: 1rem clamp(1rem,3vw,2rem); border-bottom: 1px solid var(--stroke); }
.auth-back    { color: var(--text-dim); font-weight: 600; }
.auth-top-bar .spacer { flex: 1; }
.auth-main { display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 1.8rem; }
.auth-tabs { display: flex; gap: 0.4rem; padding: 0.3rem; background: rgba(20,25,55,.5); border-radius: 12px; border: 1px solid var(--stroke); margin-bottom: 1.2rem; }
.auth-tabs .auth-tab { flex: 1; padding: 0.6rem 0.8rem; border-radius: 8px; text-align: center; color: var(--text-dim); font-weight: 600; cursor: pointer; background: transparent; border: none; }
.auth-tabs .auth-tab.is-active { background: var(--grad); color: #fff; }
.auth-form { display: none; flex-direction: column; gap: 0.8rem; }
.auth-form.is-active { display: flex; }
.auth-divider { text-align: center; color: var(--muted); margin: 1rem 0; position: relative; font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--stroke); }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }

.landing-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; position: relative; overflow: hidden; }
.landing-hero { text-align: center; max-width: 560px; }
.landing-logo { font-size: 2.4rem; font-weight: 800; letter-spacing: .02em; background: var(--grad); -webkit-background-clip: text; color: transparent; margin-bottom: 0.4rem; }
.landing-tag  { color: var(--text-dim); margin-bottom: 2rem; }
.landing-cta  { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.landing-footer-links { margin-top: 2.5rem; display: flex; gap: 1rem; justify-content: center; font-size: 0.85rem; flex-wrap: wrap; color: var(--text-dim); }
.landing-footer-links a { color: var(--text-dim); } .landing-footer-links a:hover { color: var(--text); }

.not-found-main { display: grid; place-items: center; min-height: 60vh; text-align: center; }

/* Video marketing */
.video-tiers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem; margin-top: 0.6rem; }
.video-tier-card { padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.video-tier-head { border-bottom: 1px solid var(--stroke); padding-bottom: 0.6rem; }
.video-tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.video-tier-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; color: var(--text-dim); padding: 0.35rem 0.5rem; border-radius: 8px; background: rgba(20,25,55,.4); }
.video-tier-list li strong { color: var(--primary-2); }

.video-platform-chip { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; text-transform: capitalize; color: #fff; }
.video-platform-youtube   { background: linear-gradient(135deg, #ff2d55, #ff0033); }
.video-platform-facebook  { background: linear-gradient(135deg, #1877f2, #0a60d1); }
.video-platform-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.video-platform-tiktok    { background: linear-gradient(135deg, #25F4EE, #FE2C55); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.6rem; }
.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.video-embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb-link { display: block; }
.video-thumb-fallback {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(123,92,255,.28), rgba(43,225,255,.18));
  display: grid; place-items: center; color: #fff; font-weight: 700; text-align: center;
  border-bottom: 1px solid var(--stroke);
}
.video-thumb-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 0.3rem; }
.video-card-meta { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.video-card-meta h3 { font-size: 1rem; margin: 0.2rem 0 0; }
