/* 海阁社区RPG激活码续期 - soft cyber ACG terminal */

@font-face {
  font-family: "HaigeUI";
  src: url("/fonts/haige-ui.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #071015;
  --bg-2: #0c171f;
  --panel: rgba(14, 26, 34, 0.95);
  --panel-deep: rgba(5, 11, 15, 0.9);
  --line: rgba(90, 224, 212, 0.28);
  --line-strong: #5ae0d4;
  --gold: #d8b56a;
  --gold-soft: rgba(216, 181, 106, 0.36);
  --red: #bd3d36;
  --red-hi: #e35b4f;
  --cream: #f1e7cf;
  --ink: #d6e0dc;
  --muted: #94a7a5;
  --faint: #627371;
  --danger: #ff786e;
  --danger-soft: rgba(189, 61, 54, 0.15);
  --ok: #77ddc8;
  --ok-soft: rgba(90, 224, 212, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --font: "HaigeUI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --serif: "HaigeUI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(90, 224, 212, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(216, 181, 106, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    repeating-linear-gradient(115deg, transparent 0 18px, rgba(90, 224, 212, 0.03) 19px, transparent 20px),
    linear-gradient(145deg, #061016 0%, #101a22 56%, #05090d 100%);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px);
  opacity: 0.42;
  z-index: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 286px;
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
}

.brandmark {
  display: block;
  color: inherit;
  text-decoration: none;
}

.brandmark__frame {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid var(--gold-soft);
  background:
    linear-gradient(135deg, rgba(216, 181, 106, 0.18), rgba(90, 224, 212, 0.08)),
    rgba(7, 16, 21, 0.92);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.brandmark__logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  display: block;
}

.hero__copy {
  min-width: 0;
}

.eyebrow,
.dialog__eyebrow,
.panel-title span {
  margin: 0;
  color: var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 8px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(90, 224, 212, 0.12);
}

.hero__sub {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.accountbar,
.command-panel,
.card,
.dialog {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(90, 224, 212, 0.075), transparent 22%),
    linear-gradient(180deg, var(--panel), rgba(7, 14, 19, 0.98));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.accountbar::before,
.command-panel::before,
.card::before,
.dialog::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(216, 181, 106, 0.18);
  pointer-events: none;
}

.accountbar {
  min-height: 116px;
  padding: 18px;
}

.accountbar__in,
.accountbar__out {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.accountbar__hint,
.accountbar__hi {
  color: var(--muted);
  font-size: 14px;
}

.accountbar__hi b {
  color: var(--cream);
  font-weight: 700;
}

.quota {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid rgba(90, 224, 212, 0.3);
  background: var(--ok-soft);
  color: #d9fffb;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.quota.is-empty {
  border-color: rgba(189, 61, 54, 0.42);
  background: var(--danger-soft);
  color: #ffd4d0;
}

.quota b {
  padding: 0 3px;
  color: var(--cream);
}

.linkbtn {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--faint);
  font-size: 14px;
}

.linkbtn:hover {
  color: var(--line-strong);
}

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

.command-panel {
  padding: 22px;
}

.panel-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.mission-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(90, 224, 212, 0.18);
  background: rgba(5, 11, 15, 0.56);
}

.mission-list li.is-active {
  border-color: var(--gold-soft);
  background: linear-gradient(90deg, rgba(216, 181, 106, 0.22), rgba(90, 224, 212, 0.07));
  box-shadow: inset 4px 0 0 var(--red-hi);
}

.mission-list span {
  color: var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.mission-list b {
  color: var(--cream);
  font-size: 14px;
}

.panel-note {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 181, 106, 0.2);
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  gap: 14px;
}

.card {
  padding: 24px;
}

.card__title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--cream);
  font-size: 20px;
  font-weight: 700;
}

.card__hint {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 30px;
  border: 1px solid var(--gold-soft);
  background: rgba(216, 181, 106, 0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  flex: none;
}

.step--done {
  border-color: rgba(90, 224, 212, 0.42);
  background: rgba(90, 224, 212, 0.12);
  color: var(--line-strong);
}

.textarea,
.field__input {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid rgba(90, 224, 212, 0.26);
  border-radius: 0;
  background: #050b10;
  color: var(--cream);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.textarea {
  min-height: 152px;
  margin-bottom: 14px;
  padding: 13px;
  resize: vertical;
  color: #dce9e4;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-all;
}

@media (min-width: 921px) {
  #codeInput.textarea {
    min-height: 190px;
  }
}

.field__input {
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
}

.textarea::placeholder,
.field__input::placeholder {
  color: var(--faint);
}

.textarea:focus,
.field__input:focus {
  border-color: var(--line-strong);
  background: #04090d;
  box-shadow: 0 0 0 3px rgba(90, 224, 212, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.field {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
}

.field__label,
.expiry__label {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.form {
  display: grid;
  gap: 14px;
}

.captcha-box {
  position: relative;
  z-index: 2;
}

.captcha-box:empty {
  display: none;
}

.captcha-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(90, 224, 212, 0.24);
  background:
    linear-gradient(90deg, rgba(90, 224, 212, 0.08), rgba(216, 181, 106, 0.06)),
    #050b10;
  padding: 11px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.captcha-entry.is-verified {
  border-color: rgba(96, 199, 139, 0.44);
  background:
    linear-gradient(90deg, rgba(96, 199, 139, 0.12), rgba(90, 224, 212, 0.05)),
    #050b10;
}

.captcha-entry__copy {
  min-width: 0;
}

.captcha-entry__label {
  display: block;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.captcha-entry__copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.captcha-entry__button {
  min-height: 34px;
  border: 1px solid rgba(216, 181, 106, 0.42);
  border-radius: 0;
  background: rgba(216, 181, 106, 0.12);
  color: var(--cream);
  padding: 0 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.captcha-entry__button:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(216, 181, 106, 0.2);
}

.captcha-entry__button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.captcha-entry__status {
  border: 1px solid rgba(96, 199, 139, 0.48);
  background: rgba(96, 199, 139, 0.12);
  color: #dfffea;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
}

.captcha-popup {
  width: min(420px, calc(100% - 30px));
  border: 1px solid rgba(90, 224, 212, 0.34);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(90, 224, 212, 0.11), transparent 28%),
    linear-gradient(180deg, #0b151d, #05090d);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.captcha-popup::backdrop {
  background: rgba(2, 6, 9, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.captcha-popup__panel {
  position: relative;
  padding: 22px 18px 16px;
}

.captcha-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(216, 181, 106, 0.34);
  border-radius: 0;
  background: rgba(216, 181, 106, 0.09);
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.captcha-popup__close:hover {
  border-color: var(--gold);
  color: #fff;
}

.captcha-popup__mount {
  min-height: 220px;
}

.captcha-popup__watermark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid rgba(216, 181, 106, 0.18);
  margin-top: 12px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.captcha-popup__watermark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.actions--split {
  justify-content: space-between;
}

.btn {
  min-height: 42px;
  border: 1px solid rgba(216, 181, 106, 0.42);
  border-radius: 2px;
  padding: 9px 20px;
  background: linear-gradient(180deg, #243640, #111d24);
  color: var(--cream);
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 0.08s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled,
.btn.is-busy {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn--primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, var(--red-hi), var(--red));
  color: #fff8ed;
  box-shadow: 0 10px 28px rgba(189, 61, 54, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--ghost,
.btn--soft {
  border-color: rgba(90, 224, 212, 0.34);
  background: rgba(90, 224, 212, 0.075);
  color: #d9fffb;
}

.btn--sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn:focus-visible,
.linkbtn:focus-visible,
.chip:focus-visible,
.dialog__close:focus-visible {
  outline: 2px solid var(--line-strong);
  outline-offset: 2px;
}

.info {
  position: relative;
  z-index: 1;
  margin: 2px 0 18px;
  border: 1px solid rgba(216, 181, 106, 0.24);
  overflow: hidden;
}

.info__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(90, 224, 212, 0.14);
  background: rgba(255, 255, 255, 0.018);
}

.info__row:last-child {
  border-bottom: 0;
}

.info__row dt {
  color: var(--muted);
  font-size: 13px;
}

.info__row dd {
  margin: 0;
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
}

.expiry {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.issue-term {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(90, 224, 212, 0.22);
  background:
    linear-gradient(90deg, rgba(90, 224, 212, 0.08), rgba(216, 181, 106, 0.08)),
    rgba(5, 11, 15, 0.56);
  padding: 12px 13px;
}

.issue-term__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.issue-term__main span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.issue-term__main b {
  color: var(--cream);
  font-size: 18px;
}

.issue-term p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  border: 1px solid rgba(90, 224, 212, 0.22);
  border-radius: 2px;
  padding: 5px 14px;
  background: rgba(5, 11, 15, 0.56);
  color: var(--ink);
  font-weight: 700;
}

.chip:hover {
  border-color: var(--line-strong);
}

.chip[aria-pressed="true"] {
  border-color: var(--gold-soft);
  background: rgba(216, 181, 106, 0.18);
  color: var(--cream);
}

.expiry .field__input {
  color-scheme: dark;
}

.result__note {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.codebox {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  border: 1px solid rgba(90, 224, 212, 0.28);
  background:
    linear-gradient(90deg, rgba(90, 224, 212, 0.08), rgba(216, 181, 106, 0.08)),
    #050b10;
  padding: 12px;
}

.codebox__text {
  display: block;
  max-height: 210px;
  overflow-y: auto;
  color: #d9fffb;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  word-break: break-all;
}

.msg {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  border: 1px solid rgba(90, 224, 212, 0.24);
  padding: 10px 12px;
  color: #d9fffb;
  background: rgba(90, 224, 212, 0.08);
  font-size: 14px;
}

.msg.is-error {
  border-color: rgba(189, 61, 54, 0.42);
  background: var(--danger-soft);
  color: #ffd4d0;
}

.msg.is-info {
  border-color: rgba(90, 224, 212, 0.24);
  background: rgba(90, 224, 212, 0.08);
}

.foot {
  margin: 22px 0 0;
  color: rgba(241, 231, 207, 0.62);
  font-size: 13px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translate(-50%, 14px);
  border: 1px solid var(--gold-soft);
  background: rgba(8, 17, 23, 0.96);
  box-shadow: var(--shadow);
  color: var(--cream);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgba(189, 61, 54, 0.5);
  color: #ffd4d0;
}

.dialog {
  width: min(440px, calc(100% - 30px));
  border-color: rgba(90, 224, 212, 0.34);
  padding: 0;
  color: var(--ink);
}

.dialog::backdrop {
  background: rgba(2, 6, 9, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dialog[open] {
  animation: dialogIn 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.dialog__close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 181, 106, 0.45);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 20px;
  line-height: 1;
}

.dialog__close:hover {
  border-color: var(--gold);
  color: #fff;
}

.dialog__brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 24px 66px 18px 24px;
  border-bottom: 1px solid rgba(216, 181, 106, 0.22);
}

.dialog__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.dialog__title {
  margin: 2px 0 4px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
}

.dialog__sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog__form {
  position: relative;
  z-index: 1;
  padding: 20px 24px 24px;
}

::selection {
  background: rgba(90, 224, 212, 0.22);
  color: #fff;
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .accountbar {
    grid-column: 1 / -1;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .command-panel {
    padding: 18px;
  }

  .mission-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .brandmark__frame {
    width: 70px;
    height: 70px;
  }

  .brandmark__logo {
    width: 56px;
    height: 56px;
  }

  h1 {
    font-size: 32px;
  }

  .hero__sub {
    font-size: 14px;
  }

  .mission-list {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  .card__title {
    align-items: flex-start;
    font-size: 18px;
  }

  .info__row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }

  .actions,
  .actions--split {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .dialog__brand {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 22px 58px 16px 20px;
  }

  .dialog__logo {
    width: 44px;
    height: 44px;
  }

  .dialog__title {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
