* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(64, 92, 255, 0.2), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(85, 235, 196, 0.12), transparent 30%),
    #0a0b10;
  color: #eef2ff;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: min(92vw, 440px);
  background: rgba(14, 17, 27, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.card h1 {
  margin-top: 0;
  margin-bottom: 8px;
}

.card p {
  margin-top: 0;
  margin-bottom: 14px;
  color: rgba(238, 242, 255, 0.86);
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
}

input,
select,
button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2f3d63;
  background: #141a29;
  color: #fff;
}

button {
  margin-top: 14px;
  background: #4f6df6;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.error {
  color: #ff8c8c;
  min-height: 20px;
}

.hidden {
  display: none;
}

body.in-call {
  background: black;
}

body.in-call .container {
  min-height: 0;
  padding: 0;
  max-width: none;
}

.call-panel {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: black;
}

.remote-fullscreen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: black;
  cursor: pointer;
}

.overlay {
  position: absolute;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 14px;
}

.top-right {
  top: 16px;
  right: 16px;
}

#status:empty {
  display: none;
}

.bottom-left {
  left: 16px;
  bottom: 16px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#remote-label {
  margin: 0;
}

.call-btn {
  width: auto;
  margin-top: 0;
  padding: 8px 14px;
}

.call-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.call-btn.unavailable {
  background: #b3262d;
  opacity: 1;
  color: #fff;
}

.local-pip {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 18vw;
  min-width: 180px;
  max-width: 260px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: black;
  z-index: 3;
}

.incoming {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 14px;
  border-radius: 10px;
  min-width: 250px;
  z-index: 4;
}

.incoming p {
  margin: 0 0 10px 0;
}

.incoming-actions {
  display: flex;
  gap: 8px;
}

.incoming-actions button {
  margin-top: 0;
}

.secondary {
  background: #4d4d4d;
}

.participant-menu {
  position: relative;
  z-index: 7;
}

.menu-toggle {
  margin: 0;
  width: auto;
  min-width: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 280px;
  max-height: 60vh;
  overflow: auto;
  border-radius: 10px;
  background: rgba(12, 16, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px;
}

.menu-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  opacity: 0.85;
}

.participant-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.participant-item {
  margin: 0;
  text-align: left;
  font-size: 13px;
  padding: 8px 10px;
}

.participant-item.busy {
  background: #6f1d22;
}

.participant-item.active {
  border: 1px solid rgba(68, 233, 168, 0.75);
}

.menu-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-signout {
  margin: 0;
  background: #6f1d22;
  width: 100%;
}

.toast-stack {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
  width: min(90vw, 420px);
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  background: rgba(16, 20, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.toast.success {
  border-color: rgba(68, 233, 168, 0.65);
}

.toast.warn {
  border-color: rgba(255, 197, 84, 0.65);
}

.toast.error {
  border-color: rgba(255, 123, 123, 0.75);
}

.toast button {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.16);
}
