/* 자체 보이스 v2 — OpenAudioMc풍 다크 글래스 UI */
:root {
  --bg0: #0b0e17;
  --bg1: #12172a;
  --card: rgba(22, 28, 50, 0.72);
  --line: rgba(120, 140, 200, 0.16);
  --txt: #e8ecf8;
  --muted: #8b93b0;
  --blurple: #5865f2;
  --cyan: #38e1c6;
  --pink: #eb459e;
  --green: #3ba55d;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  color: var(--txt);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 64px;
  background:
    radial-gradient(900px 400px at 10% -5%, rgba(88, 101, 242, 0.25), transparent 60%),
    radial-gradient(700px 380px at 95% 10%, rgba(56, 225, 198, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height: 100vh;
}
/* top bar */
#topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(11, 14, 23, 0.95), rgba(11, 14, 23, 0.75));
  backdrop-filter: blur(12px);
}
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.logo-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--blurple), var(--cyan), var(--pink), var(--blurple));
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.7);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#topbar .spacer, #topbar { justify-content: space-between; }
#userchip { display: flex; align-items: center; gap: 8px; font-weight: 700; }
#userchip[hidden] { display: none; }
#user-av { border-radius: 50%; border: 2px solid var(--blurple); }
#me { font-size: 0.9rem; }
main h1 { display: none; }
h2 { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.6em; }
section.card, section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1em 1.1em;
  margin: 0.9em 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  animation: rise 0.45s ease both;
}
section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.row { display: flex; gap: 0.7em; flex-wrap: wrap; align-items: center; margin: 0.5em 0; }
.space-between { justify-content: space-between; }
button {
  border: 0;
  border-radius: 12px;
  padding: 0.6em 1.2em;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--blurple), #7b5cff);
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.45);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.1); }
button:active { transform: translateY(1px) scale(0.98); }
button.ghost { background: rgba(255, 255, 255, 0.08); box-shadow: none; border: 1px solid var(--line); }
button[hidden] { display: none; }
#btn-discord { background: linear-gradient(135deg, #5865f2, #4752c4); }
#btn-mic-start { background: linear-gradient(135deg, #0ea472, #38e1c6); box-shadow: 0 4px 18px rgba(56, 225, 198, 0.35); color: #04231c; }
#btn-leave { background: linear-gradient(135deg, #b33a3a, #7a2b2b); box-shadow: none; }
input, select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--txt);
  border-radius: 10px;
  padding: 0.55em 0.8em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 100%;
}
input:focus, select:focus { border-color: var(--blurple); box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.3); }
select option { color: #111; }
input[type="checkbox"], input[type="range"] { accent-color: var(--blurple); }
label { color: var(--muted); font-size: 0.9rem; }
.chk { display: inline-flex; align-items: center; gap: 0.35em; }
.muted { color: var(--muted); font-size: 0.85rem; }
#conn-state { font-size: 0.85rem; color: var(--cyan); }
details { border-top: 1px dashed var(--line); padding-top: 0.6em; margin-top: 0.6em; }
summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
/* meter */
#meter {
  width: 100%;
  height: 26px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 18px rgba(56, 225, 198, 0.12);
}
/* participant tiles */
#tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.7em; margin: 0.7em 0; }
.tile {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.9em 0.5em;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tile-av {
  width: 46px; height: 46px; margin: 0 auto 0.4em;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blurple), var(--pink));
}
.tile-name { font-size: 0.85rem; word-break: break-all; }
.tile.speaking { border-color: var(--green); box-shadow: 0 0 16px rgba(59, 165, 93, 0.55); transform: scale(1.03); }
.tile.bad-conn { border-color: #e05252; box-shadow: 0 0 16px rgba(224, 82, 82, 0.5); }
.tile.empty { grid-column: 1 / -1; color: var(--muted); border-style: dashed; }
/* peers + chat */
#peers { list-style: none; padding: 0; display: grid; gap: 0.4em; }
#peers li {
  display: flex; align-items: center; gap: 0.7em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4em 0.7em;
  font-size: 0.88rem;
}
#chat { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.4em; max-height: 260px; overflow-y: auto; }
#chat li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  padding: 0.45em 0.8em;
  font-size: 0.92rem;
  animation: rise 0.25s ease both;
  word-break: break-word;
}
#speak-state { color: var(--cyan); }
#c-thr-v { color: var(--txt); }
small { color: var(--muted); font-weight: normal; }
@media (max-width: 560px) {
  body { padding: 0 10px 48px; }
  section, section.card { border-radius: 12px; }
  #tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .hero h1 { font-size: 1.5rem; }
}

/* promo hero */
.hero { text-align: center; padding: 2.2em 1.2em; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(88,101,242,.18), transparent 30%, rgba(56,225,198,.14) 50%, transparent 70%, rgba(235,69,158,.14));
  animation: spin 24s linear infinite;
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.82rem; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35em 1em; margin-bottom: 1em;
  background: rgba(0, 0, 0, 0.3);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(56,225,198,.6); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56,225,198,.55); }
  70% { box-shadow: 0 0 0 10px rgba(56,225,198,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,225,198,0); }
}
.hero h1 { font-size: 2rem; margin: 0.2em 0; }
.lede { color: var(--muted); line-height: 1.7; }
.cta { justify-content: center; margin: 1.2em 0; }
.ghostlink { color: var(--cyan); font-weight: 700; text-decoration: none; padding: 0.6em 1em; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6em; margin-top: 1.2em; text-align: left; }
.feat { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 0.8em; display: flex; flex-direction: column; gap: 0.3em; }
.feat b { font-size: 0.92rem; }
.feat span { font-size: 0.8rem; color: var(--muted); }
.steps { line-height: 2; padding-left: 1.4em; }
.steps code { background: rgba(0,0,0,.4); padding: 0.15em 0.5em; border-radius: 6px; border: 1px solid var(--line); }
.center { text-align: center; }
footer { padding: 1.5em 0 0.5em; font-size: 0.82rem; }
