/* app.css — vladpad app pages
   crypto-128 theme: black/white + lime #C9FA49, Poppins/Lato, no AI-slop
*/

/* ─── APP SHELL ─── */
.app-main {
  padding: 100px 24px 80px;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

/* Subtle dot-grid bg (distinctive, not gradient blobs) */
.app-main::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(14,14,14,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: -1;
}

/* Corner lime accent — geometric, not glow */
.app-main::after {
  content: '';
  position: fixed;
  top: 0; right: 0;
  width: 280px; height: 280px;
  background: radial-gradient(circle at 100% 0%, rgba(201,250,73,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.app-h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.app-sub {
  color: var(--ink-dim);
  font-family: var(--font-sans);
  font-size: 14px;
  margin-top: 6px;
}
.app-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── INPUTS ─── */
.search-input, .select-input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-sans);
  transition: border-color 200ms, box-shadow 200ms;
}
.search-input:focus, .select-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,250,73,0.15);
}
.search-input { width: 220px; }
.select-input { cursor: pointer; }
.select-input option { background: #fff; }

/* ─── TOKEN GRID ─── */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* Card entry animation — stagger via nth-child */
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.token-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 180ms, transform 180ms, box-shadow 180ms;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: card-in 400ms both;
}
.token-card:nth-child(1) { animation-delay: 0ms; }
.token-card:nth-child(2) { animation-delay: 60ms; }
.token-card:nth-child(3) { animation-delay: 120ms; }
.token-card:nth-child(4) { animation-delay: 180ms; }
.token-card:nth-child(5) { animation-delay: 240ms; }
.token-card:nth-child(6) { animation-delay: 300ms; }
.token-card:nth-child(7) { animation-delay: 360ms; }
.token-card:nth-child(8) { animation-delay: 420ms; }

.token-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,250,73,0.12), 0 2px 6px rgba(0,0,0,0.04);
}

.token-head { display: flex; align-items: center; gap: 12px; }
.token-img {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--bg-2);
  object-fit: cover;
  flex-shrink: 0;
}
.token-img-placeholder {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: #0e0e0e;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}
.token-info { flex: 1; min-width: 0; }
.token-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.token-sym {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.token-mech {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0e0e0e;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.token-stats { display: flex; gap: 16px; font-size: 13px; flex-wrap: wrap; }
.token-stat { display: flex; flex-direction: column; gap: 2px; }
.token-stat-k {
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
}
.token-stat-v {
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 500;
}
.token-progress {
  width: 100%; height: 4px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}
.token-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 600ms cubic-bezier(.4,0,.2,1);
}
.token-phase {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
}
.graduated-badge {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
}

/* ─── MODAL ─── */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}
.modal-body {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-pop 250ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute; top: 16px; right: 20px;
  font-size: 28px; color: var(--ink-dim); line-height: 1;
  transition: color 150ms;
}
.modal-close:hover { color: var(--ink); }
.modal-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-lead { color: var(--ink-dim); font-size: 14px; margin-bottom: 24px; }

/* ─── FORMS ─── */
.launch-form, .trade-form { display: flex; flex-direction: column; gap: 16px; }
.launch-form label, .trade-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--ink-dim);
  font-family: var(--font-sans);
}
.launch-form input, .launch-form select, .trade-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-sans);
  transition: border-color 180ms, box-shadow 180ms;
}
.launch-form input:focus, .launch-form select:focus, .trade-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,250,73,0.12);
}
.btn-block { width: 100%; }
.form-status { font-size: 13px; color: var(--ink-dim); text-align: center; min-height: 20px; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--accent); }

