/* K25 Explorer v2 */
:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --border: #e4e6ef;
  --text: #121528;
  --text-2: #5a6078;
  --link: #4a3fd6;
  --accent: #5b4cf0;
  --accent-2: #20c9e8;
  --accent-3: #e85bc0;
  --ok: #0f9d6b;
  --ok-bg: #e3f6ee;
  --fail: #d6334f;
  --fail-bg: #fde8ec;
  --pill: #eef0f7;
  --hero-1: #07080f;
  --hero-2: #121433;
  --shadow: 0 1px 2px rgba(18, 21, 40, .04), 0 4px 16px rgba(18, 21, 40, .05);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Pretendard", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0c16;
  --surface: #13152a;
  --surface-2: #181b33;
  --border: #262a47;
  --text: #e9eaf5;
  --text-2: #9196b3;
  --link: #8f86ff;
  --accent: #7b6dff;
  --accent-2: #33d6f0;
  --accent-3: #f075cf;
  --ok: #3fd39b;
  --ok-bg: rgba(63, 211, 155, .12);
  --fail: #ff6b85;
  --fail-bg: rgba(255, 107, 133, .12);
  --pill: #1f2340;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c16;
    --surface: #13152a;
    --surface-2: #181b33;
    --border: #262a47;
    --text: #e9eaf5;
    --text-2: #9196b3;
    --link: #8f86ff;
    --accent: #7b6dff;
    --accent-2: #33d6f0;
    --accent-3: #f075cf;
    --ok: #3fd39b;
    --ok-bg: rgba(63, 211, 155, .12);
    --fail: #ff6b85;
    --fail-bg: rgba(255, 107, 133, .12);
    --pill: #1f2340;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
