/* ===========================================================================
   MEMEFORGE — styles.css
   ===========================================================================
   WANT TO RESTYLE THE SITE? Start in the :root block right below. Almost every
   colour, font and shape on the page is driven by these variables. Change a few
   and the whole site updates. Deeper component tweaks live further down, each
   under a clearly-labelled section.
=========================================================================== */

:root {
  /* ---- BRAND & SURFACES (edit these first) ---- */
  --bg: #0B0A12;            /* page background            */
  --card: #15131F;          /* cards / panels             */
  --card-2: #1A1726;        /* nested fields              */
  --fg: #ECEAF5;            /* main text                  */
  --muted: #9B97AE;         /* secondary text             */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  /* ---- ACCENT GRADIENT (logo, buttons, highlights) ---- */
  --brand-from: #7C5CFF;    /* violet */
  --brand-to:   #FF5CAA;    /* pink   */

  /* ---- MARKET-DATA COLOURS (reserved for prices / pumps / dumps) ---- */
  --mint: #3DF5A0;          /* up / Buy   */
  --down: #FF5C72;          /* down       */
  --amber: #FFC94D;         /* featured   */

  /* ---- TYPE ---- */
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--sans);   /* headings / brand */
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace; /* numbers / tickers */

  /* ---- SHAPE ---- */
  --radius-card: 18px;
  --radius-btn: 12px;
  --maxw: 1180px;           /* page width */
}

