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

:root {
  --bg:        #0b0b12;
  --surface:   #11111c;
  --surface2:  #171726;
  --border:    #1f1f35;
  --accent:    #7c6dfa;
  --accent2:   #a78bfa;
  --green:     #34d399;
  --red:       #f87171;
  --text:      #e2e2f0;
  --muted:     #6b6b8a;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Inter', sans-serif;
}

[data-theme="light"] {
  --bg:       #f9f9fb;
  --surface:  #ffffff;
  --surface2: #f0f0f4;
  --border:   #e0e0e8;
  --accent:   #5b4ee8;
  --accent2:  #7c6dfa;
  --green:    #059669;
  --red:      #dc2626;
  --text:     #0d0d14;
  --muted:    #707088;
}

html { scroll-behavior: smooth; }
#resultArea { scroll-margin-top: 80px; }
/* Homepage only: ensure enough scrollable height so the result lands just under
   the header on search. The hero stays visible — scroll up to see it again. */
.hub #resultArea:not(:empty) { min-height: calc(100vh - 280px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background canvas ── */
#snow, #stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── Hub (home) ── */
.hub {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(36px, 9vh, 100px) 24px 80px;
  position: relative;
  z-index: 1;
}
.hub-hero { text-align: center; }

.hub-title {
  font-size: clamp(3.6rem, 11vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
  margin: 0;
}
.hub-dot { color: var(--accent); }

.hub-tagline {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  margin: 14px 0 36px;
}

.hub-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 6px 6px 18px;
  max-width: 620px;
  margin: 0 auto;
  transition: border-color .15s, box-shadow .15s;
}
.hub-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.hub-search-icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.hub-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 14px 0;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
}
.hub-search input::placeholder { color: var(--muted); }
.hub-search-go {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
.hub-search-go:hover { background: var(--accent2); }
.hub-search-go:active { transform: scale(0.97); }

.hub-search-hint {
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  min-height: 20px;
  margin-top: 10px;
}
.hub-search-hint.error { color: var(--red); }

.hub-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 28px auto 0;
  max-width: 620px;
}
.hub-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 500;
  transition: transform .18s, border-color .15s, color .15s, background .15s;
}
.hub-tile svg {
  width: 22px;
  height: 22px;
  color: inherit;
  transition: color .15s;
}
.hub-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}
.hub-tile:hover svg { color: var(--accent); }

@media (max-width: 720px) {
  .hub { padding: 36px 16px 64px; }
  .hub-search-go { padding: 10px 16px; }
  .hub-nav { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 440px) {
  .hub-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ── Section pages (Prices, Watchlist, etc.) ── */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}
.page-hero {
  text-align: center;
  margin-bottom: 36px;
}
.page-title {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0;
}
.page-tagline {
  color: var(--muted);
  font-size: .98rem;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .page { padding: 32px 16px 64px; }
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  height: 56px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo::before {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: url('/static/taka.webp') center/cover no-repeat var(--surface2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  /* Source is 312px so it stays crisp on retina displays */
  image-rendering: -webkit-optimize-contrast;
}
.logo .dot { color: var(--accent); }

/* ── Ticker ── */
.ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}
.ticker-inner {
  display: flex;
  gap: 32px;
  width: max-content;
  will-change: transform;
}
.ticker-inner.animating {
  animation: scroll 40s linear infinite;
}
.ticker-inner:hover { animation-play-state: paused; }

@keyframes scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.tick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
}
.tick-item img { width: 18px; height: 18px; border-radius: 50%; }
.tick-sym { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.tick-price { color: var(--text); font-family: var(--mono); }
.tick-change.pos { color: var(--green); }
.tick-change.neg { color: var(--red); }

/* ── Gas widget ── */
.gas-widget {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 12px;
  font-size: 0.72rem; font-family: var(--mono);
  white-space: nowrap; flex-shrink: 0;
  transition: border-color .2s, background .2s, transform .15s;
  cursor: default;
}
.gas-widget:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-1px);
}
.gas-widget svg { width: 13px; height: 13px; color: var(--muted); margin-right: 2px; }
.gas-val { font-weight: 600; }
.gas-val.low  { color: var(--green); }
.gas-val.med  { color: #fbbf24; }
.gas-val.high { color: var(--red); }
.gas-sep { color: var(--border); }
.gas-unit { color: var(--muted); font-size: 0.65rem; margin-left: 1px; }

/* ── Header right group ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; flex-shrink: 0;
  transition: color .2s, background .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 15px; height: 15px; }

@media (pointer: coarse) { .widget-link { display: none; } }

/* ── Background-mode popover ── */
.bg-toggle-wrap { position: relative; display: inline-flex; }
.bg-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  min-width: 184px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 200;
}
[data-theme="light"] .bg-popover { box-shadow: 0 12px 32px rgba(13, 13, 20, 0.12); }
.bg-popover.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.bg-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.bg-option svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.bg-option:hover {
  background: var(--surface2);
  color: var(--text);
}
.bg-option.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted); font-size: .82rem; font-weight: 500;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: color .15s, background .15s, border-color .15s;
}
.back-btn:hover { color: var(--text); border-color: var(--accent); }

