:root {
  --c1: #4361ee;
  --c2: #3f37c9;
  --c3: #4cc9f0;
  --bg: #0f1221;
  --fg: #e7ecff;
  --muted: #9fb0ff;
  --danger: #ff5d6c;
  --ok: #36d399;
  --card: #171b33;
  --card2: #141935;
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: linear-gradient(180deg, #0b1030, #0a0e27 60%);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}
.hidden {
  display: none;
}

/* Hero Section */
.hero {
  padding: 64px 16px;
  text-align: center;
}
.hero h1 {
  font-size: 42px;
  margin: 0 0 8px;
  letter-spacing: 0.3px;
}
.hero p {
  opacity: 0.85;
  margin: 0 0 16px;
}
.cta .btn {
  font-size: 18px;
}

/* Join Form */
.panel {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.join-form {
  display: flex;
  gap: 10px;
}
.join-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1030;
  color: var(--fg);
}

/* Buttons */
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  color: white;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(67, 97, 238, 0.35);
  transition: transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-secondary {
  background: linear-gradient(90deg, #2431a8, #3f37c9);
}
.btn-danger {
  background: linear-gradient(90deg, #e43e59, #ff5d6c);
}
.btn-pill {
  border-radius: 999px;
  padding: 8px 14px;
  background: #1a2044;
  display: inline-block;
  margin: 6px 6px 0 0;
  color: #dbe1ff;
  text-decoration: none;
}

/* Features */
.grid {
  display: grid;
  gap: 16px;
}
.features.grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
}

/* Call Screen */
.call-root {
  padding: 16px;
}
.connecting {
  text-align: center;
  padding: 48px 16px;
}
.loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--c3);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}
.code {
  display: inline-block;
  margin: 6px 0 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #1a2044;
  color: #cfe2ff;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Active Call UI */
.active-call .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.badge {
  color: var(--ok);
  margin-right: 8px;
}
.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.participants {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.participant {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.participant .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #253173;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.participant .name {
  font-weight: 600;
}
.participant .meta {
  opacity: 0.8;
  font-size: 12px;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .join-form {
    flex-direction: column;
  }
  .hero h1 {
    font-size: 32px;
  }
}
