@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Manrope:wght@400;500;600&display=swap");

:root {
  --ming: #467082;
  --ming-dark: #1a4e5a;
  --orange: #f19a3e;
  --white: #ffffff;
  --gray-100: #f3f5f7;
  --gray-400: #9ca3af;
  --gray-700: #1f2937;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --stroke: rgba(255, 255, 255, 0.18);
  --shadow: 0 20px 60px rgba(15, 32, 39, 0.25);
}

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

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(70, 112, 130, 0.35), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(241, 154, 62, 0.3), transparent 45%),
    linear-gradient(135deg, #0c1b21 0%, #101c23 60%, #14272f 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.orb-a {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(70, 112, 130, 0.65), transparent 70%);
  left: -40px;
  top: 120px;
  animation: float 14s ease-in-out infinite;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(241, 154, 62, 0.45), transparent 70%);
  right: -80px;
  bottom: 100px;
  animation: float 16s ease-in-out infinite reverse;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.15;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 48px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--ming), var(--ming-dark));
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(26, 78, 90, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.session-badge {
  display: inline-flex;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shell {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 24px;
  padding: 0 48px 40px;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-header h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  margin-bottom: 6px;
}

.panel-subtitle {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.video-card {
  position: relative;
  border-radius: 22px;
  background: rgba(10, 18, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  min-height: 240px;
}

.video-card.local {
  min-height: 180px;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 14px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--ming), var(--ming-dark));
  color: var(--white);
  box-shadow: 0 8px 18px rgba(26, 78, 90, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.btn.danger {
  background: rgba(241, 60, 60, 0.2);
  border-color: rgba(241, 60, 60, 0.4);
  color: #ffd4d4;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.7);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4b5563;
  box-shadow: 0 0 10px rgba(75, 85, 99, 0.6);
}

.panel-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-section {
  background: var(--glass-strong);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-section h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  margin-bottom: 10px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
}

.field input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--white);
  font-size: 14px;
}

.field input:focus {
  outline: none;
  border-color: rgba(241, 154, 62, 0.7);
  box-shadow: 0 0 0 3px rgba(241, 154, 62, 0.2);
}

.muted {
  color: rgba(255, 255, 255, 0.6);
}

.helper {
  margin-top: 10px;
  font-size: 13px;
  color: var(--orange);
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.chat-body {
  flex: 1;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message {
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 13px;
}

.chat-message.self {
  align-self: flex-end;
  background: rgba(70, 112, 130, 0.35);
}

.chat-message.remote {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
  }
  .shell {
    padding: 0 24px 32px;
  }
}
