/* AppendHub Live follows AppendHub Learn's shared purple and hand-drawn visual style. */
.live-page {
  min-height: 100vh;
  background: #8768ad;
  color: #fff;
}

.live-page .live-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 24px);
  width: 100%;
  min-height: 64px;
  padding: 10px clamp(14px, 4vw, 44px);
  flex: 0 0 auto;
  background: #ffffff;
  color: #29213d;
  box-shadow: 0 2px 12px rgb(35 16 61 / 15%);
}

.live-page .live-header h1 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  line-height: 1.25;
}

.live-page .live-header .Home { flex: 0 0 auto; }
.live-page .live-header .Home a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font: 600 14px Arial, sans-serif;
}
.live-page .live-header .Home a:hover,
.live-page .live-header .Home a:focus-visible,
.live-page .live-header-actions a:hover,
.live-page .live-header-actions a:focus-visible,
.live-page .live-header-actions button:hover,
.live-page .live-header-actions button:focus-visible {
  background: rgb(103 56 160 / 10%);
}
.live-page .live-header .Home a:focus-visible,
.live-page .live-header-actions a:focus-visible,
.live-page .live-header-actions button:focus-visible {
  outline: 2px solid #6738a0;
  outline-offset: 2px;
}
.live-home-label { white-space: nowrap; }
.live-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:0 0 auto; }
.live-header-actions .lang-btn { display:inline-flex; align-items:center; justify-content:center; min-width:40px; min-height:40px; padding:8px; border:0; border-radius:8px; background:transparent; color:inherit; cursor:pointer; }
.live-header-actions .lang-menu { right:0; left:auto; }
html[dir="rtl"] .live-header-actions .lang-menu { right:auto; left:0; }
.live-page .live-header .mode-switch { color:inherit; }

.live-page .live-intro {
  flex: 0 0 auto;
  max-width: 960px;
  margin: 34px auto 20px;
  padding: 0 20px;
  color: #fff;
  text-align: center;
  line-height: 1.55;
}

.live-intro h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
}

.live-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
}

.live-intro p { margin: 0; font-size: 1.05rem; }

.live-container {
  flex: 1 0 auto;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto 38px;
}

.live-container > h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.live-container > p {
  margin: 4px 0 18px;
  color: rgba(255, 255, 255, .9);
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, .85fr);
  gap: 20px;
  align-items: start;
}

.live-panel {
  overflow: hidden;
  border: 1px solid #000;
  border-radius: 22px;
  background: #fff;
  color: #29213d;
  box-shadow: 0 6px 16px rgba(42, 24, 65, .18);
}

.live-player-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #171325;
}

.live-video { width: 100%; height: 100%; }
.live-video { display: block; object-fit: contain; }

.live-player-message {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(23, 19, 37, .88);
  color: #fff;
  text-align: center;
}

.live-player-message[hidden] { display: none; }
.live-player-message p { margin: 0; }
.live-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: live-spin .8s linear infinite;
}

@keyframes live-spin { to { transform: rotate(360deg); } }

.live-offline-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #171325;
  color: #fff;
  text-align: center;
}

.live-offline-screen[hidden] { display: none; }
.live-offline-screen { z-index: 3; }
.live-offline-screen h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); }
.live-offline-screen p { margin: 5px 0; }

.live-panel-content { padding: 20px; }
.live-panel-content h2, .live-panel-content h3 { margin: 12px 0 6px; }
.live-panel-content p { margin: 7px 0; line-height: 1.5; }

.live-status {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: #ebe6f5;
  color: #5b4484;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
}

.live-status.active { background: #d91535; color: #fff; }

.live-retry-button {
  margin-top: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 4px;
  background: #7a0fc2;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}

.live-audio-button { min-height: 44px; touch-action: manipulation; }

.live-retry-button:hover, .live-retry-button:focus-visible { background: #5e4f73; }
.live-sidebar { display: grid; gap: 18px; }

.live-slide-preview {
  padding: 18px 14px;
  border: 2px dashed #99689d;
  border-radius: 6px;
  background: #f5effa;
  color: #4a3260;
  text-align: center;
}

.live-slide-preview h3 { margin-top: 0; }

.live-page footer {
  flex: 0 0 auto;
  padding: 16px 20px;
  background: #99689d;
  color: #fff;
  text-align: center;
}

.live-page footer p { margin: 0; }

@media (max-width: 760px) {
  .live-page .live-header { gap:6px; min-height:58px; padding:8px 12px; }
  .live-page .live-header .Home a { gap:5px; padding:6px; }
  .live-page .live-header h1 { font-size:1rem; }
  .live-home-label { display:none; }
  .live-header-actions { gap:2px; }
  .live-header-actions .mode-switch { gap:5px; font-size:12px; }
  .live-header-actions .mode-switch-track { width:32px; height:19px; }
  .live-header-actions .mode-switch-track i { width:13px; height:13px; }
  .live-layout { grid-template-columns: 1fr; }
  .live-container { width: min(100% - 24px, 640px); }
  .live-intro { margin-top: 25px; }
}

@media (max-width: 420px) {
  .live-page .live-header { padding-inline:8px; }
  .live-page .live-header .Home a { min-width:34px; justify-content:center; }
  .live-page .live-header h1 { font-size:.92rem; }
  .live-header-actions .mode-switch { font-size:11px; }
  .live-panel-content { padding: 16px; }
}
