/* ============================================================
   3dseat — 다크 스튜디오 UI
   3D 캔버스가 화면을 꽉 채우고, 최소한의 크롬만 얹는다.
   ============================================================ */
:root {
  --bg-top: #1b1d22;
  --bg-bot: #0c0d10;
  --fg: #eef1f4;
  --dim: #9aa1ab;
  --line: rgba(255,255,255,.12);
  --accent: #00e0c6;
  --panel: rgba(18,20,24,.72);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo',
               'Noto Sans KR', sans-serif;
  color: var(--fg);
  background: #000;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.mono, .ov-mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }

#app { position: fixed; inset: 0; }

/* 캔버스: 뒤에 그라데이션(투명 렌더러가 비침) */
#c {
  display: block; width: 100%; height: 100%;
  background: radial-gradient(120% 120% at 50% 35%, var(--bg-top) 0%, var(--bg-bot) 70%);
  touch-action: none;
}
#c.grab { cursor: grab; }
#c.grabbing { cursor: grabbing; }

/* 은은한 비네트로 몰입감 */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 45%, transparent 55%, rgba(0,0,0,.45) 100%);
}

/* ---- 상단 바 ---- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; gap: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent);
  pointer-events: none;
}
.brand { display: flex; align-items: baseline; gap: 10px; pointer-events: auto; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  align-self: center; box-shadow: 0 0 12px var(--accent);
}
.brand .name { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.brand .sub { font-size: 12px; color: var(--dim); }

.tools { display: flex; gap: 8px; pointer-events: auto; }
.tool {
  font-size: 12.5px; color: var(--fg); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .15s, background .15s, color .15s;
}
.tool:hover { border-color: var(--accent); color: #fff; }
.tool[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---- 하단 힌트 ---- */
.hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 12px; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none; opacity: 1; transition: opacity .6s;
}
.hint.fade { opacity: 0; }

/* ---- 자동재생 게이트 ---- */
.playgate {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: none; border: none; color: var(--fg); cursor: pointer;
}
.playgate .pg-icon {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px;
  background: var(--accent); color: #04201d;
  box-shadow: 0 8px 40px rgba(0,224,198,.4);
}
.playgate .pg-text { font-size: 14px; color: var(--dim); }

/* ---- 오버레이(로딩/에러) ---- */
.overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(120% 120% at 50% 40%, var(--bg-top), var(--bg-bot));
}
.ov-title { font-size: 17px; font-weight: 600; }
.ov-mono { font-size: 12px; color: var(--dim); }
.track { width: min(320px, 60vw); height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.retry {
  margin-top: 6px; font-size: 13px; color: #04201d; background: var(--accent);
  border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer;
}

.hidden { display: none !important; }

/* ---- 모바일 ---- */
@media (max-width: 560px) {
  .brand .sub { display: none; }
  .tool { padding: 7px 9px; font-size: 12px; }
  .hint { font-size: 11px; bottom: 12px; }
}
