/* GAME3579 Creator Hub — 1차 시안 공통 스타일 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f2f1ee;
  --line: #e8e6e1;
  --text: #17161a;
  --text-2: #5d5b63;
  --text-3: #9a98a0;
  --brand: #2f6bff;
  --brand-soft: #e8efff;
  --brand-ink: #1f4fd1;
  --mint: #10b9a0;
  --mint-soft: #e2f7f3;
  --violet: #6d5cff;
  --violet-soft: #efedff;
  --green: #12a36a;
  --green-soft: #e5f7ef;
  --sky: #1d8cf0;
  --sky-soft: #e6f2fe;
  --wave: #d7d4cd;
  --wave-on: #2f6bff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 18, 30, 0.04), 0 6px 20px rgba(20, 18, 30, 0.05);
  --sidebar: 232px;
  --font:
    "Pretendard Variable", Pretendard, system-ui, -apple-system,
    "Apple SD Gothic Neo", sans-serif;
}

[data-theme="dark"] {
  --bg: #121214;
  --surface: #1b1b1f;
  --surface-2: #232328;
  --line: #2c2c33;
  --text: #f3f2f5;
  --text-2: #b4b2bb;
  --text-3: #77757e;
  --brand: #5b8cff;
  --brand-soft: #1a2340;
  --brand-ink: #9db8ff;
  --mint: #3fe0c5;
  --mint-soft: #13302c;
  --violet: #8f82ff;
  --violet-soft: #26233d;
  --green: #3ddc97;
  --green-soft: #17302a;
  --sky: #5fb0ff;
  --sky-soft: #172838;
  --wave: #3a3a42;
  --wave-on: #5b8cff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
  flex: none;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}

/* ---------- 레이아웃 ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logo {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  padding: 0 10px 18px;
  line-height: 1.1;
}
.logo b {
  color: var(--brand);
}
.logo small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0;
  margin-top: 3px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-2);
}
.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav a.on {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.nav a .cnt {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 99px;
  padding: 1px 7px;
}
.nav-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  padding: 18px 12px 6px;
}
.side-card {
  margin-top: auto;
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(160deg, var(--brand-soft), var(--surface-2));
}
.side-card h4 {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 6px;
}
.side-card p {
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.main {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.topbar .grow {
  flex: 1;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.wrap {
  padding: 8px 32px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}
.col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- 기본 요소 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.btn-dark {
  background: var(--text);
  color: var(--bg);
}
.btn-brand {
  background: var(--brand);
  color: #fff;
}
.btn-line {
  border: 1px solid var(--line);
  background: var(--surface);
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--text-3);
}
.chip.on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}
.b-prompt {
  background: var(--violet-soft);
  color: var(--violet);
}
.b-asset {
  background: var(--green-soft);
  color: var(--green);
}
.b-mag {
  background: var(--sky-soft);
  color: var(--sky);
}
.b-sound {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.b-tool {
  background: var(--surface-2);
  color: var(--text-2);
}
.badge svg.lucide {
  width: 12px;
  height: 12px;
}

/* 회원 등급 */
.tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid currentColor;
}
.tier svg.lucide {
  width: 11px;
  height: 11px;
}
.t-free {
  color: var(--green);
}
.t-member {
  color: var(--sky);
}
.t-creator {
  color: var(--violet);
}
.t-pro {
  color: var(--brand);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sec-h {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}
.sec-h h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* .sec-h h2::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--brand); } */
.sec-h p {
  color: var(--text-2);
  font-size: 14px;
  padding-bottom: 2px;
}
.sec-h .more {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sec-h .more:hover {
  color: var(--text);
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 20px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 15.5px;
  color: var(--text);
}
.search input::placeholder {
  color: var(--text-3);
}
.search .scope {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13.5px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.kbd {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---------- 썸네일 (이미지 대체 일러스트) ---------- */
.thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: #fff;
}
.thumb > .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
}
.thumb .ico svg.lucide {
  width: 44px;
  height: 44px;
  stroke-width: 1.5;
  opacity: 0.95;
}
.g1 {
  background: linear-gradient(135deg, #3b2a6b, #7a4fd1 60%, #f08a5d);
}
.g2 {
  background: linear-gradient(135deg, #8dd3a0, #3c9a6a);
}
.g3 {
  background: linear-gradient(160deg, #f6b38a, #c25b8f 55%, #3a3577);
}
.g4 {
  background: linear-gradient(135deg, #0f2027, #2c5364);
}
.g5 {
  background: linear-gradient(135deg, #ff9a3c, #ff5e62);
}
.g6 {
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
}
.g7 {
  background: linear-gradient(135deg, #222, #555);
}
.g8 {
  background: linear-gradient(135deg, #f7d774, #e98b2a);
}
.g9 {
  background: linear-gradient(135deg, #1e1b4b, #4338ca 55%, #22d3ee);
}
.pixel-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- 오디오 행 ---------- */
.track {
  display: grid;
  grid-template-columns: 40px minmax(140px, 220px) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
}
.track:last-child {
  border-bottom: 0;
}
.play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.play:hover,
.track.playing .play {
  background: var(--text);
  color: var(--bg);
}
.play svg.lucide {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.track .name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track .meta {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  gap: 8px;
  align-items: center;
}
.wave {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}
.wave i {
  flex: 1;
  min-width: 2px;
  border-radius: 2px;
  background: var(--wave);
}
.track.playing .wave i.p {
  background: var(--wave-on);
}
.track .acts {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-2);
}
.track.locked .wave {
  opacity: 0.45;
}
.track.locked .play {
  color: var(--text-3);
}

/* ---------- 반응형 ---------- */
@media (max-width: 1240px) {
  .wrap {
    grid-template-columns: 1fr;
  }
  .rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    display: none;
  }
  .topbar,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .track {
    grid-template-columns: 40px 1fr auto;
  }
  .track .wave {
    display: none;
  }
}

/* 시안 안내 라벨 */
.proto-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: #17161a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.proto-note a {
  color: #9db8ff;
}
