.welcome-line {
  font-size: 0.8125rem;
  color: var(--text-secondary, #94a3b8);
  margin-top: 0.15rem;
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stream-desc {
  font-size: 0.8125rem;
  margin-top: 0.2rem;
  padding-left: 2.75rem;
  max-width: 480px;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Stream selection grid — fluid columns per breakpoint */
.stream-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .stream-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .stream-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (min-width: 1440px) {
  .stream-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (min-width: 1920px) {
  .stream-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
  }
}

.stream-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--card-border, rgba(148, 163, 184, 0.14));
  background: var(--meeting-bg, rgba(15, 23, 42, 0.65));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.stream-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.1);
}

.stream-card-thumb {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stream-card-thumb--fallback {
  min-height: 120px;
}

.stream-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.stream-card:hover .stream-card-image {
  transform: scale(1.05);
}

.stream-card-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.45) 100%);
}

.stream-card-thumb i.play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  transition: transform 0.2s, background 0.2s;
}

.stream-card:hover .play-icon {
  transform: scale(1.08);
  background: rgba(99, 102, 241, 0.6);
}

.stream-card-body {
  padding: 1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stream-card h3 {
  margin: 0 0 0.35rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.stream-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.45;
  flex: 1;
}

.stream-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fca5a5;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 1.5s infinite;
}

.watch-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stream-card:hover .watch-cta { color: #a5b4fc; }

/* SkyLive brand logo */
.login-logo {
  display: block;
  width: min(220px, 70vw);
  height: auto;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.header-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(200px, 55vw);
  object-fit: contain;
}

body .login-brand-icon {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

body .btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

/* Mobile header */
@media (max-width: 479px) {
  .welcome-line,
  .stream-desc {
    padding-left: 0;
    font-size: 0.75rem;
  }

  .header-logo {
    height: 36px;
  }

  .login-logo {
    width: min(180px, 72vw);
  }

  .header-content > div:first-child {
    flex: 1;
    min-width: 0;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .header-actions .btn,
  .header-actions a.btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }

  #logout-btn {
    width: 100%;
    min-height: 44px;
  }

  .header-content:has(#logout-btn:only-of-type) #logout-btn {
    width: auto;
    flex: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .stream-card-thumb { height: 130px; }
}

/* Watch page — full viewport width like Air student/teacher meeting */
body.watch-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

body.watch-page .watch-top-bar {
  flex-shrink: 0;
  width: 100%;
  border-radius: 0;
  border-left: none;
  border-right: none;
  margin: 0;
  z-index: 30;
}

body.watch-page .watch-top-bar .header-content {
  max-width: none;
  width: 100%;
  padding: 0.65rem 0.85rem;
  gap: 0.75rem;
}

body.watch-page .watch-title-block {
  min-width: 0;
  flex: 1;
}

body.watch-page .stream-desc {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.watch-page .watch-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

body.watch-page .watch-status {
  margin: 1rem;
  flex-shrink: 0;
}

body.watch-page .watch-player.video-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

body.watch-page .zoom-root {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  background: #000;
}

body.watch-page .zoom-root > div,
body.watch-page .zoom-root iframe {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}

body.watch-page #live-video {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  background: #000;
}

.zoom-root {
  width: 100%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.zoom-root.hidden,
#live-video.hidden {
  display: none;
}

.video-wrap {
  position: relative;
}

.player-controls {
  position: absolute;
  right: 0.85rem;
  bottom: 4.5rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.player-ctrl-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.2s;
}

.player-ctrl-btn:hover {
  background: rgba(99, 102, 241, 0.92);
  transform: scale(1.04);
}

.player-ctrl-btn.active {
  background: rgba(34, 197, 94, 0.92);
}

.player-ctrl-btn.danger {
  color: #fecaca;
}

.player-ctrl-btn.danger:hover {
  background: rgba(220, 38, 38, 0.92);
}

@media (max-width: 767px) {
  .player-controls {
    right: 0.55rem;
    bottom: 3.5rem;
  }

  .player-ctrl-btn {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  body:not(.watch-page) .zoom-root {
    min-height: 240px;
  }

  body.watch-page .player-controls {
    bottom: 1.25rem;
  }
}
