:root{
  /* Core */
  --bg0:#070A12;
  --bg1:#0A0F1E;
  --panel:#0E152A;
  --panel2:#0B1020;
  --text:#EAF0FF;
  --muted:rgba(234,240,255,0.62);
  --border:rgba(255,255,255,0.10);

  /* Accents */
  --a1:#7C5CFF;
  --a2:#00D4FF;
  --good:#2DE37A;
  --warn:#FFBE63;
  --bad:#FF5B6A;

   --uiScale: 1.14;

  --shadow: 0 12px 32px rgba(0,0,0,0.45);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
    zoom: var(--uiScale);

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 20% -10%, rgba(124,92,255,0.22), transparent 60%),
    radial-gradient(760px 460px at 110% 10%, rgba(0,212,255,0.14), transparent 62%),
    radial-gradient(700px 420px at 30% 115%, rgba(45,227,122,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Wrapper */
.wrap{
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}


/* Header */
.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14,21,42,0.65);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.title::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--a1), var(--a2));
  box-shadow: 0 0 14px rgba(124,92,255,0.5);
}

/* Status pill */
.status{
  font-size: 12px;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

/* Controls panel */
.controls{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14,21,42,0.55);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 12px;
}

.row{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.row + .row{
  margin-top: 10px;
}

.lbl{
  font-size: 12px;
  color: var(--muted);
  min-width: 56px;
}

.hint{
  font-size: 12px;
  color: rgba(234,240,255,0.55);
}
.hint.ok{ color: rgba(45,227,122,0.9); }

/* Tabs */
.tab{
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(234,240,255,0.75);
  cursor:pointer;
  font-size: 12px;
  font-weight: 800;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.tab:hover{
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
}
.tab.active{
  color: var(--text);
  background: linear-gradient(180deg, rgba(124,92,255,0.28), rgba(0,212,255,0.12));
  border-color: rgba(255,255,255,0.18);
}

/* Checkbox */
.chk{
  font-size: 12px;
  color: rgba(234,240,255,0.70);
  display:flex;
  align-items:center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12);
}
.chk input{ accent-color: var(--a1); }

/* Inputs */
.input{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,12,22,0.40);
  color: var(--text);
  font-size: 12px;
  min-width: 240px;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus{
  border-color: rgba(124,92,255,0.45);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.14);
}
.input::placeholder{ color: rgba(234,240,255,0.35); }
.area{
  min-height: 90px;
  width: 100%;
  resize: vertical;
}

/* Buttons */
.btn{
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}
.btn:active{ transform: translateY(0px); }
.btn:disabled{
  opacity: 0.45;
  cursor:not-allowed;
  transform: none;
}

/* Main layout */
.main{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Video column */
.videos{
  display:grid;
  gap: 12px;
}

/* Video box */
.videoBox{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.30);
  height: 300px;
  box-shadow: var(--shadow);


}

video{
  width:100%;
  height:100%;
  object-fit: cover;
  background: #03050B;
}

.cap{
  font-size: 12px;
  color: rgba(234,240,255,0.72);
  font-weight: 900;
}

.videoBox .cap{
  position:absolute;
  top: 10px;
  left: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

/* Chat */
.chat{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14,21,42,0.55);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);

  display:grid;
  grid-template-rows: auto 1fr auto;

  height: 620px;        /* ✅ real height so 1fr behaves like 1fr */
  overflow:hidden;
}


.chatTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.10);
}

.typing{
  font-size: 12px;
  color: rgba(234,240,255,0.55);
  min-height: 14px;
}

.messages{
  padding: 12px;
  overflow:auto;
  min-height: 0;        /* ✅ critical in grid/flex for scroll to work */
}


/* Pretty scrollbar */
.messages::-webkit-scrollbar{ width: 10px; }
.messages::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
.messages::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.16); }

.msg{ margin: 0 0 12px 0; }
.msg .who{
  font-size: 12px;
  color: rgba(234,240,255,0.55);
}

.msg .bubble{
  display:inline-block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  font-size: 13px;
  line-height: 1.28;
  max-width: 95%;
  white-space: pre-wrap;
}

.msg.me .bubble{
  background: rgba(124,92,255,0.16);
  border-color: rgba(124,92,255,0.24);
}

.chatForm{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.10);
}

/* Modal */
.modalBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.65);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 16px;
  z-index: 50;
}

.modal{
  width: min(520px, 95vw);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(14,21,42,0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  padding: 12px;
}

.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 10px;
}

.modalBody{
  display:grid;
  gap: 10px;
}

.right{ justify-content:flex-end; }

.hidden{ display:none !important; }

@media (max-width: 900px){
  .main{ grid-template-columns: 1fr; }
  .chat{ height: 520px; }
  .videoBox{ height: 240px; }
  .input{ min-width: 180px; }
}

