:root {
  color-scheme: dark;
  --bg: #0b1112;
  --panel: #121d1f;
  --panel-soft: #19282b;
  --text: #eefafa;
  --muted: #8da2a4;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #28c2d1;
  --danger: #ff6b72;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #173034, #0b1112 58%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.mentor-shell {
  width: min(1520px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar,
.session-panel,
.workspace,
.tools,
.side-panel {
  border: 1px solid var(--line);
  background: rgba(18, 29, 31, 0.82);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 16px;
  padding: 22px 26px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 16px;
  margin-top: 22px;
}

.connection-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  color: var(--muted);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #68797b;
}

.status-dot.is-online {
  background: #39db73;
  box-shadow: 0 0 24px rgba(57, 219, 115, 0.8);
}

.session-panel {
  display: grid;
  grid-template-columns:
    minmax(240px, 1.15fr)
    minmax(150px, 0.65fr)
    minmax(150px, 0.65fr)
    minmax(210px, 0.9fr)
    minmax(210px, 0.9fr)
    150px;
  gap: 14px;
  margin-top: 18px;
  border-radius: 16px;
  padding: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
}

button {
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  min-height: 42px;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: rgba(255, 255, 255, 0.16);
}

#connectButton,
#connectVideoButton,
.tool.is-active {
  background: var(--accent);
  color: #062124;
}

#connectVideoButton.is-connected {
  background: rgba(57, 219, 115, 0.9);
  color: #062414;
}

.workspace {
  display: grid;
  grid-template-columns: 170px minmax(620px, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
}

.tools,
.side-panel {
  border-radius: 16px;
  padding: 16px;
}

.tools {
  display: grid;
  align-content: start;
  gap: 12px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.color-row input {
  height: 42px;
  padding: 4px;
}

.danger {
  color: #36090c;
  background: #ffb8bd;
}

.video-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(40, 194, 209, 0.42);
  background: #030606;
}

.video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
  background: #030606;
}

.video-preview.is-visible {
  display: block;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(40, 194, 209, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 194, 209, 0.12) 1px, transparent 1px),
    radial-gradient(circle at center, #17282b, #030606 68%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
}

.video-placeholder.is-hidden {
  display: none;
}

.video-placeholder div {
  text-align: center;
  color: var(--muted);
}

.video-placeholder p {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
}

#annotationCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.side-panel {
  color: var(--muted);
}

dl {
  margin: 12px 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

dt {
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--text);
  font-weight: 900;
}

dd.is-warning {
  color: var(--danger);
}

.receiver-warning {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(255, 107, 114, 0.35);
  border-radius: 10px;
  background: rgba(255, 107, 114, 0.12);
  color: #ffb8bd;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
}

.receiver-warning.is-visible {
  display: block;
}

.participant-list,
.event-log {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.participant-list li,
.event-log li {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 13px;
}

.event-log {
  max-height: 260px;
  overflow: auto;
}

@media (max-width: 1100px) {
  .session-panel,
  .workspace {
    grid-template-columns: 1fr;
  }

  .video-stage {
    min-height: 520px;
  }
}
