.demo-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: #965c24;
  background: #fff7e7;
  border: 1px solid #efd9ad;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
}

.demo-video-badge i {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201, 37, 45, .1);
}

.demo-video-badge.official {
  color: #245e48;
  background: #edf8f2;
  border-color: #cce8da;
}

.demo-video-badge.official i {
  background: #2b9167;
  box-shadow: 0 0 0 4px rgba(43, 145, 103, .11);
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 18px;
}

.live-player-card {
  overflow: hidden;
  color: #fff;
  background: #071b2e;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(8, 31, 53, .2);
}

.live-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #061f38;
}

.live-screen canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.official-live-video {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02090f;
}

.official-live-loading {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: rgba(4, 20, 35, .52);
  backdrop-filter: blur(2px);
}

.official-live-loading strong { font-size: 14px; }
#official-loading-description { color: #c3d6e2; font-size: 9px; }

.official-live-loading.is-schedule {
  background: #02080f;
  backdrop-filter: none;
}

.official-live-loading.is-schedule .official-live-spinner,
.official-live-loading.is-schedule #official-loading-description { display: none; }

.official-live-loading.is-schedule strong {
  max-width: 82%;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
}

.official-live-loading.is-schedule b {
  color: #d7272d;
  font-weight: 700;
}

.official-live-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-top-color: #f0c777;
  border-radius: 50%;
  animation: official-live-spin .8s linear infinite;
}

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

.sim-watermark {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 15px;
  padding: 5px 8px;
  color: #ffe8af;
  background: rgba(4, 18, 31, .58);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
  backdrop-filter: blur(5px);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(4, 20, 35, .5);
  backdrop-filter: blur(2px);
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 6;
}

.video-overlay.hidden {
  visibility: hidden;
  opacity: 0;
}

.play-start {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  box-shadow: 0 14px 36px rgba(201, 37, 45, .35);
}

.play-start svg {
  width: 25px;
  margin-left: 4px;
}

.video-overlay strong {
  margin-top: 7px;
  font-size: 15px;
}

.video-overlay > span {
  color: #c1d3df;
  font-size: 9px;
}

.player-controls {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  background: #0a2238;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.player-button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 8px;
}

.player-button.secondary {
  color: #a7bdcc;
  background: rgba(255, 255, 255, .08);
}

.player-button.voice-active {
  color: #f0ca7d;
  background: rgba(228, 180, 94, .13);
}

.player-button.muted {
  color: #718797;
  background: rgba(255, 255, 255, .05);
}

.player-button svg { width: 14px; }

.video-progress {
  flex: 1;
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, .13);
  border-radius: 99px;
}

.video-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #d23d44, #e6b45d);
  border-radius: inherit;
}

.video-time {
  color: #91a8b9;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.video-status {
  min-width: 62px;
  color: #e8c277;
  font-size: 8px;
  font-weight: 700;
  text-align: right;
}

[hidden] { display: none !important; }

.live-info-stack {
  display: grid;
  gap: 14px;
}

.live-info-card .panel-head {
  align-items: flex-start;
  min-height: 0;
  padding: 20px 26px 17px;
}

.live-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #39785d;
  font-size: 8px;
  font-weight: 700;
}

.live-state i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.live-state.pending,
.live-state.paused { color: #8e6b2e; }
.live-state.revealing { color: var(--red); }

.live-info-body {
  padding: 22px 26px 24px;
}

.live-draw-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.live-lottery-name {
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
}

.live-draw-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.live-draw-title > span {
  font-family: "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
  font-weight: 650;
}

.live-draw-title > strong {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: .01em;
}

.live-result-state {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  color: #39785d;
  background: #edf8f2;
  border: 1px solid #d8ecdf;
  border-radius: 7px;
  font-size: 7px;
  font-weight: 700;
}

.live-result-state i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.live-result-state.pending {
  color: #8e6b2e;
  background: #fff7e7;
  border-color: #efd9ad;
}

.live-result-state.revealing {
  color: var(--red);
  background: #fbeaea;
  border-color: #f1cfd1;
}

.live-result-state.paused {
  color: #8e6b2e;
  background: #fff7e7;
  border-color: #efd9ad;
}

.live-result-panel {
  margin-top: 16px;
  padding: 14px;
  background: #f7fafb;
  border: 1px solid #e7edf1;
  border-radius: 11px;
}

.live-result-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.live-result-label span {
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

.live-result-label small {
  color: #91a0aa;
  font-size: 7px;
}

.live-result-balls {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.live-result-unit {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.live-result-ball {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  box-shadow: inset 2px 2px 5px rgba(255, 255, 255, .2), 0 3px 7px rgba(16, 38, 59, .14);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
}

.live-result-ball.red { background: #c92d35; }
.live-result-ball.blue { background: #207ab2; }
.live-result-ball.green { background: #2c9069; }
.live-result-ball.special { border: 2px solid #e2b65f; }
.live-result-ball.placeholder {
  color: #9aa8b1;
  background: #edf1f4;
  border: 1px dashed #cdd7dd;
  box-shadow: none;
}
.live-result-unit small { color: #8996a0; font-size: 7px; line-height: 1; }

.live-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-top: 1px solid #edf1f3;
}

.live-meta-row:first-of-type { margin-top: 8px; }
.live-meta-row span { color: #8b98a3; font-size: 8px; }
.live-meta-row strong { color: #526574; font-size: 9px; text-align: right; }

.live-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 13px 15px;
  color: #796b55;
  background: #fbf6eb;
  border: 1px solid #eee0c3;
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.7;
}

.live-note svg { width: 15px; flex: none; color: #b18a47; }
.live-note p { margin: 0; }

@media (max-width: 900px) {
  .live-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .demo-video-badge { display: none; }
  .live-layout { gap: 14px; }
  .live-player-card { border-radius: 14px; }
  .player-controls { flex-wrap: wrap; min-height: 62px; padding: 8px 11px; }
  .video-progress { flex-basis: calc(100% - 80px); }
  .video-time { order: 4; }
  .video-status { order: 5; margin-left: auto; }
  .live-info-stack { grid-template-columns: 1fr; }
  .live-info-card .panel-head { padding: 19px 26px 16px; }
  .live-info-body { padding: 20px 26px 24px; }
}
