:root {
  --yellow: #ffe100;
  --black: #141414;
  --panel: rgba(25, 25, 24, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eeeeee;
  --muted: #9c9c9c;
  --danger: #e04040;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: #f2f2f2;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image: url("/static/images/main.jpg");
  background-repeat: no-repeat;
  background-size: 120%;
  background-position: center 30%;

  opacity: 0.2;

  z-index: -1;
}

.page-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vh, 24px);
  padding: clamp(8px, 1.25vh, 20px) 20px;
}

.panel {
  position: relative;
  width: min(450px, calc(100vw - 40px));
  min-height: 530px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--panel);
  border: 2px solid var(--yellow);
  border-top-width: 0;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  padding: 56px 54px 36px;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  background: var(--yellow);
}

.panel::before {
  left: -2px;
  top: 0;
  width: 2px;
  height: 100%;
}

.panel::after {
  right: -2px;
  bottom: 0;
  width: 13px;
  height: 55px;
  background: repeating-linear-gradient(-18deg,
      var(--yellow) 0 13px,
      transparent 13px 23px);
}

.warning-stripe {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 0;
  height: 41px;
  background: repeating-linear-gradient(-28deg,
      var(--black) 0 19px,
      var(--black) 19px 30px,
      var(--yellow) 30px 49px,
      var(--yellow) 49px 60px);
}

.warning-stripe::after {
  content: "";
  position: absolute;
  inset: 41px auto auto -2px;
  width: 13px;
  height: 195px;
  background: repeating-linear-gradient(-18deg,
      var(--yellow) 0 13px,
      transparent 13px 23px);
}

h1 {
  margin: 0 0 25px;
  text-align: center;
  font-size: 38px;
  line-height: 1;
  color: #d8d8d8;
  text-shadow: 1px 2px 0 rgba(255, 255, 255, 0.12);
  font-style: italic;
  letter-spacing: 0;
}

.token-form {
  display: grid;
  gap: 19px;
}

label {
  display: grid;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  color: #d8d8d8;
}

input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: #181818;
  color: #f3f3f3;
  padding: 0 16px;
  font-size: 16px;
}

input::placeholder {
  color: #737373;
}

input:focus {
  border-color: rgba(255, 225, 0, 0.65);
}

.token-row {
  position: relative;
}

.token-row label {
  width: 100%;
}

.token-result {
  position: relative;
}

.token-result input {
  padding-right: 112px;
}

.link-button {
  position: absolute;
  right: 13px;
  top: 38px;
  width: 78px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  padding: 0;
  line-height: 1;
  background: transparent;
  color: var(--yellow);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.link-button:hover {
  color: #fff38a;
}

.primary-button {
  width: 100%;
  height: 46px;
  margin-top: 27px;
  border: 0;
  background: var(--yellow);
  color: #161616;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  filter: brightness(1.04);
}

.message {
  min-height: 20px;
  margin: 7px 0 -8px;
  font-size: 14px;
  line-height: 1.35;
}

.message.error,
.red {
  color: var(--danger);
}

.message.success {
  color: var(--yellow);
}

.notice {
  width: min(720px, calc(100vw - 40px));
  background: rgba(225, 225, 225, 0.82);
  color: #222222;
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.35;
}

.notice p {
  margin: 0;
}

.notice a {
  color: #185ec8;
}

.site-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  color: #777777;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #444444;
  text-decoration: underline;
}

@media (max-width: 520px) {
  .page-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .panel {
    width: min(450px, calc(100vw - 28px));
    min-height: auto;
    padding: 52px 27px 30px;
  }

  h1 {
    font-size: 32px;
  }

  .token-form {
    gap: 17px;
  }

  label,
  input,
  .primary-button {
    font-size: 15px;
  }

  input {
    height: 42px;
  }

  .link-button {
    top: 38px;
    font-size: 14px;
  }

  .notice {
    width: min(720px, calc(100vw - 28px));
    padding: 18px 16px;
    font-size: 14px;
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-height: 800px) {
  .page-shell {
    gap: 12px;
    padding: 8px 14px;
  }

  .panel {
    min-height: 0;
    padding: 44px 42px 22px;
  }

  .warning-stripe {
    height: 34px;
  }

  .warning-stripe::after {
    inset: 34px auto auto -2px;
    height: 155px;
  }

  h1 {
    margin-bottom: 16px;
    font-size: 30px;
  }

  .token-form {
    gap: 12px;
  }

  label {
    gap: 6px;
    font-size: 14px;
  }

  input {
    height: 36px;
    font-size: 14px;
  }

  .link-button {
    top: 28px;
    height: 22px;
    font-size: 13px;
  }

  .primary-button {
    height: 40px;
    margin-top: 12px;
    font-size: 14px;
  }

  .notice {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.3;
  }

  .site-footer {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-height: 650px) {
  .page-shell {
    gap: 6px;
    padding: 6px 14px;
  }

  .panel {
    padding: 36px 24px 14px;
  }

  .warning-stripe {
    height: 28px;
  }

  .warning-stripe::after {
    inset: 28px auto auto -2px;
    width: 10px;
    height: 110px;
  }

  h1 {
    margin-bottom: 10px;
    font-size: 26px;
  }

  .token-form {
    gap: 7px;
  }

  label {
    gap: 3px;
    font-size: 12px;
  }

  input {
    height: 30px;
    font-size: 13px;
  }

  .link-button {
    top: 22px;
    height: 20px;
    font-size: 12px;
  }

  .primary-button {
    height: 32px;
    margin-top: 4px;
    font-size: 13px;
  }

  .message {
    min-height: 14px;
    margin: 3px 0 -4px;
    font-size: 11px;
  }

  .notice {
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.2;
  }

  .site-footer {
    padding: 4px 10px;
    font-size: 11px;
  }
}
