:root {
  --bg: #0b0d10;
  --fg: #e8eef5;
  --muted: #9fb3c8;
  --ok: #19c37d;
  --warn: #ffc24a;
  --err: #ff6166;
  --card: #12151a;
  --border: #232a33;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono",
    "Courier New", monospace;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 10% 10%, #0f1321, #0b0d10 50%) fixed;
  color: var(--fg);
}

.container {
  max-width: 760px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

h1 {
  font-size: 20px;
  margin: 0;
}

.status {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #000;
  box-shadow: 0 0 0 1px #000 inset;
}

.status-loading {
  background: var(--warn);
}

.status-ready {
  background: var(--ok);
}

.status-error {
  background: var(--err);
}

.status-line {
  margin-top: 8px;
  color: var(--muted);
}

.lesson {
  margin-top: 16px;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.lesson-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cfe4ff;
}

.lesson-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 13px;
  color: #c3d2e1;
}

.lesson-row span {
  color: var(--muted);
  font-family: inherit;
}

.console {
  margin-top: 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

#log {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.35;
  color: #d3e0ee;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.error {
  margin-top: 16px;
  background: rgba(255, 97, 102, 0.1);
  color: #ffd3d5;
  border: 1px solid rgba(255, 97, 102, 0.35);
  padding: 10px 12px;
  border-radius: 10px;
}

details > summary {
  cursor: pointer;
  color: #b7cdf0;
}

/* Video element styles - Full screen avatar */
#avatarVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
  visibility: visible;
  object-fit: cover;
  background: #000;
}

.video-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: #000;
}

/* Full-screen avatar mode */
.container {
  /* Keep container but make avatar full-screen */
}

/* Hide UI elements for full-screen avatar by default */
header, 
.card:not(#logsSection):not(.avatar-card),
.row {
  display: none !important;
}

/* Show avatar card */
.avatar-card {
  display: block !important;
}

.avatar-card h3 {
  display: none !important;
}

#logsSection {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  color: white;
}

#err {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 1001;
  background: rgba(255, 97, 102, 0.9);
}
