/* ============================================================
   Manotmeet — application components
   Built on the Manotan Terminal design tokens (styles.css).
   Sharp edges, no rounded cards, brand orange accents.
   ============================================================ */

/* ---- Base typography ---------------------------------------------------- */

body {
  line-height: 1.5;
}
h1,
h2,
h3 {
  letter-spacing: -0.01em;
  color: var(--color-text-dark);
}
a {
  color: inherit;
}

/* SVG icons inherit text color + size nicely inside buttons */
svg {
  display: block;
}
[data-icon] {
  display: inline-flex;
}

/* ---- Logo (theme-aware) ------------------------------------------------- */
/* logo.svg is solid white. We render it via mask so we can recolor it for
   light vs dark themes — always visible on any surface. */
.logo {
  display: inline-block;
  height: 22px;
  width: 138px;
  background-color: var(--color-primary);
  -webkit-mask: url("/logo.svg") no-repeat center / contain;
  mask: url("/logo.svg") no-repeat center / contain;
}
.logo.logo-lg {
  height: 40px;
  width: 252px;
}
.logo.on-primary {
  background-color: #ffffff;
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--color-light-border);
  background: var(--color-secondary-bg);
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease,
    color 0.14s ease, transform 0.05s ease;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--color-hover);
  border-color: var(--color-active);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-contrast);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-lg {
  font-size: 1.02rem;
  padding: 0.9rem 1.6rem;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--color-hover);
}

.input {
  width: 100%;
  background: var(--color-input-background);
  border: 1px solid var(--color-input-border);
  color: var(--color-text);
  font-size: 1rem;
  padding: 0.72rem 0.85rem;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.input:focus {
  border-color: var(--color-input-border-hover);
  box-shadow: 0 0 0 3px var(--color-primary-alpha-20);
}

.muted {
  color: var(--color-text-muted);
}

/* ---- Top bar ------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-light-border);
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  border: 1px solid var(--color-light-border);
  background: var(--color-secondary-bg);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  position: relative;
}
.icon-btn:hover {
  background: var(--color-hover);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.icon-btn .badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.icon-btn .badge.show {
  display: inline-flex;
}

/* ============================================================
   Marketing one-pager (/)
   ============================================================ */

.site {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  border-bottom: 1px solid var(--color-light-border);
  background: var(--color-box-body);
}
.hero-inner {
  max-width: 680px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-primary-alpha-40);
  padding: 0.35rem 0.7rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.9rem;
  font-weight: 800;
}
.hero h1 .accent {
  color: var(--color-primary);
}
.hero p.sub {
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  color: var(--color-text-muted);
  margin: 0 auto 1.75rem;
  max-width: 500px;
}
.hero-cta {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}
.powered {
  margin-top: 2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.features {
  padding: 3.5rem 1.5rem;
  background: var(--color-body);
}
.section-head {
  max-width: 1080px;
  margin: 0 auto 2rem;
  text-align: center;
}
.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}
.section-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.features-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-light-border);
  border: 1px solid var(--color-light-border);
}
@media (max-width: 820px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}
.feature {
  background: var(--color-card);
  padding: 1.5rem;
}
.feature .ico {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-alpha-10);
  color: var(--color-primary);
  margin-bottom: 0.85rem;
}
.feature .ico svg {
  width: 20px;
  height: 20px;
}
.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.feature p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.site-footer {
  padding: 1.5rem;
  background: var(--color-footer);
  border-top: 1px solid var(--color-light-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}


/* ============================================================
   App page (/app) — create / join
   ============================================================ */

.landing {
  min-height: calc(100% - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.landing-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-card);
  border: 1px solid var(--color-light-border);
  padding: 1.75rem;
}
.landing-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
}
.landing-card p.lead {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.field-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-light-border);
}
.join-row {
  display: flex;
  gap: 0.6rem;
}
.join-row .input {
  flex: 1;
}

/* Recording disclaimer */
.disclaimer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.75rem 0.9rem;
  background: var(--color-primary-alpha-10);
  border: 1px solid var(--color-primary-alpha-40);
  color: var(--color-text);
  font-size: 0.84rem;
}
.disclaimer svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================================
   Call screen (/room/:id)
   ============================================================ */

.call-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.call-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-light-border);
  padding: 0.4rem 0.7rem;
  font-size: 0.84rem;
}
.status-dot.live {
  background: var(--color-success);
}
.status-dot.connecting {
  background: var(--color-warning);
}
.status-dot.offline {
  background: var(--color-danger);
}

