:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --ink: #fff8ea;
  --muted: #cbb89c;
  --gold: #ffc93d;
  --panel: rgba(39, 19, 5, .94);
  --panel-soft: rgba(86, 44, 9, .58);
  --line: rgba(255, 202, 83, .28);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #281001;
}

button,
a {
  font: inherit;
}

.video-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 177, 38, .22), transparent 32%),
    radial-gradient(circle at 85% 82%, rgba(193, 73, 4, .3), transparent 38%),
    linear-gradient(145deg, #1a0900 0, #4a2104 48%, #160700 100%);
}

.video-background::before,
.video-background::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 198, 75, .14);
  border-radius: 50%;
}

.video-background::before {
  width: 520px;
  height: 520px;
  top: -280px;
  left: -180px;
}

.video-background::after {
  width: 680px;
  height: 680px;
  right: -380px;
  bottom: -420px;
}

.video-topbar {
  width: min(1120px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  align-items: center;
}

.video-back,
.video-home {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.video-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.video-back span {
  font-size: 30px;
  line-height: 1;
}

.video-home {
  justify-self: end;
  color: var(--gold);
}

.video-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.video-brand img {
  width: 80px;
  height: 48px;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(1, 24, 50, .8);
}

.video-brand div {
  display: grid;
  gap: 2px;
}

.video-brand strong {
  font-size: 20px;
}

.video-brand span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

.video-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 44px;
}

.video-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

.video-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.video-heading p {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 3px;
}

.video-heading h1 {
  margin: 0;
  font-size: 28px;
}

.video-live-badge {
  padding: 8px 13px;
  border: 1px solid rgba(255, 201, 61, .38);
  border-radius: 999px;
  color: var(--gold);
  font-size: 13px;
  background: rgba(255, 201, 61, .08);
}

.video-live-badge.is-live {
  border-color: rgba(55, 221, 151, .5);
  color: #5df0ad;
  background: rgba(55, 221, 151, .1);
}

.video-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, .2);
}

.video-tabs button {
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.video-tabs button:hover,
.video-tabs button:focus-visible {
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, .07);
}

.video-tabs button[aria-selected="true"] {
  color: #241002;
  background: linear-gradient(135deg, #ffe27a, #ffae28);
  box-shadow: 0 8px 20px rgba(226, 130, 16, .25);
}

.video-stage {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 218, 132, .24);
  border-radius: 16px;
  background: #050403;
}

#lotteryVideoFrame {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050403;
}

.video-status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(5, 4, 3, .88);
}

.video-status[hidden] {
  display: none;
}

.video-status strong {
  margin-top: 14px;
  font-size: 20px;
}

.video-status p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.video-source-open {
  margin-top: 16px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 205, 93, .5);
  border-radius: 9px;
  color: #ffe3a0;
  text-decoration: none;
  background: rgba(121, 67, 6, .42);
}

.video-source-open:hover,
.video-source-open:focus-visible {
  border-color: #ffd873;
  color: #fff4d0;
}

.video-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: video-spin .8s linear infinite;
}

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

.video-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.video-meta div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.video-meta span,
.video-meta strong {
  display: block;
}

.video-meta span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.video-meta strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-notice {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .video-topbar {
    width: calc(100% - 20px);
    height: 60px;
    grid-template-columns: 68px 1fr 68px;
  }

  .video-back,
  .video-home {
    font-size: 12px;
  }

  .video-back span {
    font-size: 24px;
  }

  .video-brand {
    gap: 7px;
  }

  .video-brand img {
    width: 54px;
    height: 34px;
  }

  .video-brand strong {
    font-size: 15px;
  }

  .video-brand span {
    display: none;
  }

  .video-shell {
    width: calc(100% - 16px);
    padding: 5px 0 22px;
  }

  .video-card {
    padding: 10px;
    border-radius: 16px;
  }

  .video-heading {
    margin-bottom: 10px;
  }

  .video-heading p {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .video-heading h1 {
    font-size: 20px;
  }

  .video-live-badge {
    padding: 6px 9px;
    font-size: 10px;
  }

  .video-tabs {
    gap: 5px;
    margin-bottom: 8px;
    padding: 4px;
    border-radius: 11px;
  }

  .video-tabs button {
    min-height: 38px;
    border-radius: 8px;
    font-size: 13px;
  }

  .video-stage {
    border-radius: 10px;
  }

  .video-status {
    padding: 12px;
  }

  .video-status strong {
    margin-top: 9px;
    font-size: 14px;
  }

  .video-status p {
    margin-top: 4px;
    font-size: 11px;
  }

  .video-source-open {
    margin-top: 10px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .video-spinner {
    width: 26px;
    height: 26px;
  }

  .video-meta {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 9px;
  }

  .video-meta div {
    padding: 10px 12px;
  }

  .video-meta span {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .video-meta strong {
    font-size: 12px;
  }

  .video-notice {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-spinner {
    animation: none;
  }
}
