:root {
  --bg: #0d0f14;
  --panel: #151821;
  --panel-2: #1c2030;
  --border: #272b3a;
  --text: #e6e8ef;
  --muted: #8b90a3;
  --accent: #d97757;
  --accent-2: #e8916f;
  --green: #4ade80;
  --radius: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1a1d28, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 920px; margin: 0 auto; padding: 32px 20px; }

header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.who { color: var(--muted); font-size: 14px; }

.hero { text-align: center; padding: 56px 0 8px; }
.hero h1 { font-size: 52px; line-height: 1.03; letter-spacing: -0.035em; margin: 0 0 18px; font-weight: 800; }
.hero h1 .accent { color: var(--accent); }
.hero p { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 600px; margin: 0 auto; }
.hero p b { color: var(--text); font-weight: 600; }

.stat-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
}

.signin-inline {
  display: flex; gap: 10px; max-width: 460px; margin: 28px auto 0;
}
.signin-inline .field { text-align: center; }
.signin-inline .btn { white-space: nowrap; }

/* terminal-native hero preview */
.term-preview {
  max-width: 680px; margin: 40px auto 8px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: #0a0c10;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02);
}
.tp-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.tp-dot { width: 11px; height: 11px; border-radius: 50%; }
.tp-dot.r { background: #ff5f57; } .tp-dot.y { background: #febc2e; } .tp-dot.g { background: #28c840; }
.tp-title { margin-left: 8px; font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.tp-body { padding: 18px 20px; }
.tp-body pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.7; text-align: left; color: var(--text); white-space: pre-wrap; }
.tp-orange { color: var(--accent); font-weight: 700; }
.tp-green { color: var(--green); }
.tp-pink { color: #e89bd0; }
.tp-dim { color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--accent); color: #1a0f0a; border: none; cursor: pointer;
  font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: 10px;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: #f87171; border: 1px solid #43242a; }

input.field {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 15px;
}
input.field:focus { outline: none; border-color: var(--accent); }

.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.signin-box { max-width: 380px; margin: 24px auto; }

.rooms { display: grid; gap: 12px; margin-top: 20px; }
.room-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.room-item h3 { margin: 0 0 4px; font-size: 16px; }
.room-meta { color: var(--muted); font-size: 13px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.badge.owner { color: var(--accent-2); border-color: #43332a; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 18px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: #3a3f52; transform: translateY(-2px); }
.feature .fx { font-size: 22px; display: block; margin-bottom: 12px; }
.feature h4 { margin: 0 0 6px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---- terminal page ---- */
.term-shell { display: flex; height: 100vh; }
.term-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.term-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.term-bar .title { font-weight: 600; }
.typing-ind { font-size: 12px; color: var(--accent-2); }
#terminal { flex: 1; padding: 8px; background: #0a0c10; min-height: 0; }

.starter-hint { position: relative; padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--border); }
.starter-hint .hint-lead { font-size: 14px; color: var(--text); margin-bottom: 10px; padding-right: 24px; }
.starter-hint .hint-lead b { color: var(--accent-2); }
.hint-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; transition: border-color .15s, transform .05s; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: translateY(1px); }
.hint-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.hint-x:hover { color: var(--text); }

.side {
  width: 260px; border-left: 1px solid var(--border); background: var(--panel);
  display: flex; flex-direction: column;
}
.side h4 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.members { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.member:hover { background: var(--panel-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex: none; }
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.member .nm { font-size: 14px; }
.member .tag { font-size: 11px; color: var(--muted); margin-left: auto; }

.preview-btn { display: block; margin: 10px 12px 0; padding: 9px 12px; text-align: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.preview-btn:hover { border-color: var(--accent); text-decoration: none; }
.usage { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.usage-dot { color: var(--accent); }
#usageText { font-size: 13px; }

.invite { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); }
.invite label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.invite .row { gap: 8px; }
.invite input { font-size: 12px; }

.log { padding: 8px 16px; max-height: 120px; overflow-y: auto; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.log div { padding: 2px 0; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border); padding: 10px 18px;
  border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .side { display: none; }
}