/* Recording indicator */
.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-danger);
  color: #fff;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rec-indicator svg {
  width: 12px;
  height: 12px;
  animation: recpulse 1.4s ease-in-out infinite;
}
@keyframes recpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Main area = stage + sidebar */
.call-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.stage {
  flex: 1;
  padding: 1rem;
  overflow: auto;
  min-width: 0;
}

.video-grid {
  display: grid;
  gap: 0.75rem;
  height: 100%;
  grid-template-columns: 1fr;
  align-content: center;
}
/* Tidy layouts for up to 6 participants.
   1 → full · 2 → side by side · 3–4 → 2×2 · 5–6 → 3×2 */
.video-grid[data-count="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.video-grid[data-count="3"],
.video-grid[data-count="4"] {
  grid-template-columns: repeat(2, 1fr);
}
.video-grid[data-count="5"],
.video-grid[data-count="6"] {
  grid-template-columns: repeat(3, 1fr);
}
/* Tablet: cap at 2 columns so tiles don't get too small. */
@media (max-width: 1024px) {
  .video-grid[data-count="5"],
  .video-grid[data-count="6"] {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Mobile: single column, let it scroll vertically. */
@media (max-width: 720px) {
  .video-grid {
    align-content: start;
  }
  .video-grid[data-count="2"],
  .video-grid[data-count="3"],
  .video-grid[data-count="4"],
  .video-grid[data-count="5"],
  .video-grid[data-count="6"] {
    grid-template-columns: 1fr;
  }
}

.tile {
  position: relative;
  background: #000;
  border: 1px solid var(--color-light-border);
  overflow: hidden;
  min-height: 180px;
  aspect-ratio: 16 / 9;
}
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}
.tile.camera-off video {
  visibility: hidden;
}
.tile .avatar {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary-dark-3);
}
.tile.camera-off .avatar {
  display: flex;
}
.tile .avatar span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-size: 1.9rem;
  font-weight: 800;
  text-transform: uppercase;
}
.tile .label {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 100%;
}
.tile .label .muted-icon {
  display: none;
  color: #ff6b6b;
}
.tile .label .muted-icon svg {
  width: 14px;
  height: 14px;
}
.tile.mic-off .label .muted-icon {
  display: inline-flex;
}

/* Waiting state */
.waiting {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem;
}
.waiting h2 {
  margin: 0;
}

/* ---- Sidebar ------------------------------------------------------------ */

.sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--color-menu);
  border-left: 1px solid var(--color-light-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar[hidden] {
  display: none;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-light-border);
}
.sidebar-header h3 {
  margin: 0;
  font-size: 0.95rem;
}
/* The sidebar is constant on desktop, so its close button only appears on
   mobile, where the sidebar becomes a dismissible overlay. */
#sidebarClose {
  display: none;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-light-border);
}
.tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.tab.active {
  color: var(--color-text-dark);
  border-bottom-color: var(--color-primary);
}
.tab:hover {
  background: var(--color-hover);
}

.panel {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem;
  display: none;
}
.panel.active {
  display: block;
}

/* Activity feed */
.activity-item {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: var(--color-text);
  border-bottom: 1px dashed var(--color-light-border);
}
.activity-item .time {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Chat */
.chat-panel {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.chat-panel.active {
  display: flex;
}
.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.msg {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 90%;
}
.msg.me {
  align-self: flex-end;
  align-items: flex-end;
}
.msg .meta {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.msg .bubble {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-light-border);
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  word-break: break-word;
}
.msg.me .bubble {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-contrast);
}
.chat-empty {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  text-align: center;
  margin-top: 1rem;
}
.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--color-light-border);
}
.chat-input-row .input {
  flex: 1;
}
.chat-input-row .icon-btn {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    z-index: 60;
  }
  /* On mobile the sidebar is an overlay you can dismiss. */
  #sidebarClose {
    display: inline-flex;
  }
}