.mechanic-info {
  font-size: 13px; color: var(--ink-dim);
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

/* ─── TRADE TABS ─── */
.trade-tabs {
  display: flex; gap: 0;
  margin-bottom: 20px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.trade-tab {
  flex: 1;
  padding: 11px;
  text-align: center;
  font-size: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  background: transparent;
  transition: all 200ms;
  color: var(--ink-dim);
}
.trade-tab.active {
  background: #0e0e0e;
  color: #fff;
  border-radius: 999px;
}
.trade-quote { font-family: var(--font-mono); font-size: 14px; color: var(--ink-dim); }
.trade-quote span { color: var(--accent); font-weight: 600; }

/* ─── EMPTY / SPINNER ─── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 15px;
}
.empty-state::before {
  content: '⬡';
  display: block;
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.6;
}
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--bg-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 880px) {
  .app-head { flex-direction: column; align-items: flex-start; }
  .app-controls { width: 100%; }
  .search-input { flex: 1; width: auto; }
}
@media (max-width: 480px) {
  .tokens-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 28px 20px; border-radius: 20px; }
}

/* ─── APP SUB-NAV (pill tabs) ─── */
.app-subnav {
  display: flex;
  gap: 6px;
  padding: 0 24px;
  margin: 96px auto 0;
  max-width: var(--max);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.app-tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--ink-dim);
  font-weight: 400;
  transition: all 180ms;
  letter-spacing: 0.01em;
}
.app-tab:hover {
  color: var(--ink);
  background: var(--bg-2);
}
.app-tab.active {
  background: #0e0e0e;
  color: #fff;
  font-weight: 500;
}
@media (max-width: 600px) {
  .app-subnav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-right: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .app-subnav::-webkit-scrollbar { display: none; }
  .app-tab { white-space: nowrap; flex-shrink: 0; }
  .app-main { padding-top: 20px !important; }
}

/* ─── SUBPAGES (portfolio, rewards, buyback, launch) ─── */
.subsection-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin: 36px 0 16px;
  color: var(--ink);
}
.mono { font-family: var(--font-mono); }

.info-banner {
  background: #0e0e0e;
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
}
.info-banner strong { color: #fff; }

/* Portfolio */
.portfolio-section { margin-top: 24px; }
.fee-claim-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin-top: 32px;
  max-width: 480px;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
}

/* Rewards */
.rewards-summary { display: flex; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.reward-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 28px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; min-width: 180px;
  transition: border-color 180ms;
}
.reward-stat:hover { border-color: var(--accent); }
.reward-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-family: var(--font-sans);
}
.reward-v {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
}

/* Buyback */
.buyback-hero { margin: 32px 0; }
.buyback-stat-big {
  text-align: center;
  padding: 56px 24px;
  background: #0e0e0e;
  border: none;
  border-radius: 20px;
  margin-bottom: 24px;
}
.bb-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  font-family: var(--font-sans);
}
.bb-value {
  font-family: var(--font-mono);
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 500;
  color: var(--accent);
}
.buyback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.bb-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 180ms;
}
.bb-card:hover { border-color: var(--accent); }
.bb-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.bb-v { font-size: 18px; font-weight: 500; }

/* Launch page */
.launch-page { max-width: 720px; margin: 0 auto; padding-top: 16px; }
.launch-head { margin-bottom: 32px; }
.launch-form-page { display: flex; flex-direction: column; gap: 24px; }
.launch-form-page label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px; color: var(--ink-dim);
  font-family: var(--font-sans);
}
.launch-form-page label em { color: var(--ink-faint); font-style: normal; font-size: 12px; }
.launch-form-page input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-sans);
  transition: border-color 180ms, box-shadow 180ms;
}
.launch-form-page input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,250,73,0.12);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mechanic-fieldset { border: none; padding: 0; }
.mechanic-fieldset legend {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 500;
}
.mechanic-fieldset legend em { color: var(--ink-faint); font-style: normal; font-size: 13px; font-weight: 400; }
.mechanic-radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mech-radio { cursor: pointer; }
.mech-radio input { position: absolute; opacity: 0; }
.mech-radio-body {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  transition: all 180ms;
  height: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.mech-radio input:checked + .mech-radio-body {
  border-color: var(--accent);
  background: rgba(201,250,73,0.06);
  box-shadow: 0 0 0 1px var(--accent);
}
.mech-radio:hover .mech-radio-body { border-color: var(--ink); }
.mr-head { display: flex; align-items: baseline; gap: 8px; }
.mr-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: #0e0e0e;
  padding: 2px 6px;
  border-radius: 4px;
}
.mr-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}
.mr-desc { font-size: 12px; color: var(--ink-dim); flex: 1; line-height: 1.5; }
.mr-fee { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.mr-fee.has-fee { color: var(--accent); font-weight: 600; }
.launch-summary {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.ls-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-dim); }
.btn-lg {
  padding: 18px 28px;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 500;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .mechanic-radio-grid { grid-template-columns: 1fr; }
}