/* =========================== base =========================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.gradient-text {
  background: linear-gradient(90deg, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* =========================== buttons =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: .92rem; white-space: nowrap;
  transition: transform .15s, filter .15s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.btn-gradient { background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); color: #fff; box-shadow: 0 10px 30px -12px rgba(124,92,255,.8); }
.btn-gradient:hover { filter: brightness(1.08); }
.btn-buy { background: var(--mint); color: #04150E; box-shadow: 0 8px 24px -10px rgba(61,245,160,.8); }
.btn-buy:hover { filter: brightness(1.1); }
.btn-outline { border: 1px solid var(--border-strong); background: rgba(255,255,255,.02); color: var(--fg); }
.btn-outline:hover { border-color: rgba(124,92,255,.5); background: rgba(124,92,255,.08); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.btn-block { width: 100%; }

/* =========================== badges / change pill =========================== */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: .72rem; font-weight: 600; border: 1px solid transparent; }
.badge svg { width: 12px; height: 12px; }
.badge-brand { background: rgba(124,92,255,.15); color: #bca8ff; }
.badge-amber { background: rgba(255,201,77,.15); color: var(--amber); }
.badge-mint  { background: rgba(61,245,160,.13); color: var(--mint); border-color: rgba(61,245,160,.3); }
.badge-down  { background: rgba(255,92,114,.15); color: var(--down); }
.badge-on-banner { background: rgba(0,0,0,.34); backdrop-filter: blur(6px); }

.chg { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; }
.chg svg { width: 14px; height: 14px; }
.chg.up { color: var(--mint); } .chg.down { color: var(--down); }

/* =========================== ticker tape =========================== */
.ticker { position: relative; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(21,19,31,.5); overflow: hidden; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after  { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.ticker__track { display: flex; width: max-content; gap: 30px; padding: 10px 0; animation: marquee 60s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: .85rem; }
.ticker__item .glyph { font-size: 1rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================== nav =========================== */
.nav { position: sticky; top: 0; z-index: 40; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(11,10,18,.72); backdrop-filter: blur(12px); border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-from), var(--brand-to)); font-size: 1rem; box-shadow: 0 6px 18px -8px rgba(124,92,255,.9); }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; }
.nav__links { display: none; gap: 28px; }
.nav__links a { font-size: .9rem; color: var(--muted); transition: color .15s; }
.nav__links a:hover { color: var(--fg); }
@media (min-width: 980px) { .nav__links { display: flex; } }

/* =========================== hero =========================== */
.hero { position: relative; padding: 48px 0 8px; }
.hero__glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero__glow span { position: absolute; width: 300px; height: 300px; border-radius: 999px; filter: blur(120px); }
.hero__glow .g1 { left: -90px; top: 0; background: rgba(124,92,255,.22); }
.hero__glow .g2 { right: -40px; top: 90px; background: rgba(255,92,170,.2); }
.hero__grid { display: grid; gap: 46px; align-items: center; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; margin: 20px 0 0; font-size: clamp(2.2rem, 6vw, 3.7rem); }
.hero__lead { margin-top: 18px; max-width: 30rem; color: var(--muted); font-size: 1.08rem; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 30rem; margin-top: 30px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hero__stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero__stats dd { margin: 6px 0 0; font-family: var(--mono); font-weight: 700; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* =========================== featured spotlight =========================== */
.spot { position: relative; border: 1px solid var(--border); border-radius: 24px; background: var(--card); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0,0,0,.8); }
.spot__banner { position: relative; height: 170px; }
.spot__banner .veil { position: absolute; inset: 0; background: linear-gradient(0deg, var(--card), rgba(21,19,31,.25), transparent); }
.spot__badge { position: absolute; left: 16px; top: 16px; }
.logo { display: grid; place-items: center; border-radius: 18px; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo .glyph { line-height: 1; }
.spot__logo { position: absolute; left: 24px; bottom: -30px; width: 88px; height: 88px; box-shadow: 0 0 0 4px var(--card); animation: float 6s ease-in-out infinite; }
.spot__logo .glyph { font-size: 2.6rem; }
.spot__body { padding: 46px 24px 24px; }
.spot__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.spot__head h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0; }
.spot__price { font-family: var(--mono); font-weight: 700; font-size: 1.3rem; text-align: right; font-variant-numeric: tabular-nums; }
.spot__desc { margin-top: 16px; color: var(--muted); font-size: .94rem; }
.statbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(11,10,18,.4); }
.statbox .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.statbox .v { margin-top: 5px; font-family: var(--mono); font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; }
.spot__actions { display: flex; gap: 12px; margin-top: 20px; }
.spot__actions .btn { flex: 1; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* =========================== section + controls =========================== */
.section { margin-top: 96px; scroll-margin-top: 80px; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section__head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0; letter-spacing: -.02em; }
.section__head p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 26px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 430px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; height: 46px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--fg); padding: 0 40px 0 42px; font-size: .95rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; display: none; align-items: center; justify-content: center; color: var(--muted); }
.search__clear:hover { color: var(--fg); background: rgba(255,255,255,.05); }
.search__clear svg { width: 16px; height: 16px; position: static; transform: none; color: currentColor; }
.controls__right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sort { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.sort button { height: 38px; padding: 0 14px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .15s; }
.sort button.active { color: #fff; background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); box-shadow: 0 8px 20px -10px rgba(124,92,255,.9); }
.count { font-size: .85rem; color: var(--muted); font-family: var(--mono); }

/* =========================== token grid + card =========================== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(282px, 1fr)); gap: 20px; margin-top: 26px; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); padding: 20px; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s; background: radial-gradient(420px circle at 50% -10%, var(--glow, transparent), transparent 70%); pointer-events: none; }
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 26px 50px -28px rgba(0,0,0,.85); }
.card:hover::before { opacity: .5; }
.card__top { display: flex; align-items: center; gap: 13px; }
.card__logo { width: 52px; height: 52px; flex: none; transition: transform .25s; }
.card__logo .glyph { font-size: 1.7rem; }
.card:hover .card__logo { transform: rotate(6deg); }
.card__title { min-width: 0; }
.card__title h3 { font-family: var(--display); font-weight: 600; font-size: 1.12rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__title .tk { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.card__hot { margin-left: auto; flex: none; }
.card__desc { margin-top: 14px; color: var(--muted); font-size: .9rem; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; padding: 14px; border-radius: 13px; background: rgba(11,10,18,.45); border: 1px solid var(--border); }
.card__stats .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card__stats .v { margin-top: 4px; font-family: var(--mono); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.card__actions { display: flex; gap: 9px; margin-top: 16px; }
.card__actions .btn { flex: 1; }

.empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--border-strong); border-radius: 18px; color: var(--muted); grid-column: 1 / -1; }
.empty svg { width: 30px; height: 30px; margin-bottom: 12px; opacity: .7; }

/* =========================== footer =========================== */
footer { margin-top: 110px; border-top: 1px solid var(--border); background: rgba(21,19,31,.4); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; padding: 46px 0; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: .9rem; }
.footer__links a:hover { color: var(--fg); }
.footer__legal { color: var(--muted); font-size: .82rem; max-width: 30rem; margin-top: 14px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--muted); transition: all .15s; }
.socials a:hover { color: var(--fg); border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.1); }
.socials a svg { width: 17px; height: 17px; }

