:root {
  --bg: #f3f6fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(24, 40, 72, 0.1);
  --text: #152033;
  --muted: #6a768b;
  --accent: #1ea0ff;
  --accent-deep: #0d6fd1;
  --shadow: 0 20px 48px rgba(19, 34, 63, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-page,
.release-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card,
.release-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.auth-card {
  width: min(920px, 100%);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
}

.auth-copy {
  padding: 56px;
  background:
    radial-gradient(circle at top, rgba(111, 206, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(9, 38, 71, 0.96), rgba(5, 18, 38, 0.98)),
    linear-gradient(135deg, #0e2f59, #071728);
  color: #f3faff;
}

.auth-copy h1,
.page-header h1,
.panel-head h2 {
  margin: 0;
}

.auth-copy p:last-child {
  margin-top: 16px;
  line-height: 1.8;
  color: rgba(232, 244, 255, 0.84);
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.7;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 56px;
  background: rgba(255, 255, 255, 0.96);
}

.auth-form label {
  font-size: 14px;
  color: var(--muted);
}

.auth-form input {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(24, 40, 72, 0.14);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

.auth-form input::placeholder {
  color: #8d97a8;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(30, 160, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(30, 160, 255, 0.14);
}

.login-captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-captcha-question {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(24, 40, 72, 0.14);
  background: linear-gradient(135deg, rgba(30, 160, 255, 0.1), rgba(13, 111, 209, 0.04));
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.login-captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(24, 40, 72, 0.1);
  background: rgba(24, 40, 72, 0.06);
  color: var(--text);
  white-space: nowrap;
}

.login-captcha-refresh:hover {
  text-decoration: none;
  background: rgba(24, 40, 72, 0.1);
}

.auth-form button,
.logout-link {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.auth-form button {
  height: 50px;
  margin-top: 8px;
}

.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.flash.error {
  background: rgba(255, 85, 113, 0.12);
  color: #ff9aae;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header p {
  color: var(--muted);
}

.release-panel {
  border-radius: 24px;
  padding: 24px;
}

.notice-block {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 20px;
  background: #fcfdff;
  border: 1px solid rgba(24, 40, 72, 0.08);
}

.notice-block h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.notice-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(30, 160, 255, 0.1);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}

.notice-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.notice-item a {
  font-weight: 600;
}

.notice-emphasis {
  color: #c53333;
  font-weight: 700;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head p {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-card h2 {
  margin: 0;
  font-size: 20px;
}

.feature-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(30, 160, 255, 0.12);
  color: var(--accent-deep);
  font-size: 12px;
}

.feature-link,
.secondary-link,
.feature-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

.feature-link,
.secondary-link {
  border: 1px solid rgba(116, 176, 255, 0.28);
  background: rgba(9, 28, 52, 0.72);
}

.feature-link:hover,
.secondary-link:hover {
  text-decoration: none;
  border-color: rgba(30, 160, 255, 0.62);
  background: rgba(12, 36, 67, 0.9);
}

.feature-placeholder {
  color: var(--muted);
  background: rgba(149, 171, 200, 0.08);
}

.header-actions form,
.header-actions .logout-link {
  display: inline-flex;
}

.release-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.release-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.release-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.release-card-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.release-card-label,
.meta-label,
.download-title {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.release-card h3 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.release-time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.release-badge.is-supported {
  background: rgba(32, 184, 122, 0.12);
  color: #16845a;
}

.release-badge.is-unsupported {
  background: rgba(255, 159, 28, 0.14);
  color: #a86000;
}

.release-meta {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.release-meta-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid rgba(24, 40, 72, 0.08);
}

.meta-value {
  display: block;
  margin-top: 6px;
  line-height: 1.7;
  word-break: break-word;
}

.download-list {
  display: grid;
  gap: 12px;
}

.download-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(24, 40, 72, 0.12);
}

.download-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(30, 160, 255, 0.12);
  color: var(--accent-deep);
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
}

.download-text {
  min-width: 0;
}

.download-item strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 15px;
  word-break: break-all;
}

.download-item .download-title {
  color: var(--muted);
}

.download-item:hover {
  text-decoration: none;
}

.download-item:hover .download-icon {
  background: rgba(30, 160, 255, 0.18);
}

.download-item:hover strong {
  text-decoration: underline;
}

.captcha-modal[hidden] {
  display: none;
}

.captcha-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.captcha-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 38, 0.54);
  backdrop-filter: blur(6px);
}

.captcha-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100% - 24px));
  margin: min(10vh, 80px) auto 0;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(24, 40, 72, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 60px rgba(15, 28, 52, 0.22);
}