img { max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
.main { padding-block: 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.break { word-break: break-all; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.lead { margin: -8px 0 0; }

/* header */
.top { background: linear-gradient(180deg, var(--hero-1), var(--hero-2)); color: #fff; position: relative; padding-top: env(safe-area-inset-top, 0px); }
.top::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3), var(--accent-2)); opacity: .9; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08), 0 0 18px rgba(91, 76, 240, .45); }
.brand b { font-weight: 700; background: linear-gradient(90deg, #8ff0ff, #b7a8ff, #ff9ee4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: rgba(255, 255, 255, .72); padding: 8px 12px; border-radius: 10px; font-weight: 550; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .12); }
.theme { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.theme:hover { background: rgba(255, 255, 255, .15); }

/* search */
.search { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 0 16px; font: inherit; outline: none; }
.search input::placeholder { color: var(--text-2); }
.search button { border: 0; cursor: pointer; font: inherit; font-weight: 650; color: #fff; background: linear-gradient(135deg, var(--accent), #7a4cf0); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 76, 240, .18); }
.search-sm { margin: 0 0 16px; height: 42px; max-width: 640px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); box-shadow: none; }
.search-sm input { color: #fff; }
.search-sm input::placeholder { color: rgba(255, 255, 255, .55); }
.search-sm button { width: 48px; background: transparent; color: rgba(255, 255, 255, .8); }
.search-sm:focus-within { border-color: rgba(143, 134, 255, .8); box-shadow: 0 0 0 3px rgba(123, 109, 255, .25); }
.search-lg { height: 56px; max-width: 760px; }
.search-lg input { font-size: 15px; }
.search-lg button { padding: 0 26px; }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 20px; background: radial-gradient(1200px 400px at 10% -20%, #1c1f55 0%, transparent 60%), linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; padding: 44px 40px 48px; margin-top: -4px; box-shadow: var(--shadow); }
.hero-glow { position: absolute; width: 520px; height: 520px; right: -140px; top: -220px; border-radius: 50%; background: conic-gradient(from 90deg, #20c9e8, #7b6dff, #e85bc0, #ffd36e, #20c9e8); filter: blur(70px); opacity: .45; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-glow { animation: none; } }
.hero-in { position: relative; }
.eyebrow { margin: 0 0 8px; color: rgba(255, 255, 255, .65); font-size: 13px; font-weight: 550; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 22px; font-weight: 750; }

/* notices */
.notice { background: linear-gradient(90deg, rgba(32, 201, 232, .12), rgba(91, 76, 240, .12)); border: 1px solid rgba(91, 76, 240, .25); border-radius: 12px; padding: 12px 16px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.stat-l { color: var(--text-2); font-size: 12.5px; font-weight: 550; text-transform: uppercase; letter-spacing: .04em; }
.stat-v { font-size: 22px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-addr { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.stat-s { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(15, 157, 107, .6); animation: pulse 2s infinite; vertical-align: 1px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(15, 157, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 157, 107, 0); } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-h a { font-weight: 600; font-size: 13px; }
.card-b { padding: 16px 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.chart-card .card-b { padding-top: 8px; }
.chart { width: 100%; height: 140px; display: block; }
.chart rect:hover { opacity: .75; }
.chart-x { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12px; margin-top: 6px; }
.chart-sum { margin: 6px 0 0; }

/* latest lists */
.list { padding: 0; }
.li { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); }
#latest-blocks .li { grid-template-columns: 40px minmax(0, 1fr) auto; }
.li:last-child { border-bottom: 0; }
.li-main, .li-mid { display: flex; flex-direction: column; min-width: 0; }
.li-mid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--accent); background: var(--pill); }
.ico-t { color: #0e9fbd; }
.li.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: rgba(91, 76, 240, .12); } to { background: transparent; } }

/* page header */
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-h p { margin: 4px 0 0; }
.addr-h { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--pill); color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { padding: 10px 12px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.cnt { font-size: 11.5px; background: var(--pill); color: var(--text-2); padding: 1px 7px; border-radius: 999px; margin-left: 4px; font-weight: 600; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl th.r, .tbl td.r { text-align: right; }
.empty { text-align: center; color: var(--text-2); padding: 28px 12px !important; }

/* key-value */
.kv { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin: 0; padding: 6px 18px; }
.kv dt { color: var(--text-2); padding: 11px 0; }
.kv dd { margin: 0; padding: 11px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.kv-tight { padding: 0; grid-template-columns: 90px minmax(0, 1fr); }
.kv-tight dt, .kv-tight dd { padding: 4px 0; }

/* badges & pills */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--pill); color: var(--text-2); white-space: nowrap; }
a.badge:hover { text-decoration: none; filter: brightness(.97); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.fail { background: var(--fail-bg); color: var(--fail); }
.badge.tok { background: rgba(32, 201, 232, .14); color: #0b8fab; }
.badge.nft { background: rgba(232, 91, 192, .14); color: #c23a9c; }
.badge.tiny { font-size: 10.5px; padding: 1px 6px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 7px; background: var(--pill); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.pill-on { color: var(--accent); }
.dir { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; letter-spacing: .03em; }
.dir.in { background: var(--ok-bg); color: var(--ok); }
.dir.out { background: rgba(240, 160, 40, .15); color: #c27a0a; }
.dir.self { background: var(--pill); color: var(--text-2); }
.dot-fail { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--fail-bg); color: var(--fail); font-weight: 800; font-size: 11px; margin-right: 6px; }
.addr-self { color: var(--text); font-weight: 600; }

/* tokens */
.tok-link { display: inline-flex; align-items: center; gap: 8px; }
.tok-ico { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); flex: none; }
.tok-nft { background: linear-gradient(135deg, var(--accent), var(--accent-3)); border-radius: 7px; }
.tok-lg { width: 52px; height: 52px; font-size: 22px; }
.tok-lg.tok-nft { border-radius: 14px; }
.tok-h { display: flex; align-items: center; gap: 14px; }
.tok-h h1 { margin-bottom: 4px; }
.bar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--pill); vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

/* transfers in tx */
.xfers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.xfers li { display: flex; align-items: center; gap: 12px; }
.xfers li > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xfer-nft { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; display: block; }
.xfer-nft img, .xfer-nft .nft-ph { width: 100%; height: 100%; object-fit: cover; }
.xfer-nft .nft-ph span { display: none; }
.xfer-nft .nft-ph b { font-size: 11px; }

/* NFTs */
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.nft-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); color: var(--text); transition: transform .15s, box-shadow .15s; }
.nft-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.nft-img { aspect-ratio: 1; background: var(--pill); display: grid; place-items: center; overflow: hidden; }
.nft-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nft-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(135deg, #20c9e8, #7b6dff 50%, #e85bc0); }
.nft-ph span { font-size: 12px; font-weight: 700; opacity: .85; letter-spacing: .05em; }
.nft-ph b { font-size: 22px; }
.nft-cap { padding: 9px 11px; display: flex; flex-direction: column; min-width: 0; }
.nft-cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-detail { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.nft-hero { overflow: hidden; padding: 0; }
.nft-img-lg .nft-ph b { font-size: 44px; }
.nft-title { margin: 10px 0 14px; font-size: 28px; }

/* details / logs */
.fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 650; list-style: none; display: flex; gap: 8px; align-items: center; }
.fold > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; color: var(--text-2); }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary::-webkit-details-marker { display: none; }
.code { margin: 0; padding: 14px 18px; border-top: 1px solid var(--border); font: 12.5px/1.7 var(--mono); overflow-x: auto; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.hl { color: var(--accent); font-weight: 700; }
.logs { border-top: 1px solid var(--border); }
.log { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.log:last-child { border-bottom: 0; }
.log-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }

/* misc */
.copy { background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 3px; border-radius: 6px; display: inline-grid; place-items: center; }
.copy:hover { color: var(--accent); background: var(--pill); }
.copy.done { color: var(--ok); }
.pager { display: flex; justify-content: flex-end; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pg { padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 600; background: var(--surface); }
.pg:hover { text-decoration: none; border-color: var(--accent); }
.pg.cur { border-color: transparent; background: var(--pill); color: var(--text-2); }
.pg.off { color: var(--text-2); opacity: .5; }
.nf { text-align: center; padding: 48px 20px; }
.nf-code { font-size: 64px; font-weight: 800; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 8px; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 650; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }

/* footer */
.foot { border-top: 1px solid var(--border); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; flex-wrap: wrap; font-size: 13px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.foot-brand img { border-radius: 50%; }

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .nft-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  h1 { font-size: 21px; }
  .top-in { gap: 10px; padding-block: 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { padding: 6px 10px; }
  .theme { margin-left: auto; }
  .hero { padding: 28px 20px 30px; border-radius: 16px; }
  .search-lg { height: 50px; }
  .search-lg button { padding: 0 16px; }
  .stats, .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-v { font-size: 18px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { padding-bottom: 0; font-size: 12.5px; }
  .kv dd { padding-top: 2px; border-bottom: 1px solid var(--border); }
  .kv dd:last-child { border-bottom: 0; }
  .li { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .li-mid { display: none; }
  .nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* company coin: large on the right of the hero; small next to the title on narrow screens */
.hero-in { display: flex; align-items: center; gap: 32px; }
.hero-text { flex: 1; min-width: 0; }
.hero-title { display: flex; align-items: center; gap: 14px; }
.hero-logo { display: none; width: 48px; height: auto; aspect-ratio: 1; border-radius: 50%; clip-path: circle(48.5%); flex: none; box-shadow: 0 0 20px rgba(255, 200, 80, .35); }
.hero-coin { flex: none; width: clamp(150px, 16vw, 200px); height: auto; aspect-ratio: 1; margin-right: 4%; border-radius: 50%; clip-path: circle(49%); filter: drop-shadow(0 0 30px rgba(255, 196, 70, .45)); box-shadow: 0 0 60px rgba(255, 196, 70, .35); animation: coin-float 6s ease-in-out infinite; }
@keyframes coin-float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-coin { animation: none; } }
@media (max-width: 860px) { .hero-coin { display: none; } .hero-logo { display: block; } }
