@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #080b12;
  --panel: rgba(18, 23, 34, 0.86);
  --panel-2: #151b27;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f4ef;
  --muted: #929aab;
  --cyan: #66f5dc;
  --cyan-soft: rgba(102, 245, 220, 0.13);
  --red: #ff4655;
  --orange: #ff8c42;
  --glitch: #8aa8ff;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  font-family: "Noto Sans KR", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(120px); opacity: .14; }
.ambient-a { width: 520px; height: 520px; background: var(--cyan); top: -250px; right: -160px; }
.ambient-b { width: 430px; height: 430px; background: #344dff; left: -270px; top: 520px; opacity: .1; }

.site-header {
  position: relative;
  z-index: 5;
  height: 86px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--bg); background: var(--cyan); font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 76% 100%, 0 100%);
}
.brand b { display: block; font-size: 14px; letter-spacing: .22em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font: 500 9px/1 "IBM Plex Mono"; letter-spacing: .19em; }
.api-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #c7ced9; font: 600 11px/1 "IBM Plex Mono"; letter-spacing: .14em; }
.live-dot, .sync-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 13px var(--cyan); }

main { max-width: 1440px; margin: 0 auto; padding: 0 5vw 96px; }
.hero { position: relative; padding: 90px 0 76px; max-width: 920px; }
.hero::after {
  content: "VLCN"; position: absolute; z-index: -1; left: 64%; top: 22px;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.035);
  font: 900 clamp(90px, 17vw, 245px)/1 "IBM Plex Mono"; letter-spacing: -.1em;
}
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--cyan); font: 600 11px/1 "IBM Plex Mono"; letter-spacing: .14em; }
.eyebrow i { width: 52px; height: 1px; background: var(--cyan); opacity: .5; }
.hero h1 { margin: 26px 0 25px; font-size: clamp(54px, 8vw, 118px); line-height: .91; letter-spacing: -.075em; font-weight: 900; }
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero > p { max-width: 680px; margin: 0; color: #aab1bf; line-height: 1.9; font-size: 15px; word-break: keep-all; }
.hero > p strong { color: var(--glitch); font-weight: 700; }
.hero-meta { display: flex; gap: 22px; margin-top: 30px; color: #737d8f; font: 500 10px/1 "IBM Plex Mono"; letter-spacing: .11em; }
.sync-status { display: flex; align-items: center; gap: 8px; color: #b8c2cf; }
.sync-status.error i { background: var(--red); box-shadow: 0 0 13px var(--red); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stats article { min-height: 150px; padding: 27px 30px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(15,19,28,.72); border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.stats article:last-child { border-right: 0; }
.stats article::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--cyan); transition: width .5s ease; }
.stats.loaded article::after { width: 100%; }
.stats span { color: #c1c7d1; font-size: 12px; font-weight: 600; }
.stats b { font: 500 46px/1 "IBM Plex Mono"; letter-spacing: -.06em; }
.stats small { color: #626b7b; font: 500 9px/1 "IBM Plex Mono"; letter-spacing: .12em; }
.stats .glitch-stat { background: linear-gradient(135deg, rgba(92,119,255,.13), rgba(15,19,28,.72)); }
.stats .glitch-stat b { color: var(--glitch); }
.stats .glitch-stat::after { background: var(--glitch); }

.catalog { margin-top: 105px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.catalog-head > div { display: flex; align-items: center; gap: 16px; }
.section-index { color: var(--cyan); font: 600 11px "IBM Plex Mono"; }
.catalog h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.catalog-head p { margin: 0; color: var(--muted); font: 500 12px "IBM Plex Mono"; }
.catalog-head p b { color: var(--text); }

.controls { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; gap: 12px; margin: 22px 0 30px; }
.search { min-height: 50px; padding: 0 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: rgba(15,19,28,.78); }
.search:focus-within { border-color: rgba(102,245,220,.55); box-shadow: 0 0 0 3px rgba(102,245,220,.06); }
.search svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search input::placeholder { color: #626a79; }
.search kbd { border: 1px solid var(--line); color: #626a79; padding: 2px 7px; font: 500 11px "IBM Plex Mono"; }
.slot-filter { display: flex; border: 1px solid var(--line); background: rgba(15,19,28,.78); }
.filter, .glitch-filter { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; transition: .2s ease; }
.filter { min-width: 48px; border-right: 1px solid var(--line); }
.filter:last-child { border-right: 0; }
.filter:hover { background: rgba(255,255,255,.045); }
.filter.active { color: #09100f; background: var(--cyan); }
.glitch-filter { padding: 0 18px; border: 1px solid var(--line); background: rgba(15,19,28,.78); color: #a7afbd; }
.glitch-filter span { color: var(--glitch); margin-right: 6px; }
.glitch-filter.active { border-color: rgba(138,168,255,.6); color: white; background: rgba(138,168,255,.13); }

.ability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ability-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); box-shadow: 0 8px 24px rgba(0,0,0,.15); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.ability-card:hover { transform: translateY(-3px); border-color: rgba(102,245,220,.28); box-shadow: var(--shadow); }
.ability-card.has-glitch { background: linear-gradient(145deg, rgba(28,34,54,.92), rgba(15,19,28,.9)); }
.card-accent { position: absolute; top: 0; left: 0; height: 3px; width: 58px; background: var(--cyan); }
.has-glitch .card-accent { width: 100%; background: linear-gradient(90deg, var(--glitch), transparent); }
.card-header { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 15px; }
.ability-icon-wrap { position: relative; width: 62px; height: 62px; display: grid; place-items: center; background: #0b0f17; border: 1px solid var(--line); clip-path: polygon(0 0, 88% 0, 100% 12%, 100% 100%, 12% 100%, 0 88%); }
.ability-icon { width: 43px; height: 43px; object-fit: contain; filter: brightness(0) invert(1); position: relative; z-index: 1; }
.icon-fallback { position: absolute; font: 700 18px "IBM Plex Mono"; color: #657080; }
.ability-title > div { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.slot-badge { min-width: 23px; height: 20px; display: grid; place-items: center; color: var(--cyan); border: 1px solid rgba(102,245,220,.34); font: 600 10px "IBM Plex Mono"; }
.agent-name { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.ability-title h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.04em; }
.glitch-mark { color: var(--glitch); font-size: 18px; filter: drop-shadow(0 0 9px rgba(138,168,255,.55)); }
.ability-description { min-height: 48px; margin: 19px 0 18px; color: #9da6b5; font-size: 12px; line-height: 1.75; word-break: keep-all; }
.branch-summary { display: flex; flex-wrap: wrap; gap: 6px; min-height: 25px; }
.branch-chip { padding: 5px 8px; color: #969ead; border: 1px solid var(--line); font: 500 9px "IBM Plex Mono"; }
.branch-chip.glitch { color: #bdc9ff; border-color: rgba(138,168,255,.28); background: rgba(138,168,255,.07); }
.expand-button { width: calc(100% + 48px); margin: 21px -24px -24px; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid var(--line); background: rgba(0,0,0,.13); cursor: pointer; color: #a8b0bd; font-size: 11px; font-weight: 700; }
.expand-button:hover { color: var(--cyan); background: rgba(102,245,220,.035); }
.expand-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .25s ease; }
.expand-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.branches { width: calc(100% + 48px); margin: 24px -24px -24px; border-top: 1px solid var(--line); }
.branch { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.branch:last-child { border-bottom: 0; }
.branch.glitch { background: linear-gradient(90deg, rgba(138,168,255,.12), transparent); }
.branch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.branch-type { padding: 4px 7px; color: var(--cyan); background: var(--cyan-soft); font: 600 9px "IBM Plex Mono"; }
.branch.glitch .branch-type { color: #c6d1ff; background: rgba(138,168,255,.15); }
.branch h4 { margin: 0; font-size: 14px; }
.level { position: relative; padding: 12px 0 12px 38px; }
.level + .level { border-top: 1px dashed rgba(255,255,255,.08); }
.level-number { position: absolute; left: 0; top: 14px; color: #667081; font: 600 10px "IBM Plex Mono"; }
.level p { margin: 0; color: #aab1be; font-size: 11px; line-height: 1.7; white-space: pre-line; }
.buff { color: var(--cyan); }
.nerf { color: #ff756f; }

.loading, .error-state, .empty-state { min-height: 260px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line); background: rgba(15,19,28,.5); }
.loading { flex-wrap: wrap; gap: 8px; }
.loading span { width: 8px; height: 8px; background: var(--cyan); animation: pulse 1s infinite alternate; }
.loading span:nth-child(2) { animation-delay: .2s; }.loading span:nth-child(3) { animation-delay: .4s; }
.loading p { flex-basis: 100%; margin: -90px 0 0; color: var(--muted); font: 500 10px "IBM Plex Mono"; letter-spacing: .12em; }
.error-state { flex-direction: column; }
.error-state b { font-size: 19px; }.error-state p { color: var(--muted); font-size: 13px; }
.error-state button { margin-top: 10px; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); padding: 10px 18px; cursor: pointer; }
.empty-state { color: var(--muted); font-size: 13px; }
[hidden] { display: none !important; }

footer { max-width: 1440px; margin: 0 auto; padding: 26px 5vw 42px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #5d6676; font: 500 9px "IBM Plex Mono"; letter-spacing: .1em; }
footer a { color: #8993a3; text-decoration: none; }

@keyframes pulse { to { opacity: .2; transform: translateY(-5px); } }

@media (max-width: 1000px) {
  .ability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats article:nth-child(2) { border-right: 0; }
  .stats article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .controls { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  .site-header { height: 72px; }
  .api-link { font-size: 9px; }
  .hero { padding: 65px 0 58px; }
  .hero h1 { letter-spacing: -.065em; }
  .hero-meta { flex-direction: column; gap: 10px; }
  .stats article { min-height: 125px; padding: 22px; }
  .stats b { font-size: 37px; }
  .catalog { margin-top: 76px; }
  .controls { grid-template-columns: 1fr; }
  .slot-filter { min-height: 48px; }
  .filter { flex: 1; }
  .glitch-filter { min-height: 48px; }
  .ability-grid { grid-template-columns: 1fr; }
  .catalog-head { align-items: center; }
  .catalog-head > div { gap: 10px; }
  .catalog-head p { font-size: 10px; }
  footer { flex-direction: column; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
