:root {
  --accent: #5B5BF0;
  --accent-hover: #4a4ad9;
  --bg: #0e0f16;
  --surface: #181a26;
  --surface-2: #212433;
  --text: #eef0f7;
  --text-dim: #9aa0b5;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { width: 32px; height: 32px; }
.brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }

/* ---- Hero / landing ---- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; letter-spacing: -0.03em; }
.accent { color: var(--accent); }
.sub { color: var(--text-dim); margin: 16px 0 32px; font-size: 1.1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: stretch; width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: #2b2f45; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-small { padding: 8px 14px; font-size: 0.85rem; background: var(--surface-2); color: var(--text); }
.btn-small:hover { background: #2b2f45; }
.btn-wide { width: 100%; margin-top: 14px; }

.join-box {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 6px;
}
.join-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 8px 12px;
  min-width: 240px;
}
.join-box input::placeholder { color: var(--text-dim); }

/* ---- Meeting-ready card ---- */
.link-card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 520px;
  text-align: left;
}
.link-card-title { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row code {
  flex: 1;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---- Features ---- */
.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 56px;
  width: 100%;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
}
.features strong { display: block; margin-bottom: 6px; }
.features span { color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; }

.footer { text-align: center; padding: 20px; color: var(--text-dim); font-size: 0.85rem; }

/* ---- Meeting page ---- */
.meeting-body { height: 100vh; overflow: hidden; }
.topbar-meeting { background: var(--surface); border-bottom: 1px solid var(--surface-2); flex-shrink: 0; }
.meeting-meta { display: flex; align-items: center; gap: 10px; }
.meeting-meta code { color: var(--text-dim); font-size: 0.85rem; }

.meet-container { flex: 1; min-height: 0; }
.meet-container iframe { width: 100%; height: 100%; border: 0; }

.name-gate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.name-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.name-card h2 { margin-bottom: 18px; letter-spacing: -0.02em; }
.name-card input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  padding: 12px 14px;
  outline: none;
}
.name-card input:focus { border-color: var(--accent); }
.error-text { color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 520px) {
  .join-box input { min-width: 0; flex: 1; }
  .actions { flex-direction: column; }
  .join-box { width: 100%; }
}