/* ── Online badge ── */
.online-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 10px;
  font-size: 0.72rem; font-family: var(--mono);
  white-space: nowrap; flex-shrink: 0;
  color: var(--text); cursor: default;
  transition: border-color .2s, background .2s, transform .15s;
}
.online-badge:hover {
  border-color: var(--green);
  background: var(--surface);
  transform: translateY(-1px);
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50% { opacity: 0.6; box-shadow: 0 0 10px var(--green); }
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 56px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.accent { color: var(--accent2); }
.sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

/* ── Search ── */
.search-wrap { max-width: 640px; margin: 0 auto; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,109,250,.15); }
.search-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; margin-right: 10px; }

input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  caret-color: var(--accent);
}
input::placeholder { color: var(--muted); font-family: var(--sans); }

button#searchBtn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
button#searchBtn:hover  { background: var(--accent2); }
button#searchBtn:active { transform: scale(0.97); }

.search-caps {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 0.72rem; color: var(--muted); margin-top: 10px; flex-wrap: wrap;
}
.search-cap-dot { color: var(--border); }

.search-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
  min-height: 18px;
  transition: color .2s;
}
.search-hint.error { color: var(--red); }

/* ── Main ── */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  gap: 40px;
}

/* ── Result card ── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  animation: fadeUp .3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.result-header-left { display: flex; align-items: center; gap: 12px; }
.result-header-left img { width: 36px; height: 36px; border-radius: 50%; }
.coin-name { font-size: 1rem; font-weight: 600; }
.coin-address {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}
.result-actions { display: flex; gap: 8px; }

.btn-sm {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none;
}
.btn-sm:hover { background: var(--border); border-color: var(--accent); }
.btn-sm.watch-active { border-color: var(--accent); color: var(--accent2); }

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-cell {
  background: var(--surface);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 1.1rem; font-weight: 600; font-family: var(--mono); }
.stat-value.pos { color: var(--green); }
.stat-value.neg { color: var(--red); }

/* ── Transactions ── */
.txs-section { padding: 20px 24px; }
.txs-title { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }
.tx-list { display: flex; flex-direction: column; gap: 8px; }