.captcha-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.captcha-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.captcha-dialog h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.captcha-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 40, 72, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.captcha-description {
  margin: 16px 0;
  color: var(--muted);
  line-height: 1.7;
}

.captcha-package {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid rgba(24, 40, 72, 0.08);
}

.captcha-package-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.captcha-form {
  display: grid;
  gap: 12px;
}

.captcha-form label {
  font-size: 14px;
  color: var(--muted);
}

.captcha-challenge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-challenge {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(30, 160, 255, 0.12), rgba(13, 111, 209, 0.06));
  border: 1px solid rgba(30, 160, 255, 0.2);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.captcha-refresh,
.captcha-secondary,
.captcha-primary {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.captcha-refresh {
  padding: 0 14px;
  background: rgba(24, 40, 72, 0.08);
  color: var(--text);
  white-space: nowrap;
}

.captcha-form input {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(24, 40, 72, 0.14);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

.captcha-form input:focus {
  outline: none;
  border-color: rgba(30, 160, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(30, 160, 255, 0.14);
}

.captcha-feedback {
  min-height: 22px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.captcha-feedback[data-state="error"] {
  color: #c53333;
}

.captcha-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.captcha-secondary {
  padding: 0 16px;
  background: rgba(24, 40, 72, 0.08);
  color: var(--text);
}

.captcha-primary {
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
}

@media (max-width: 860px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-copy,
  .auth-form,
  .release-panel {
    padding: 28px;
  }

  .page-header {
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions form {
    flex: 1;
  }

  .secondary-link,
  .logout-link {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-page,
  .release-page {
    width: min(100%, calc(100% - 20px));
    padding: 20px 0;
  }

  .auth-page {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .auth-card,
  .release-panel,
  .feature-card {
    border-radius: 20px;
  }

  .auth-copy,
  .auth-form,
  .release-panel {
    padding: 22px 18px;
  }

  .auth-copy h1,
  .page-header h1,
  .panel-head h2 {
    font-size: 26px;
    line-height: 1.2;
  }

  .auth-copy p:last-child,
  .page-header p,
  .panel-head p,
  .feature-card p {
    font-size: 14px;
    line-height: 1.7;
  }

  .eyebrow {
    letter-spacing: 0.12em;
    font-size: 11px;
  }

  .auth-form {
    gap: 10px;
  }

  .auth-form input,
  .auth-form button,
  .feature-link,
  .secondary-link,
  .feature-placeholder,
  .logout-link {
    min-height: 46px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 18px;
  }

  .feature-card-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .login-captcha-row {
    flex-direction: column;
    align-items: stretch;
  }

  .release-panel {
    padding: 18px 14px;
  }

  .notice-block {
    padding: 16px;
    border-radius: 16px;
  }

  .notice-item {
    grid-template-columns: 24px 1fr;
    gap: 10px;
  }

  .notice-index {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .release-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .release-card {
    padding: 18px;
    border-radius: 18px;
  }

  .release-card-head {
    flex-direction: column;
    margin-bottom: 14px;
  }

  .release-card-tags {
    justify-content: flex-start;
  }

  .release-card h3 {
    font-size: 24px;
  }

  .release-time {
    white-space: normal;
  }

  .captcha-dialog {
    margin-top: 32px;
    padding: 20px 18px;
    border-radius: 20px;
  }

  .captcha-dialog h2 {
    font-size: 22px;
  }

  .captcha-challenge-row,
  .captcha-actions {
    flex-direction: column;
  }

  .captcha-refresh,
  .captcha-secondary,
  .captcha-primary {
    width: 100%;
  }
}
