:root {
  --bg: #0b0d14;
  --bg-alt: #12151f;
  --surface: #171b28;
  --border: rgba(255,255,255,0.08);
  --text: #f2f3f7;
  --text-dim: #9297a8;
  --accent: #6c5ce7;
  --accent-light: #8b7ef0;
  --record: #ff4d4d;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
p { margin: 0 0 12px; color: var(--text-dim); }
a { color: var(--accent-light); }
.hidden { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,20,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--record); box-shadow: 0 0 0 4px rgba(255,77,77,0.15); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 600; cursor: pointer;
  text-decoration: none; padding: 10px 20px; font-size: 0.95rem;
  transition: transform .15s, background .15s, opacity .15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #1e2333; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-block { width: 100%; }
.btn-small { padding: 8px 16px; font-size: 0.88rem; }

main { padding: 56px 0 80px; }
.page-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.page-header .eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--accent-light);
  background: rgba(108,92,231,0.12); border: 1px solid rgba(108,92,231,0.3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* Pricing */
.billing-toggle {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 12px;
}
.currency-toggle { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; }
.toggle-pill-group { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.toggle-pill-group button {
  border: none; background: transparent; color: var(--text-dim); padding: 8px 18px;
  border-radius: 999px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
}
.toggle-pill-group button.active { background: var(--accent); color: #fff; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1040px; margin: 0 auto; }
.plan-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(108,92,231,0.15); }
.plan-card h3 { font-size: 1.3rem; }
.plan-price { font-size: 2.4rem; font-weight: 700; color: var(--text); margin: 12px 0 2px; }
.plan-price span { font-size: 1rem; color: var(--text-dim); font-weight: 500; }
.plan-price-alt { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 20px; }
.plan-features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-features li { font-size: 0.92rem; color: var(--text); padding-left: 24px; position: relative; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-light); font-weight: 700; }
.pay-options { display: flex; flex-direction: column; gap: 10px; }

/* Auth forms */
.auth-card {
  max-width: 400px; margin: 0 auto; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 0.85rem; color: var(--text-dim); }
.form-field input {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-size: 0.95rem;
}
.form-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-error { color: var(--record); font-size: 0.88rem; min-height: 20px; }
.auth-switch { text-align: center; font-size: 0.9rem; margin-top: 16px; }

/* Account */
.account-card { max-width: 480px; margin: 0 auto 24px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.account-plan-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: var(--accent); color: #fff; margin-bottom: 12px;
}

/* Meetings dashboard */
.meetings-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.room-list { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.room-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
}
.room-item .room-name { font-weight: 600; }
.room-item .room-code { font-size: 0.82rem; color: var(--text-dim); font-family: monospace; }

/* Meeting room */
body.meeting-page { padding: 0; }
.meeting-shell { display: flex; flex-direction: column; height: 100vh; }
.meeting-topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
  border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.meeting-stage { flex: 1; overflow: auto; padding: 20px; }
.video-grid {
  display: grid; gap: 12px; height: 100%;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.video-tile { position: relative; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.video-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-tile .tile-name {
  position: absolute; bottom: 8px; left: 10px; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 0.8rem; padding: 3px 10px; border-radius: 999px;
}
.meeting-controls {
  display: flex; justify-content: center; gap: 10px; padding: 16px; border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.control-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem;
}
.control-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.control-btn.danger { background: var(--record); border-color: var(--record); color: #fff; }
.prejoin-card {
  max-width: 400px; margin: 80px auto; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; text-align: center;
}

.footer-note { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-top: 40px; }

/* Admin dashboard */
.admin-section { margin-bottom: 48px; }
.admin-table-wrap { overflow-x: auto; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; white-space: nowrap; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 6px 10px; font-size: 0.85rem;
}
.admin-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--accent); color: #fff; }
