:root {
  --bg: #0b0f14;
  --surface: #111820;
  --surface-2: #17212b;
  --line: #25313d;
  --muted: #83909d;
  --text: #eef3f6;
  --accent: #e2ff64;
  --accent-soft: rgba(226, 255, 100, 0.12);
  --orange: #ff9a62;
  font-family: "IBM Plex Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; }
.brand-mark img { display: block; width: 34px; height: 34px; object-fit: contain; }
.data-status { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.status-copy { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.status-copy strong { color: #bdc7cf; font-size: 13px; font-weight: 600; }
.status-copy small { color: #75828d; font-size: 10px; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { position: relative; padding: 105px 0 84px; text-align: center; }
.hero::before {
  content: "";
  position: absolute;
  width: 540px; height: 340px;
  left: 50%; top: 30px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(226,255,100,.085), transparent 68%);
  pointer-events: none;
}
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
h1 { position: relative; margin: 0; font-family: "Gowun Dodum", sans-serif; font-size: clamp(46px, 7vw, 82px); font-weight: 400; line-height: 1.12; letter-spacing: -.055em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy { margin: 27px 0 36px; color: #a6b0b9; font-size: 16px; line-height: 1.8; }
.search-shell { position: relative; display: flex; align-items: center; width: min(680px, 100%); height: 66px; margin: 52px auto 0; padding: 0 18px; background: #f0f4f1; border: 2px solid transparent; border-radius: 12px; box-shadow: 0 22px 70px rgba(0,0,0,.3); z-index: 4; }
.search-shell:focus-within { border-color: var(--accent); }
.search-icon { width: 18px; height: 18px; margin-right: 14px; border: 2px solid #56616a; border-radius: 50%; }
.search-icon::after { content:""; display:block; width: 7px; height:2px; background:#56616a; transform: translate(13px,13px) rotate(45deg); }
.search-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #10161c; font-size: 17px; }
.search-shell input::placeholder { color: #737d84; }
kbd { padding: 3px 8px; border: 1px solid #cbd1ce; border-radius: 5px; color: #778079; background: #e4e9e5; font-size: 12px; }
.suggestions { position: absolute; top: 72px; left: 0; right: 0; padding: 8px; max-height: 330px; overflow-y: auto; text-align: left; color: var(--text); background: #172029; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.suggestion { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 14px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.suggestion:hover, .suggestion.active { color: #11150c; background: var(--accent); }
.suggestion small { color: var(--muted); }
.suggestion:hover small, .suggestion.active small { color: #49502d; }
.popular { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.popular span { color: var(--muted); font-size: 12px; line-height: 28px; }
.chip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: #aeb7bf; background: transparent; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: #596876; color: var(--text); }

.empty-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; padding: 28px; overflow: hidden; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(23,33,43,.72), rgba(15,21,28,.5)); }
.empty-panel h2 { margin: 14px 0 6px; font-size: 20px; }
.empty-panel p { margin: 0; color: var(--muted); font-size: 14px; }
.empty-orbit { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #465360; border-radius: 50%; }
.empty-orbit::before { content:""; position:absolute; width: 78px; height: 26px; border: 1px solid #2e3944; border-radius: 50%; transform: rotate(-25deg); }
.empty-orbit span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }

.result { padding-top: 15px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.result-heading .eyebrow { margin-bottom: 8px; }
.result-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
.ghost-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.ghost-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: #bac3ca; font-size: 12px; }
.ghost-button:hover { border-color: var(--accent); color: var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-card span { display: block; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: clamp(19px, 2.4vw, 30px); letter-spacing: -.045em; white-space: nowrap; }
.stat-card small { display: block; margin-top: 5px; color: #65717c; font-size: 11px; }
.stat-card.featured { border-color: rgba(226,255,100,.33); background: var(--accent-soft); }
.stat-card.featured strong { color: var(--accent); }
.content-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 12px; margin-top: 12px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.option-panel { margin-top: 12px; padding: 23px; }
.option-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.option-filter { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #0e151c; }
.option-filter > span { display: block; margin-bottom: 9px; color: #c7d0d6; font-size: 11px; font-weight: 600; }
.range-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; }
.range-inputs span { color: #5f6b75; font-size: 10px; }
.range-inputs input { width: 100%; min-width: 0; padding: 8px; color: var(--text); background: #17212a; border: 1px solid #2b3843; border-radius: 6px; outline: none; font-size: 12px; }
.range-inputs input:focus { border-color: var(--accent); }
.range-inputs input::placeholder { color: #56626c; }
.filter-summary { margin: 15px 0 0; color: var(--accent); font-size: 11px; }
.chart-panel, .distribution-panel { padding: 23px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; }
.panel-heading h3 { margin: 0 0 6px; font-size: 18px; }
.panel-heading p, .unit-label { margin: 0; color: #96a3ae; font-size: 13px; }
.chart-wrap { position: relative; height: 260px; margin-top: 25px; }
#priceChart { width: 100%; height: 100%; }
.chart-tooltip { position: absolute; padding: 8px 10px; pointer-events: none; color: #11160c; background: var(--accent); border-radius: 7px; font-size: 11px; font-weight: 700; transform: translate(-50%, -115%); }
.distribution { display: flex; flex-direction: column; gap: 15px; margin-top: 27px; }
.dist-row { display: grid; grid-template-columns: 75px 1fr 28px; align-items: center; gap: 10px; font-size: 10px; color: var(--muted); }
.dist-track { height: 8px; overflow: hidden; background: #26313a; border-radius: 99px; }
.dist-bar { height: 100%; min-width: 3px; background: var(--orange); border-radius: inherit; }
.dist-row strong { color: #aab4bc; font-size: 10px; text-align: right; }
.trades-panel { margin-top: 12px; padding: 30px; }
.text-button { color: var(--accent); font-size: 13px; font-weight: 600; }
.table-wrap { margin-top: 27px; overflow-x: auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 15px; }
th { padding: 14px 12px; color: #91a0ac; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; text-align: right; }
th:first-child, td:first-child { text-align: left; }
td { padding: 18px 12px; color: #d0d8de; border-bottom: 1px solid rgba(37,49,61,.8); text-align: right; }
td:last-child { color: #fff; font-size: 16px; font-weight: 700; }
.option-tags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 300px; }
.option-tag { padding: 5px 8px; color: #d1d9df; background: #24313c; border: 1px solid #2d3d49; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.no-results { padding: 30px !important; color: var(--muted) !important; text-align: center !important; }

.upload-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin: 90px 0 45px; padding: 50px clamp(28px, 5vw, 60px); border: 1px solid var(--line); border-radius: 18px; background: #0f151c; }
.upload-section .eyebrow { margin-bottom: 11px; }
.upload-section h2 { margin: 0 0 12px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.upload-section p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.drop-zone { display: grid; grid-template-columns: auto 1fr; column-gap: 13px; align-items: center; padding: 22px; border: 1px dashed #495864; border-radius: 12px; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone input { display: none; }
.static-log { cursor: default; }
.static-log:hover { border-color: #495864; background: transparent; }
.upload-section code { color: var(--accent); }
.upload-arrow { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; color: #0f150c; background: var(--accent); border-radius: 50%; font-size: 19px; }
.drop-zone strong { font-size: 13px; }
.drop-zone small { color: var(--muted); font-size: 11px; }
footer { display: flex; justify-content: space-between; padding: 25px clamp(24px, 5vw, 72px); color: #59646d; border-top: 1px solid rgba(255,255,255,.06); font-size: 9px; letter-spacing: .14em; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 10; padding: 11px 16px; opacity: 0; color: #12170e; background: var(--accent); border-radius: 8px; font-size: 12px; font-weight: 700; transform: translate(-50%, 15px); transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .hero { padding-top: 78px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .option-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-section { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  main { width: min(100% - 24px, 1180px); }
  .topbar { height: 62px; padding: 0 14px; }
  .brand span:last-child { display: none; }
  .hero { padding: 62px 0 55px; }
  .hero-copy { font-size: 14px; }
  .desktop-only { display: none; }
  .search-shell { height: 58px; padding: 0 13px; }
  kbd { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 17px; }
  .stat-card strong { font-size: 19px; }
  .result-heading { align-items: center; }
  .chart-panel, .distribution-panel, .trades-panel { padding: 17px; }
  .option-panel { padding: 17px; }
  .option-filters { grid-template-columns: 1fr; }
  .upload-section { margin-top: 55px; padding: 28px 20px; }
  footer { padding: 20px 14px; }
}
