:root {
  --ink: #1a1b1e;
  --muted: #5b5f6b;
  --accent: #f46b45;
  --accent-2: #f9c74f;
  --accent-3: #277da1;
  --card: #ffffff;
  --surface: #f7f1e8;
  --border: rgba(26, 27, 30, 0.1);
  --shadow: 0 20px 60px rgba(26, 27, 30, 0.12);
  --radius: 20px;
  --max-width: 1160px;
}

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

body {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff4e4 0%, #f6efe4 40%, #eef3f8 100%);
  min-height: 100vh;
  padding: 32px 32px 64px;
}

body.page-shell {
  background: radial-gradient(circle at top left, #fff4e4 0%, #f6efe4 45%, #eef3f8 100%);
}

.glow {
  position: fixed;
  inset: -20% 60% auto -20%;
  height: 60vh;
  background: radial-gradient(circle, rgba(244, 107, 69, 0.25), transparent 70%);
  filter: blur(10px);
  z-index: -1;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(40px, 20px);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto 48px;
  gap: 24px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f8961e);
  box-shadow: var(--shadow);
}

.brand strong {
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav a:hover {
  border-color: var(--border);
  background: #fff;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 3.8vw, 50px);
  line-height: 1.15;
  margin-bottom: 18px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-3);
  margin-bottom: 16px;
}

.lede {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-stats strong {
  display: block;
  font-size: 22px;
}

.hero-stats span {
  font-size: 12px;
  color: var(--muted);
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: rise 0.8s ease;
}

@keyframes rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-header h2 {
  font-family: "Fraunces", serif;
  margin-bottom: 8px;
}

.card-header p {
  color: var(--muted);
  margin-bottom: 18px;
}

.join-form,
.panel-form,
.chat-form,
.question-form {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}

input[type="file"] {
  padding: 10px 14px;
}

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #f8961e);
  color: #fff;
  box-shadow: 0 12px 30px rgba(244, 107, 69, 0.25);
}

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

.btn.ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  color: var(--ink);
}

.card-tip {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.features {
  max-width: var(--max-width);
  margin: 64px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.features article {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.features h3 {
  font-family: "Fraunces", serif;
  margin-bottom: 10px;
}

.features p {
  color: var(--muted);
  font-size: 14px;
}

.cta {
  max-width: var(--max-width);
  margin: 64px auto 0;
  padding: 28px 32px;
  background: linear-gradient(135deg, #fff4e4, #fff);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.cta h2 {
  font-family: "Fraunces", serif;
  margin-bottom: 8px;
}

.cta p {
  color: var(--muted);
}

.site-footer {
  max-width: var(--max-width);
  margin: 48px auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.dashboard {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel.secondary {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.panel-header h1,
.panel-header h2 {
  font-family: "Fraunces", serif;
  margin-bottom: 8px;
}

.panel-header p {
  color: var(--muted);
  margin-bottom: 16px;
}

.panel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.panel-meta strong {
  display: block;
  font-size: 18px;
}

.panel-meta span {
  font-size: 12px;
  color: var(--muted);
}

.room-list,
.recording-list,
.question-list {
  display: grid;
  gap: 12px;
}

.room-card,
.recording-card,
.question-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.room-card h3,
.recording-card h3,
.question-card h3 {
  font-size: 16px;
}

.room-card span,
.recording-card span,
.question-card span {
  font-size: 12px;
  color: var(--muted);
}

.room-card .actions,
.recording-card .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.classroom {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.stream {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.stream-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.stream-header h1 {
  font-family: "Fraunces", serif;
  margin-bottom: 6px;
}

.status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(244, 107, 69, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.stream-stage {
  display: grid;
  gap: 16px;
}

.stream-surface {
  position: relative;
  border-radius: 20px;
  background: #1c1d26;
  color: #fff;
  height: 360px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.stream-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1c1d26;
}

.screenshare-view {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.stream-surface.is-sharing .screenshare-view {
  display: block;
}

.stream-surface.is-sharing .stream-video {
  display: none;
}

.stream-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #2f2f39, #1c1d26);
}

.stream-placeholder strong {
  font-size: 18px;
  display: block;
  margin-bottom: 6px;
}

.stream-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stream-controls .btn.is-active {
  border-color: rgba(244, 107, 69, 0.5);
  color: var(--accent);
}

.stream-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rtk-audio {
  display: none;
}

.sidebar {
  display: grid;
  gap: 20px;
}

.chat-feed {
  display: grid;
  gap: 12px;
  max-height: 240px;
  overflow: auto;
}

.chat-bubble {
  padding: 12px;
  border-radius: 14px;
  background: rgba(244, 107, 69, 0.08);
  font-size: 14px;
}

.chat-bubble span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.question-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(39, 125, 161, 0.12);
  color: var(--accent-3);
}

.question-card.answered {
  background: rgba(39, 125, 161, 0.08);
}

.question-card button {
  justify-self: start;
}

@media (max-width: 960px) {
  .classroom {
    grid-template-columns: 1fr;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    padding: 24px 20px 48px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }

  .stream-surface {
    height: 260px;
  }
}
