:root {
  --background-color: #ffffff;
  --secondary-color: #efefef;
  --text: #4b4b4b;
  --text-alt: #BBB;
  --darken-rgba: rgba(0,0,0,0.05);
  --accent: #3b82f6;
  --danger: #ef4444;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #121212;
    --secondary-color: #232323;
    --text: #ffffff;
    --text-alt: #787878;
    --darken-rgba: rgba(255,255,255,.03);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--background-color);
  font-family: "Fira Sans", "Cantarell", sans-serif;
  color: var(--text);
  line-height: 1.5;
  display: grid;
  place-items: center; /* Shorthand for align-items and justify-items */
  height: 100dvh;
}

h1 { font-size: 2.2em; margin-top: 0; font-weight: 400; }
h2 { font-weight: 200; font-size: 1.5em; margin-top: 0; }

a { text-decoration: none; font-weight: 600; color: var(--text); }

.wrap { max-width: 520px; margin: auto;  }
.card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid var(--secondary-color);
  text-align: center;
}

button, input, select { font: inherit; }
button {
  background: rgba(59, 152, 197, 0.05);
  color: var(--text);
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 400;
  transition: background-color 0.2s;
  font-weight: bold;
}
button:hover { background: rgba(0, 4, 253, 1); color: white;}
button.secondary { /*! background: var(--secondary-color); */ }
button.danger { background: var(--danger); color: #fff; border: none; }
button:disabled { opacity: .5; cursor: default; }

input, select {
  background: var(--background-color);
  color: var(--text);
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
  padding: 9px 12px;
  width: 61%;
}

label { font-size: .85rem; color: var(--text-alt); display: block; margin-bottom: 4px; }
.row { display: flex; gap: 10px; }
.muted { color: var(--text-alt); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9rem; }
td, th { padding: 8px; border: solid 1px var(--secondary-color); text-align: left; }
.status-msg { margin-top: 14px; font-size: .95rem; }






body { overflow: hidden; height: 100vh; width: 100vw; background-color: #000; }
.room-container { position: relative; width: 100vw; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }

/* Remote Video fills entire screen */
#remoteVideo {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Local Video Container: Small, Movable & Resizable Floating Box */
#localVideoBox {
  position: absolute;
  top: 20px; right: 20px;
  width: 200px; height: 150px;
  min-width: 120px; min-height: 90px;
  max-width: 50vw; max-height: 50vh;
  resize: both;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 10;
  cursor: move;
  background-color: var(--secondary-color);
}
#localVideo { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Bottom Floating Control Bar */
.controls-bar {
  position: absolute;
  bottom: 20px; /*! left: 20px; */ right: 20px;
  height: 50px;
  background: color-mix(in srgb, var(--secondary-color) 70%, transparent);
  backdrop-filter: blur(40px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-radius: 10px;
}

.controls { display: flex; gap: 15px; margin-left: 20px;}
.controls button {
  font-size: 1.4em;
  padding: 2px;
  border-radius: 10px;
  background: var(--darken-rgba);
  border: 1px solid var(--secondary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.controls button:hover { transform: scale(1.05); }

/* Chat Container Toggle Overlay */
.chat-toggle-btn { background: var(--darken-rgba); border: 1px solid var(--secondary-color); border-radius: 360px; font-size: 1.3em; cursor: pointer; padding: 8px 12px; }
#chatDrawer {
  position: absolute;
  right: 20px; bottom: 90px;
  width: 320px; max-height: 400px;
  background-color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  backdrop-filter: blur(40px);
  z-index: 25;
  display: none;
  flex-direction: column;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
#chatDrawer.open { display: flex; }
.chat-log { flex: 1; overflow-y: auto; font-size: 0.9rem; margin-bottom: 8px; max-height: 300px; padding: 5px; }
.chat-log div { margin-bottom: 6px; word-wrap: break-word; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { margin-bottom: 0; }

