:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(15, 22, 34, 0.58);
  --panel-border: rgba(255, 255, 255, 0.16);
  --text: #f7f9ff;
  --muted: #b7c1d1;
  --accent: #6ee7d8;
  --blue: #2f7df6;
  --yellow: #ffc43d;
  --red: #ef4056;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(110, 231, 216, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(255, 196, 61, 0.12), transparent 26rem),
    linear-gradient(145deg, #070a12 0%, #111827 55%, #070a12 100%);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 76%);
}

button,
a,
input,
textarea {
  font: inherit;
}

.decrypt-shell {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 0;
}

.decrypt-hero {
  text-align: center;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
}

.decrypt-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: var(--shadow);
}

.decrypt-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  margin-bottom: 16px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input {
  height: 46px;
  padding: 0 14px;
}

input:focus,
textarea:focus {
  border-color: rgba(110, 231, 216, 0.72);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(183, 193, 209, 0.78);
}

.decrypt-form button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  color: #08111f;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.decrypt-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

textarea {
  min-height: min(52vh, 520px);
  resize: vertical;
  padding: 16px;
  color: #e8eefc;
  line-height: 1.65;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.action-primary {
  background: var(--blue);
}

.action-warn {
  color: #1b1400;
  background: var(--yellow);
}

.action-muted {
  color: #eff5ff;
  background: rgba(255, 255, 255, 0.16);
}

.action-danger {
  background: var(--red);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 8px;
  color: #08111f;
  background: var(--accent);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 620px) {
  .decrypt-form {
    grid-template-columns: 1fr;
  }

  .decrypt-form button {
    width: 100%;
  }
}