/* ---- Control bar -------------------------------------------------------- */

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem;
  background: var(--color-nav-bg);
  border-top: 1px solid var(--color-light-border);
}
.ctrl {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-light-border);
  background: var(--color-secondary-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.ctrl svg {
  width: 22px;
  height: 22px;
}
.ctrl:hover {
  background: var(--color-hover);
}
.ctrl.off {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}
.ctrl.active-toggle {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.ctrl.leave {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
  width: auto;
  padding: 0 1.4rem;
  gap: 0.5rem;
  font-weight: 700;
}
.ctrl.leave:hover {
  filter: brightness(1.08);
}
.ctrl.leave[disabled],
.ctrl.leave.is-leaving {
  opacity: 0.75;
  cursor: progress;
}

/* ---- Call screen: mobile / small-screen polish -------------------------- */
@media (max-width: 720px) {
  /* Topbar: let the meta controls wrap instead of overflowing. */
  .topbar {
    flex-wrap: wrap;
    padding: 0.6rem 0.9rem;
    gap: 0.5rem;
  }
  .call-meta {
    gap: 0.4rem;
    width: 100%;
    justify-content: flex-end;
  }
  /* The room id pill + "Copy invite" label eat space on small screens —
     keep them but allow shrinking. */
  .call-meta .pill {
    font-size: 0.76rem;
    padding: 0.3rem 0.55rem;
  }
  #copyLink {
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
  }

  .stage {
    padding: 0.6rem;
  }
  .tile {
    min-height: 150px;
  }

  /* Controls: bigger touch targets, comfortable spacing, safe-area aware. */
  .controls {
    gap: 0.75rem;
    padding: 0.7rem 0.7rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
  }
  .ctrl {
    width: 52px;
    height: 52px;
  }
  .ctrl.leave {
    padding: 0 1.1rem;
  }
  /* Toast sits above the control bar on mobile too. */
  .toast {
    bottom: 88px;
    width: max-content;
    max-width: 90vw;
  }
}

@media (max-width: 380px) {
  /* Ultra-narrow: drop the invite-button text to just the icon. */
  #copyLink span:not([data-icon]) {
    display: none;
  }
  .ctrl.leave .leave-label {
    display: none;
  }
  .ctrl.leave {
    width: 52px;
    padding: 0;
  }
}

/* ---- Toast -------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-box-header);
  border: 1px solid var(--color-light-border);
  color: var(--color-text);
  padding: 0.7rem 1.1rem;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Pre-join overlay --------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}
.overlay-card {
  width: 100%;
  max-width: 460px;
  background: var(--color-card);
  border: 1px solid var(--color-light-border);
  padding: 1.75rem;
}
.overlay-card h2 {
  margin: 0 0 0.35rem;
}
.overlay-card .preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--color-light-border);
  margin: 1rem 0;
  overflow: hidden;
}
.overlay-card .preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* ============================================================
   Auth pages (/login, /register)
   ============================================================ */

.auth-wrap {
  min-height: calc(100% - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-card);
  border: 1px solid var(--color-light-border);
  padding: 1.75rem;
}
.auth-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
}
.auth-card .sub {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.auth-card .field {
  margin-bottom: 1rem;
}
.auth-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  min-height: 1.1em;
  margin: 0.25rem 0 0;
}
.auth-foot {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-light-border);
  font-size: 0.86rem;
  color: var(--color-text-muted);
  text-align: center;
}
.auth-foot a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

/* Nav user chip + dropdown links */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.55rem 0.5rem;
}
.nav-link:hover {
  color: var(--color-primary);
}

/* ============================================================
   Dashboard (/dashboard)
   ============================================================ */

.dash {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.dash-head h1 {
  margin: 0;
  font-size: 1.5rem;
}
.dash-head p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 880px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-light-border);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--color-light-border);
}
.card-head h2 {
  margin: 0;
  font-size: 1rem;
}
.card-body {
  padding: 1.1rem;
}

/* Recordings list */
.rec-list {
  display: flex;
  flex-direction: column;
}
.rec-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-light-border);
}
.rec-row:last-child {
  border-bottom: none;
}
.rec-thumb {
  width: 92px;
  height: 52px;
  flex-shrink: 0;
  background: var(--color-secondary-dark-3);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-light-border);
}
.rec-thumb svg {
  width: 20px;
  height: 20px;
}
.rec-info {
  flex: 1;
  min-width: 0;
}
.rec-info h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-info .meta {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}
.empty-state {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}

/* API key block */
.key-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.key-box .input {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}
.api-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}
.api-hint code {
  background: var(--color-code-bg);
  padding: 0.1rem 0.3rem;
  font-size: 0.78rem;
}

/* Video modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}
.modal.show {
  display: flex;
}
.modal-card {
  width: 100%;
  max-width: 820px;
  background: var(--color-card);
  border: 1px solid var(--color-light-border);
}
.modal-card .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-light-border);
}
.modal-card .modal-head h3 {
  margin: 0;
  font-size: 1rem;
}
.modal-card video {
  width: 100%;
  display: block;
  background: #000;
}


