:root {
  --border: #dedede;
  --blue: #00a0e9;
  --nav: #00c7f7;
  --active: #337ab7;
  --red: #ff0000;
  --ink: #333;
}

@font-face {
  font-family: "DS-Digital";
  src: url("assets/fonts/DS-DIGI.woff") format("woff"),
       url("assets/fonts/DS-DIGI.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DS-Digital";
  src: url("assets/fonts/DS-DIGIB.woff") format("woff"),
       url("assets/fonts/DS-DIGIB.TTF") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f2f2f2;
  color: var(--ink);
  font: 14px/1.55 "Microsoft YaHei", Arial, sans-serif;
}

.shell {
  width: min(1170px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0 24px;
  background: #fff;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 20px;
  padding: 15px;
  border: 1px solid var(--border);
  background: #f6f5f5;
}

.summary-card {
  min-height: 68px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest {
  gap: 15px;
}

.latest p {
  margin: 0;
  font-size: 16px;
}

.latest strong {
  color: #e60012;
  padding: 0 2px;
}

.brand-mark,
.brand-badge {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.countdown {
  gap: 10px;
  font-size: 16px;
}

.countdown strong {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font: 36px/1 Tahoma, sans-serif;
  background: #f13f4c;
  border-radius: 2px;
  box-shadow: inset 0 -12px 0 rgba(255,255,255,.08);
}

.result {
  gap: 10px;
  padding: 0 10px;
}

.result-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 50px;
  padding-right: 10px;
  border-right: 1px solid #e8e8e8;
}

.result-main span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--red);
  border-radius: 2px;
  font-size: 18px;
  font-style: normal;
}

.result-main .sum {
  background: #556fb5;
}

.result-main em {
  font-style: normal;
}

.result-tags {
  display: flex;
  gap: 8px;
}

.result-tags b {
  min-width: 34px;
  padding: 7px;
  border-radius: 14px;
  text-align: center;
  color: #fff;
  background: var(--blue);
}

.waiting {
  color: #8d8d8d;
  font-size: 16px;
}

.panel {
  border: 1px solid #e8e8e8;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 10px 15px;
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
}

.tab {
  min-height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nav);
  color: #fff;
  background: var(--nav);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 31px;
  text-decoration: none;
}