/* =========================== detail overlay =========================== */
.detail { position: fixed; inset: 0; z-index: 60; background: rgba(8,7,13,.6); backdrop-filter: blur(8px); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.detail.open { opacity: 1; visibility: visible; }
.detail__panel { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; transform: translateY(14px); transition: transform .3s cubic-bezier(.22,1,.36,1); }
.detail.open .detail__panel { transform: none; }
.detail__back { padding-top: 20px; }
.dhead { position: relative; border: 1px solid var(--border); border-radius: 24px; background: var(--card); overflow: hidden; margin-top: 10px; }
.dhead__banner { position: relative; height: 190px; }
.dhead__banner .veil { position: absolute; inset: 0; background: linear-gradient(0deg, var(--card), rgba(21,19,31,.3), transparent); }
.dhead__badges { position: absolute; left: 16px; top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.dhead__body { position: relative; padding: 48px 24px 26px; }
.dhead__logo { position: absolute; left: 24px; top: -44px; width: 92px; height: 92px; box-shadow: 0 0 0 4px var(--card); }
.dhead__logo .glyph { font-size: 2.7rem; }
.dhead__row { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { .dhead__row { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.dhead__row h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; letter-spacing: -.02em; }
.dmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.dmeta span { display: inline-flex; align-items: center; gap: 6px; }
.dmeta svg { width: 14px; height: 14px; }
.dprice { font-family: var(--mono); font-weight: 700; font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.dbody { display: grid; gap: 26px; margin-top: 26px; }
@media (min-width: 920px) { .dbody { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.panel { border: 1px solid var(--border); border-radius: 18px; background: var(--card); padding: 22px; }
.panel h2, .panel h3 { font-family: var(--display); margin: 0; }
.panel h2 { font-size: 1.2rem; font-weight: 700; }
.panel h3 { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--mono); }
.about p { margin: 16px 0 0; color: var(--muted); font-size: .97rem; line-height: 1.7; white-space: pre-line; }
.dright { display: flex; flex-direction: column; gap: 18px; }
.contract { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11,10,18,.45); }
.contract code { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); color: var(--muted); font-size: .8rem; font-weight: 600; transition: all .15s; }
.copy:hover { color: var(--fg); border-color: var(--border-strong); }
.copy.done { color: var(--mint); border-color: rgba(61,245,160,.4); }
.copy svg { width: 14px; height: 14px; }

/* =========================== mini chart (demo) =========================== */
.chart { border: 1px solid var(--border); border-radius: 18px; background: var(--card); padding: 22px; }
.chart__head { display: flex; align-items: center; justify-content: space-between; }
.chart__title { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 600; font-size: .92rem; }
.chart__title svg { width: 16px; height: 16px; color: var(--muted); }
.pulse { position: relative; display: inline-flex; width: 7px; height: 7px; }
.pulse::before { content: ""; position: absolute; inset: 0; border-radius: 999px; background: var(--mint); opacity: .7; animation: ping 1.4s cubic-bezier(0,0,.2,1) infinite; }
.pulse::after { content: ""; position: relative; width: 7px; height: 7px; border-radius: 999px; background: var(--mint); }
@keyframes ping { 75%,100% { transform: scale(2.4); opacity: 0; } }
.chart__plot { position: relative; width: 100%; aspect-ratio: 720/280; margin-top: 16px; }
.chart__plot svg { width: 100%; height: 100%; display: block; }
.chart__note { margin-top: 12px; text-align: center; color: var(--muted); font-size: .78rem; }
.chart__draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 1.6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =========================== loading / reduced motion =========================== */
.loading { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track, .spot__logo, .pulse::before, .chart__draw { animation: none !important; }
  .chart__draw { stroke-dashoffset: 0 !important; }
  .card, .detail__panel { transition: none; }
}