.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 10px;
  font-size: 0.82rem;
  transition: background .15s;
}
.tx-row:hover { background: var(--border); }
.tx-row-clickable { cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.tx-row-clickable:hover { border-color: var(--accent); }

.tx-sign {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.tx-sign.in  { background: rgba(52,211,153,.12); color: var(--green); }
.tx-sign.out { background: rgba(248,113,113,.12); color: var(--red); }

.tx-info { flex: 1; min-width: 0; }
.tx-dir  { font-weight: 500; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .3px; }
.tx-addr {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-addr a { color: inherit; text-decoration: none; }
.tx-addr a:hover { color: var(--accent2); }

.addr-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .12s, border-color .12s;
}
.addr-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tx-io-addr.addr-link {
  font-family: var(--mono);
  text-align: left;
  justify-self: start;
}

.tx-amount { font-family: var(--mono); font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.tx-amount.in  { color: var(--green); }
.tx-amount.out { color: var(--red); }

.no-txs { color: var(--muted); font-size: 0.85rem; padding: 8px 0; }

/* ── Price search ── */
.price-search-wrap input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  outline: none;
  width: 200px;
  transition: border-color .2s;
}
.price-search-wrap input:focus { border-color: var(--accent); }
.price-search-wrap input::placeholder { color: var(--muted); }

/* ── Converter ── */
.converter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; display: flex; align-items: stretch;
}
.cv-side {
  flex: 1; min-width: 0; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.cv-side-r { border-left: 1px solid var(--border); align-items: flex-end; }
.cv-coin-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 11px; cursor: pointer;
  color: var(--text); font-size: .85rem; font-weight: 700;
  font-family: var(--mono); transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.cv-coin-btn:hover { border-color: var(--accent); background: var(--surface); }
.cv-coin-btn img { width: 20px; height: 20px; border-radius: 50%; }
.cv-amt {
  font-size: 2rem; font-family: var(--mono); font-weight: 600;
  background: transparent; border: none; outline: none;
  color: var(--text); width: 100%;
}
.cv-side-r .cv-amt { text-align: right; }
.cv-amt::placeholder { color: var(--muted); }
.cv-amt-out { color: var(--muted); cursor: default; }
.cv-swap-btn {
  width: 44px; flex-shrink: 0; background: transparent; border: none;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, background .2s;
}
.cv-swap-btn:hover,
.cv-swap-btn.cv-swap-active { color: var(--accent); background: rgba(124,109,250,.06); }
.cv-swap-btn.cv-swap-active svg { transform: rotate(180deg); }
.cv-swap-btn svg { width: 18px; height: 18px; transition: transform .35s cubic-bezier(.5,.1,.2,1.2); }
.cv-rate {
  margin-top: 8px; text-align: center;
  font-size: .78rem; font-family: var(--mono); color: var(--muted); min-height: 18px;
}
/* shared dropdown — position:fixed, never clipped */
#cvDrop {
  position: fixed; z-index: 9000;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  width: 240px;
}
.cv-drop-search {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; color: var(--text);
  font-size: .85rem; outline: none; margin-bottom: 6px;
  transition: border-color .2s;
}
.cv-drop-search:focus { border-color: var(--accent); }
#cvDropList {
  list-style: none; max-height: 220px; overflow-y: auto;
}
#cvDropList li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background .1s;
}
#cvDropList li:hover { background: var(--surface2); }
#cvDropList li.cv-active { background: rgba(124,109,250,.14); }
#cvDropList img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
#cvDropList .cv-fallback { width: 22px; height: 22px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
#cvDropList .cv-sym { font-weight: 700; font-size: .82rem; text-transform: uppercase; }
#cvDropList .cv-name { font-size: .7rem; color: var(--muted); }

/* ── Price grid ── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: border-color .25s ease, transform .2s ease, box-shadow .25s ease;
  animation: fadeUp .25s ease;
}
.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    140px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124,109,250,.18) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}
.price-card:hover {
  border-color: rgba(124,109,250,.55);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(124,109,250,.15);
}
.price-card:hover::before { opacity: 1; transition: opacity .15s ease; }
.price-card:not(:hover)::before { opacity: 0; transition: opacity .5s ease; }
.price-card > * { position: relative; z-index: 1; }

.price-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.price-card-header img { width: 26px; height: 26px; border-radius: 50%; }
.price-card-sym { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; }
.price-card-name { font-size: 0.7rem; color: var(--muted); }

.price-card-price { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.price-card-change { font-size: 0.78rem; font-weight: 500; }
.price-card-change.pos { color: var(--green); }
.price-card-change.neg { color: var(--red); }
.price-card-range { font-size: 0.7rem; color: var(--muted); margin-top: 6px; font-family: var(--mono); }
.sparkline { display: block; width: 100%; height: 28px; margin-top: 8px; overflow: visible; }

/* ── Watchlist ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 1rem; font-weight: 600; }
.badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.watchlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.watch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  position: relative;
  animation: fadeUp .25s ease;
}
.watch-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.watch-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.watch-card-coin { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; }
.watch-card-coin img { width: 22px; height: 22px; border-radius: 50%; }

.watch-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: color .15s;
}
.watch-remove:hover { color: var(--red); }

.watch-addr {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 12px;
}
.watch-balance { font-family: var(--mono); font-size: 1.1rem; font-weight: 600; }
.watch-loading { color: var(--muted); font-size: 0.82rem; }

/* ── Empty state ── */
.empty-state {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}
.empty-state svg { width: 36px; height: 36px; opacity: .4; }
.empty-state p { font-size: 0.875rem; line-height: 1.6; }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.result-skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp .2s ease;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%; max-width: 680px;
  overflow: hidden;
  animation: fadeUp .2s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.modal-title-wrap { display: flex; align-items: center; gap: 12px; }