.tab.is-active {
  background: var(--active);
  border-color: var(--active);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.video-wrap {
  overflow: hidden;
  background: #fff;
}

.content {
  width: 1125px;
  height: 780px;
  transform-origin: top left;
  margin: 0 auto;
}

.content *,
.content *::before,
.content *::after {
  list-style: none;
}

.content .kuai3Animate {
  position: relative;
  width: 100%;
  height: auto;
  color: #fff;
  background: #000;
}

.content .kuai3Animate .bodybg {
  width: 100%;
  height: auto;
  background: #000;
}

.content .kuai3Animate .bodybg img {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: top;
  opacity: .62;
  animation: breathe 1.6s linear infinite alternate;
}

.content .kuai3Animate .animate_content {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.content .kuai3Animate .position {
  position: absolute;
  top: 18px;
  left: 317px;
  width: 490px;
  height: 64px;
  color: #fff;
}

.content .kuai3Animate .position .middle_div {
  position: relative;
  height: 48px;
  margin-top: 16px;
}

.content .kuai3Animate .position .middle_div .benqi {
  position: absolute;
  display: inline-block;
  height: 20px;
  line-height: 20px;
  top: -28px;
  left: 210px;
  color: #fff;
  font-size: 16px;
}

.content .kuai3Animate .position .middle_div ul {
  width: 380px;
  height: 39px;
  line-height: 39px;
  margin: 0;
  padding-left: 40px;
}

.content .kuai3Animate .position .middle_div ul li {
  float: left;
  font-size: 36px;
  font-weight: 800;
  color: #fff000;
}

.content .kuai3Animate .position .middle_div ul .hmlist {
  margin-right: 75px;
}

.content .kuai3Animate .position .middle_div ul .noright {
  margin-right: 0;
}

.content .kuai3Animate .position .middle_div ul .bigOsmall {
  position: absolute;
  margin-left: 360px;
}

.content .kuai3Animate .position .middle_div ul .danOsmall {
  position: absolute;
  margin-left: 405px;
}

.content .kuai3Animate .position .middle_div .addIcon1,
.content .kuai3Animate .position .middle_div .addIcon2,
.content .kuai3Animate .position .middle_div .equalIcon {
  display: inline-block;
  position: absolute;
  width: 24px;
}

.content .kuai3Animate .position .middle_div .addIcon1,
.content .kuai3Animate .position .middle_div .addIcon2 {
  height: 24px;
  top: 8px;
  background: url("assets/num/k3v.png") no-repeat -178px -639px;
}

.content .kuai3Animate .position .middle_div .addIcon1 {
  left: 87px;
}

.content .kuai3Animate .position .middle_div .addIcon2 {
  left: 185px;
}

.content .kuai3Animate .position .middle_div .equalIcon {
  height: 16px;
  top: 14px;
  left: 283px;
  background: url("assets/num/k3v.png") no-repeat -178px -692px;
}

.content .kuai3Animate .currentDraw {
  position: absolute;
  left: 835px;
  top: 10px;
  white-space: nowrap;
  width: 265px;
  height: 65px;
}

.content .kuai3Animate .currentDraw .dl {
  width: 150px;
  float: left;
  margin-top: 11px;
  color: #fff;
  font-size: 16px;
  text-align: left;
}

.content .kuai3Animate .currentDraw .dl .nextDraw {
  display: block;
  width: 150px;
  margin-bottom: 5px;
}

.content .kuai3Animate .currentDraw .dl .kai {
  width: 150px;
}

.content .kuai3Animate .currentDraw .dl .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #38a3d7;
  margin-right: 5px;
}

.content .kuai3Animate .currentDraw .dr {
  float: right;
  width: 50px;
  height: 100%;
}

.content .kuai3Animate .currentDraw .dr .sounds,
.content .kuai3Animate .currentDraw .dr .sounds2 {
  display: inline-block;
  height: 50px;
  width: 50px;
  margin-top: 10px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: url("assets/num/k3v.png") no-repeat -23px -998px;
}

.content .kuai3Animate .currentDraw .dr .sounds2 {
  background-position: -92px -998px;
}

.content .kuai3Animate .timeBox {
  position: absolute;
  top: 250px;
  left: 395px;
  width: 30%;
  text-align: center;
}

.content .kuai3Animate .timeBox .linetime {
  display: block;
  text-align: center;
  width: 100px;
  height: 45px;
  line-height: 45px;
  margin: 0 auto 10px;
  color: #fff;
  font-size: 24px;
}

.content .kuai3Animate .timeBox div {
  color: #e51d22;
  font-family: "DS-Digital", Consolas, "Courier New", monospace;
  font-size: 58px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 0 1px #e51d22, 0 0 4px rgba(229, 29, 34, .35);
}

.content .kuai3Animate .timeBox .linelist {
  width: 74px;
  height: 15px;
  margin: 20px auto 0;
  padding: 0;
  text-align: center;
}

.content .kuai3Animate .timeBox .linelist li {
  float: left;
  width: 2px;
  height: 15px;
  margin-right: 6px;
  background: #ff0713;
}

.content .kuai3Animate .timeBox .linelist .redli,
.content .kuai3Animate .timeBox .linelist li.dim {
  background: #33080a;
}

.content .kuai3Animate .timeBox .linelist li:last-child {
  margin-right: 0;
}

.content .kuai3Animate .timeBox .opening {
  display: block;
  margin: 0 auto;
}

.content .kuai3Animate .timeBox .opening[hidden] {
  display: none;
}

.content .kuai3Animate .bones {
  position: absolute;
  top: 520px;
  left: 316px;
  width: 490px;
  height: 100px;
}

.content .kuai3Animate .bones ul {
  width: 100%;
  height: 100px;
  margin: 0;
  padding: 0;
}

.content .kuai3Animate .bones ul li {
  float: left;
  width: 100px;
  height: 100px;
}

.content .kuai3Animate .bones ul li:nth-child(1) {
  margin-left: 28px;
}

.content .kuai3Animate .bones ul li:nth-child(2) {
  margin-left: 68px;
}

.content .kuai3Animate .bones ul li:nth-child(3) {
  margin-left: 66px;
}

.k3v1 { background: url("assets/num/k3v.png") -140px 0 no-repeat; }
.k3v2 { background: url("assets/num/k3v.png") -140px -100px no-repeat; }
.k3v3 { background: url("assets/num/k3v.png") -140px -200px no-repeat; }
.k3v4 { background: url("assets/num/k3v.png") -140px -300px no-repeat; }
.k3v5 { background: url("assets/num/k3v.png") -140px -400px no-repeat; }
.k3v6 { background: url("assets/num/k3v.png") -140px -500px no-repeat; }

#code li.rolling {
  animation: roll .42s steps(6) infinite;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.records-table th,
.records-table td {
  padding: 6px 15px;
  border: 1px solid #f1f1f1;
}

.records-table th {
  background: #f5f5f5;
}

.records-table .pager-row table {
  width: auto;
  margin: 0;
}

.records-table .pager-row td {
  padding: 4px;
  border: 0;
}

.records-table .pager-row span,
.records-table .pager-row a {
  display: inline-block;
  min-width: 22px;
  color: #484848;
}

@keyframes breathe {
  from { opacity: .42; }
  to { opacity: .82; }
}

@keyframes roll {
  from { background-position-y: 0; }
  to { background-position-y: -600px; }
}

@media (max-width: 820px) {
  .shell {
    width: 100%;
    padding: 5px;
  }

  .summary {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px;
    margin-bottom: 5px;
  }

  .summary-card {
    min-height: 64px;
  }

  .result {
    flex-wrap: nowrap;
    padding: 8px;
  }

  .result-main {
    border-right: 0;
    padding-right: 0;
    gap: 6px;
  }

  .result-tags {
    flex: 0 0 auto;
  }

  .tabs {
    padding: 8px;
  }

  .records-table {
    min-width: 0;
  }

  #records {
    overflow-x: auto;
  }
}

