#hexo-blog-encrypt {
  --hbe-accent: var(--primary-color, #3b82f6);
  --hbe-surface: color-mix(in srgb, var(--second-background-color, #fff) 92%, transparent);
  --hbe-border: color-mix(in srgb, var(--border-color, #d8dee9) 76%, transparent);
  --hbe-text: var(--default-text-color, #1f2937);
  --hbe-muted: var(--third-text-color, #6b7280);
  margin: clamp(28px, 6vw, 72px) auto;
}

#hexo-blog-encrypt .hbe-content {
  display: flex;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
  text-align: initial;
}

#hexo-blog-encrypt .hbe-form {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--hbe-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--hbe-accent) 14%, transparent), transparent 34%),
    var(--hbe-surface);
  box-shadow: 0 18px 44px color-mix(in srgb, var(--shadow-color-2, rgba(15, 23, 42, 0.16)) 85%, transparent);
  backdrop-filter: blur(12px);
}

#hexo-blog-encrypt .hbe-input {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0 0 18px;
  overflow: visible;
}

#hexo-blog-encrypt .hbe-input-field {
  float: none;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--hbe-border);
  border-radius: 16px;
  background: var(--background-color, #fff);
  color: var(--hbe-text);
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#hexo-blog-encrypt .hbe-input-field:focus {
  border-color: var(--hbe-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hbe-accent) 18%, transparent);
}

#hexo-blog-encrypt .hbe-input-label-default {
  position: static;
  width: 100%;
  padding: 0;
  color: var(--hbe-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

#hexo-blog-encrypt .hbe-input-label-default::before,
#hexo-blog-encrypt .hbe-input-label-default::after {
  display: none;
}

#hexo-blog-encrypt .hbe-input-label-content-default {
  position: static;
  width: 100%;
  padding: 0;
  overflow: visible;
  color: var(--hbe-muted);
  white-space: normal;
  transform: none;
  transition: color 0.18s ease;
}

#hexo-blog-encrypt .hbe-input-field:focus + .hbe-input-label-default .hbe-input-label-content-default,
#hexo-blog-encrypt .hbe-input--filled .hbe-input-label-default .hbe-input-label-content-default {
  color: var(--hbe-accent);
}

#hexo-blog-encrypt .hbe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hbe-accent) 92%, #8ec5ff), var(--hbe-accent));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--hbe-accent) 26%, transparent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-indent: 0;
  text-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#hexo-blog-encrypt .hbe-button::after {
  display: none;
}

#hexo-blog-encrypt .hbe-button:hover {
  box-shadow: 0 14px 30px color-mix(in srgb, var(--hbe-accent) 32%, transparent);
  filter: saturate(1.08);
  transform: translateY(-1px);
}

#hexo-blog-encrypt .hbe-button:active {
  top: 0;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--hbe-accent) 24%, transparent);
  transform: translateY(0);
}

#hexo-blog-encrypt .hbe-error {
  min-height: 1.4em;
  margin-top: 12px;
  color: #ef4444;
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 640px) {
  #hexo-blog-encrypt {
    margin: 24px auto 36px;
  }

  #hexo-blog-encrypt .hbe-form {
    width: 100%;
    padding: 18px;
    border-radius: 18px;
  }

  #hexo-blog-encrypt .hbe-input-field {
    height: 50px;
    padding-right: 14px;
    padding-left: 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  #hexo-blog-encrypt .hbe-input-label-content-default {
    width: 100%;
    font-size: 0.92rem;
  }

  #hexo-blog-encrypt .hbe-button {
    height: 46px;
    font-size: 0.96rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hexo-blog-encrypt .hbe-input-field,
  #hexo-blog-encrypt .hbe-input-label-content-default,
  #hexo-blog-encrypt .hbe-button {
    transition: none;
  }
}

/* 解密后的表格样式（继承主题 markdown-body 样式） */
#hexo-blog-encrypt table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  overflow: auto;
  margin-bottom: 1.2rem;
  margin-top: 1rem;
  box-shadow: var(--redefine-box-shadow-flat);
  border-radius: 14px;
}

#hexo-blog-encrypt table thead th {
  border-bottom: 1px solid var(--shadow-color-1);
  background-color: var(--third-background-color) !important;
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
}

#hexo-blog-encrypt table thead th:first-child {
  border-top-left-radius: 14px;
}

#hexo-blog-encrypt table thead th:last-child {
  border-top-right-radius: 14px;
}

#hexo-blog-encrypt table tbody td {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  vertical-align: top;
}

#hexo-blog-encrypt table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

#hexo-blog-encrypt table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

#hexo-blog-encrypt table tbody tr:last-child td {
  border-bottom: none;
}