.modal-title-wrap img { width: 36px; height: 36px; border-radius: 50%; }
.modal-name { font-size: 1rem; font-weight: 600; }
.modal-price { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.modal-close {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 8px; width: 32px; height: 32px;
  cursor: pointer; font-size: 0.85rem; transition: color .15s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--red); border-color: var(--red); }

.range-tabs { display: flex; gap: 4px; }
.range-tab {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 7px; padding: 5px 10px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.range-tab:hover { border-color: var(--accent); color: var(--text); }
.range-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.modal-body { padding: 24px; min-height: 280px; position: relative; }
.chart-loading {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: 0.875rem;
}

/* ── Sync box ── */
.sync-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.legal-page { max-width: 820px; margin: 48px auto 80px; padding: 0 22px; }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px 42px; color: var(--text); }
.legal-kicker { color: var(--accent); font-size: .72rem; letter-spacing: .14em; font-weight: 700; }
.legal-card h1 { margin: 10px 0 4px; font-size: 2.2rem; }
.legal-card h2 { margin: 28px 0 8px; font-size: 1.05rem; }
.legal-card p { color: var(--muted); line-height: 1.7; }
.legal-updated { font-size: .78rem; margin-top: 0; }
.legal-card a { color: var(--accent); }
.legal-footer { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 34px; }
@media (max-width: 600px) { .legal-page { margin-top: 24px; padding: 0 14px; } .legal-card { padding: 26px 22px; } .legal-card h1 { font-size: 1.8rem; } }
.sync-input-wrap { display: flex; gap: 10px; flex-wrap: wrap; }
.sync-input-wrap input {
  flex: 1; min-width: 200px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  outline: none;
  transition: border-color .2s;
}
.sync-input-wrap input:focus { border-color: var(--accent); }
.sync-input-wrap input::placeholder { color: var(--muted); font-family: var(--sans); }
.sync-input-wrap button {
  background: var(--accent);
  color: #fff; border: none;
  border-radius: 10px; padding: 10px 22px;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background .2s;
  white-space: nowrap;
}
.sync-input-wrap button:hover { background: var(--accent2); }
.sync-code-wrap { display: flex; gap: 10px; align-items: stretch; }
.sync-code-wrap input {
  flex: 1; min-width: 0; box-sizing: border-box;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; color: var(--text);
  font-family: var(--mono); font-size: .88rem; outline: none;
}
.sync-code-wrap input:focus { border-color: var(--accent); }
.sync-code-wrap input::placeholder { color: var(--muted); font-family: var(--sans); }
.sync-code-wrap button {
  flex: 0 0 auto; background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px;
  font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.sync-code-wrap button:hover { border-color: var(--accent); color: var(--accent); }
#syncResult { margin-top: 14px; }

.synced-wallets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.synced-tag {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-size: 0.78rem; cursor: pointer;
  transition: border-color .15s;
}
.synced-tag:hover { border-color: var(--accent); }
.synced-tag img { width: 16px; height: 16px; border-radius: 50%; }
.synced-tag .stag-sym { font-weight: 600; text-transform: uppercase; color: var(--muted); font-size: 0.7rem; }
.synced-tag .stag-addr { font-family: var(--mono); color: var(--text); }

/* ── LTC stats ── */
.modal-wide { max-width: 780px; }

.ltc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ltc-stat {
  background: var(--surface2);
  padding: 14px 16px;
}
.ltc-stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.ltc-stat-val { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; }
.ltc-stat-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.ltc-stat-val.pos { color: var(--green); }
.ltc-stat-val.neg { color: var(--red); }

.ltc-months { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.ltc-month-row {
  display: grid; grid-template-columns: 140px 1fr 1fr 1fr auto;
  align-items: center; gap: 12px;
  background: var(--surface2); border-radius: 10px; padding: 12px 16px;
  font-size: 0.82rem;
}
.ltc-month-name { font-weight: 600; }
.ltc-month-val { font-family: var(--mono); }
.ltc-month-val.pos { color: var(--green); }
.ltc-month-val.neg { color: var(--red); }
.ltc-month-txs { color: var(--muted); font-size: 0.75rem; }
.ltc-sync-note { font-size: 0.75rem; color: var(--muted); margin-top: 8px; }

.ltc-excl-banner {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ltc-ex-intro {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.ltc-ex-intro strong { color: var(--text); font-weight: 600; }

.ltc-ex-list { display: flex; flex-direction: column; gap: 4px; max-height: 460px; overflow-y: auto; }

.ltc-ex-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .15s, border-color .15s;
}
.ltc-ex-row:hover { border-color: var(--accent); }
.ltc-ex-row.excluded { background: rgba(124, 109, 250, 0.08); border-color: rgba(124, 109, 250, 0.35); }

.ltc-ex-toggle { position: relative; display: inline-flex; cursor: pointer; user-select: none; }
.ltc-ex-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ltc-ex-checkbox {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  display: inline-block;
  position: relative;
  transition: all .15s;
}
.ltc-ex-toggle:hover .ltc-ex-checkbox { border-color: var(--accent); }
.ltc-ex-toggle input:checked + .ltc-ex-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}
.ltc-ex-toggle input:checked + .ltc-ex-checkbox::after {
  content: ''; position: absolute;
  left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ltc-ex-main { min-width: 0; }
.ltc-ex-amt {
  font-family: var(--mono); font-size: 0.92rem; font-weight: 600;
  color: var(--red);
}
.ltc-ex-row.excluded .ltc-ex-amt { color: var(--muted); text-decoration: line-through; }
.ltc-ex-usd { color: var(--muted); font-weight: 400; font-size: 0.78rem; margin-left: 6px; }
.ltc-ex-date { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.ltc-ex-txid code {
  font-size: 0.72rem; color: var(--muted);
  background: var(--surface);
  padding: 3px 7px; border-radius: 5px;
  border: 1px solid var(--border);
}

@media (max-width: 600px) {
  .ltc-ex-row { grid-template-columns: 28px 1fr; gap: 10px; }
  .ltc-ex-txid { grid-column: 1 / -1; padding-left: 40px; margin-top: -4px; }
}

/* ── TX Flow ── */
.tx-io-list { display: flex; flex-direction: column; gap: 4px; }
.tx-io-row {
  display: grid; grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 10px;
  background: var(--surface2); border-radius: 8px; padding: 9px 12px;
  font-size: 0.82rem;
}
.tx-io-label { font-size: 0.68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.tx-io-addr { font-family: var(--mono); color: var(--text); }
.tx-io-val { font-family: var(--mono); color: var(--text); text-align: right; }
.tx-io-usd { color: var(--muted); font-size: 0.75rem; text-align: right; min-width: 60px; }
.tx-io-divider { text-align: center; color: var(--muted); font-size: 1rem; padding: 2px 0; }
.stat-value.warn { color: #fbbf24; }

/* ── Receive Modal ── */
.modal-receive { max-width: 420px; }
.rcv-body { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.qr-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  line-height: 0;
}
.qr-img { width: 200px; height: 200px; display: block; }
.rcv-addr-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; width: 100%;
}
.rcv-addr {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text);
  word-break: break-all; flex: 1;
}
.rcv-amount-row { width: 100%; }
.rcv-amount-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rcv-label { font-size: 0.75rem; color: var(--muted); }
.rcv-pill {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 2px; gap: 2px;
}
.rcv-pill-opt {
  font-size: 0.7rem; font-weight: 600; padding: 3px 10px;
  border-radius: 99px; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.rcv-pill-opt.active { background: var(--accent); color: #fff; }
.rcv-amount-wrap {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.rcv-amount-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 0.9rem;
  padding: 8px 12px;
}
.rcv-amount-wrap input::-webkit-outer-spin-button,
.rcv-amount-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rcv-amount-wrap input[type=number] { -moz-appearance: textfield; }
.rcv-sym { padding: 0 0 0 12px; color: var(--muted); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.rcv-uri {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  word-break: break-all; text-align: center; width: 100%;
}

/* ── Custom tooltip ── */
.tip-box {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  max-width: 260px;
  white-space: normal;
}
.tip-box.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ══════════════════════════════════════════════════════════════════════════
   Mobile (≤ 640px) — single, clean responsive block.
   ══════════════════════════════════════════════════════════════════════════ */

/* Hub-tile link colors — kept outside @media so they apply at every size. */
.hub-tile,
.hub-tile:link,
.hub-tile:visited,
.hub-tile:hover,
.hub-tile:active { color: var(--muted); text-decoration: none; }
.hub-tile:hover { color: var(--text); }

@media (max-width: 640px) {

  /* iOS auto-zoom prevention: any focused input ≥ 16px font */
  input, select, textarea { font-size: 16px; }

  /* ── Header: compact inline strip ── */
  header {
    flex-direction: row;
    align-items: center;
    height: 52px;
    padding: 0 14px;
    gap: 10px;
  }
  .logo {
    font-size: 1.1rem;
    padding: 0;
    height: auto;
    border: none;
    display: inline-flex;
    align-items: center;
  }
  .header-right {
    width: auto;
    flex: 0 0 auto;
    border: none;
    padding: 0;
    height: auto;
    gap: 6px;
    justify-content: flex-end;
  }
  .gas-widget, .widget-link { display: none; }
  .online-badge {
    border: 1px solid var(--border);
    background: var(--surface2);
    padding: 4px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
  }
  .theme-toggle { width: 34px; height: 34px; }
  .theme-toggle svg { width: 15px; height: 15px; }
  .back-btn { height: 34px; padding: 0 10px; font-size: 0.76rem; }

  /* ── Background popover ── */
  .bg-popover {
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 24px);
    right: 0;
  }
  .bg-option { padding: 11px 12px; font-size: 0.83rem; }

  /* ── Hub (home) ── */
  .hub { padding: 22px 16px 56px; }
  .hub-title {
    font-size: clamp(2.4rem, 13vw, 3.6rem);
    letter-spacing: -1.5px;
  }
  .hub-tagline { font-size: 0.85rem; margin: 8px 0 20px; }

  .hub-search { padding: 4px 4px 4px 12px; max-width: 100%; }
  .hub-search-icon { width: 18px; height: 18px; }
  .hub-search input { padding: 10px 0; }
  .hub-search-go { padding: 8px 14px; font-size: 0.82rem; }
  .hub-search-hint { font-size: 0.72rem; min-height: 16px; margin-top: 8px; }

  .hub-nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 18px;
    max-width: 100%;
  }
  .hub-tile {
    padding: 12px 4px;
    font-size: 0.72rem;
    gap: 6px;
    border-radius: 10px;
  }
  .hub-tile svg { width: 18px; height: 18px; }

  /* ── Section pages (Prices, Watchlist) ── */
  .page { padding: 20px 14px 56px; }
  .page-hero { margin-bottom: 20px; }
  .page-title { font-size: clamp(1.7rem, 7.5vw, 2.4rem); letter-spacing: -0.8px; }
  .page-tagline { font-size: 0.82rem; margin-top: 6px; }

  /* ── Wallet / TX result cards ── */
  .result-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .result-header-left img { width: 28px; height: 28px; }
  .coin-name { font-size: 0.92rem; }
  .result-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .btn-sm { padding: 7px 11px; font-size: 0.74rem; }

  /* Stats grid */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { padding: 12px 14px; }
  .stat-value { font-size: 0.95rem; }

  /* TX list (recent transactions) */
  .txs-section { padding: 14px 16px; }
  .tx-row { padding: 9px 10px; gap: 8px; }
  .tx-sign { width: 24px; height: 24px; font-size: 0.85rem; }
  .tx-amount { font-size: 0.82rem; }

  /* TX flow (lookup result From/To rows) */
  .tx-io-row {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 8px;
  }
  .tx-io-val { grid-column: 2; }
  .tx-io-usd { grid-column: 2; font-size: 0.7rem; }

  /* ── Prices grid ── */
  .price-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .price-card { padding: 12px; }
  .price-card-price { font-size: 0.92rem; }
  .section-header { flex-wrap: wrap; gap: 8px; }
  .price-search-wrap input { width: 100%; }

  /* ── Watchlist ── */
  .watchlist { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .watch-card { padding: 12px; }
  .watch-balance { font-size: 0.95rem; }

  /* Sync box */
  .sync-box { padding: 14px; }
  .sync-input-wrap { flex-direction: column; }
  .sync-input-wrap button { width: 100%; }
  .sync-code-wrap { flex-direction: column; }
  .sync-code-wrap button { width: 100%; }

  /* ── Convert page ── */
  .converter-card { flex-direction: column; }
  .cv-side { padding: 14px 16px; }
  .cv-side-r { border-left: none; border-top: 1px solid var(--border); align-items: flex-start; }
  .cv-side-r .cv-amt { text-align: left; }
  .cv-amt { font-size: 1.5rem; }
  .cv-swap-btn {
    width: 100%; height: 40px;
    border-left: none; border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  #cvDrop { width: calc(100vw - 32px); }

  /* ── Modals (bottom-sheet style on phone) ── */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    overflow-y: auto;
  }
  .modal-wide { max-height: 92dvh; }
  .modal-header { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .modal-body { padding: 16px; }
  .range-tabs { gap: 3px; flex-wrap: wrap; }
  .range-tab { padding: 4px 8px; font-size: 0.72rem; }

  /* LTC stats */
  .ltc-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ltc-month-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px 12px;
  }
  .ltc-month-name { grid-column: 1 / -1; font-size: 0.85rem; }
  .ltc-month-txs { grid-column: 1 / -1; }

  /* Receive modal */
  .modal-receive { border-radius: 20px 20px 0 0; }
  .rcv-body { padding: 16px; gap: 14px; }
  .qr-img { width: 180px; height: 180px; }
}

@media (max-width: 400px) {
  header { padding: 0 12px; gap: 8px; }
  .hub-nav { grid-template-columns: repeat(2, 1fr); }
  .hub-title { font-size: 2.4rem; }
  .online-badge .online-dot { display: none; }
  .online-badge { padding: 4px 8px; }
}

/* ── Gambling page game cards ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}
.game-card {
  --game-accent: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .18s ease, border-color .15s, background .15s, box-shadow .18s;
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--game-accent) 20%, transparent) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: -1;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--game-accent);
  background: var(--surface2);
  box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--game-accent) 70%, transparent);
}
.game-card:hover::before { opacity: 1; }
.game-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--game-accent) 14%, var(--surface2));
  color: var(--game-accent);
  border: 1px solid color-mix(in srgb, var(--game-accent) 28%, var(--border));
  transition: transform .18s ease, background .15s;
}
.game-card-icon svg { width: 22px; height: 22px; }
.game-card:hover .game-card-icon {
  transform: scale(1.06) rotate(-3deg);
  background: color-mix(in srgb, var(--game-accent) 22%, var(--surface2));
}
.game-card-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.game-card-title {
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
}
.game-card-desc {
  font-size: .76rem;
  line-height: 1.4;
  color: var(--muted);
}
.game-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--game-accent) 14%, transparent);
  color: var(--game-accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid color-mix(in srgb, var(--game-accent) 28%, transparent);
  transition: background .15s, color .15s, gap .18s ease;
}
.game-card-cta svg { width: 12px; height: 12px; transition: transform .18s ease; }
.game-card:hover .game-card-cta {
  background: var(--game-accent);
  color: #fff;
  gap: 8px;
}
.game-card:hover .game-card-cta svg { transform: translateX(2px); }

@media (max-width: 460px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card { padding: 14px; gap: 8px; }
  .game-card-icon { width: 36px; height: 36px; }
  .game-card-title { font-size: .92rem; }
  .game-card-desc { font-size: .72rem; }
}