.admin-shell {
  width: min(960px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 32px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.admin-header h1 {
  margin: 0;
  font-size: 24px;
}

.admin-header a {
  color: var(--active);
  font-weight: 700;
  text-decoration: none;
}

.admin-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-links button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfcfcf;
  color: #555;
  background: #fff;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
}

.admin-panel {
  padding: 18px;
  border: 1px solid var(--border);
  background: #fff;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #555;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  font: inherit;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}

.field.full {
  grid-column: 1 / -1;
}

.dice-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--active);
  color: #fff;
  background: var(--active);
  border-radius: 2px;
  cursor: pointer;
  font-weight: 700;
}

.admin-button.secondary {
  color: var(--active);
  background: #fff;
}

.admin-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: #16833a;
  font-weight: 700;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f2f2f2;
}

.login-panel {
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  background: #fff;
}

.login-panel h1 {
  margin: 0 0 18px;
  font-size: 24px;
}

.login-panel form,
.login-panel label {
  display: grid;
  gap: 8px;
}

.login-panel form {
  gap: 14px;
}

.login-panel input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  font: inherit;
}

.zst-body {
  min-width: 0;
  background: #fff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

.zst-page {
  width: 980px;
  margin: 0;
  transform-origin: top left;
}

.zst-table {
  width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.zst-table td {
  height: 26px;
  min-width: 26px;
  padding: 2px;
  border: 1px solid #ddd;
  vertical-align: middle;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
}

.zst-table .text-c td,
.zst-table tr.text-c td {
  text-align: center;
}

@media (max-width: 720px) {
  .admin-grid,
  .dice-fields {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
