:root {
  --green: #00b866;
  --green-soft: #eafff2;
}

.download-page {
  min-height: calc(100vh - 64px);
  padding: 78px 0 108px;
  background: var(--surface);
  text-align: center;
}

.release-title {
  margin: 0;
  font-size: 56px;
  line-height: 1.08;
  font-weight: 800;
}

.release-date {
  margin: 14px 0 56px;
  color: #5f6472;
  font-size: 20px;
}

.system-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: fit-content;
  margin: 0 auto 22px;
  color: #5f6472;
  text-align: left;
  font-size: 15px;
  line-height: 1.55;
}

.system-summary i {
  margin-top: 4px;
  color: #6f737d;
}

.platform-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin: 0 auto 36px;
  padding: 5px;
  border-radius: 16px;
  background: #f3f3f5;
}

.platform-tab {
  min-width: 132px;
  min-height: 52px;
  border: 0;
  border-radius: 13px;
  color: #5f6472;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.platform-tab:focus {
  outline: none;
}

.platform-tab:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.platform-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.platform-panel {
  display: none;
  width: min(100%, 920px);
  margin: 0 auto;
  text-align: left;
}

.platform-panel.is-active {
  display: block;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 184px;
  padding: 28px;
  border: 1.5px solid #8be9b4;
  border-radius: 16px;
  background: var(--green-soft);
}

.download-card.is-disabled {
  border-color: #dedee5;
  background: #f7f7f9;
}

.download-content {
  min-width: 0;
}

.download-actions {
  display: grid;
  gap: 14px;
  flex: 0 0 176px;
}

.download-actions.is-empty {
  display: none;
}

.recommend-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

.download-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.3;
}

.download-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.requirements {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  color: #2f3440;
  font-size: 14px;
  line-height: 1.58;
}

.requirements div {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.requirements strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
}

.requirements span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.requirements a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-name {
  margin-top: 14px;
  color: var(--muted);
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.download-button {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0 28px;
  gap: 10px;
  font-size: 18px;
  width: 100%;
}

.download-button[hidden] {
  display: none !important;
}

.download-button.is-disabled {
  color: #777b86;
  background: #dedee5;
  pointer-events: none;
}

.download-button.is-loading {
  opacity: 0.86;
  pointer-events: none;
  cursor: wait;
}

.download-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 22px;
  margin-top: -4px;
  color: #5f6472;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  overflow-wrap: anywhere;
}

.download-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.download-status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 999px;
  background: currentColor;
}

.download-status[data-type="loading"]::before {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 2px solid rgba(11, 11, 12, 0.18);
  border-top-color: var(--ink);
  background: transparent;
  animation: download-status-spin 760ms linear infinite;
}

.download-status[data-type="success"] {
  color: #007a43;
}

.download-status[data-type="error"] {
  color: #b42318;
}

@keyframes download-status-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .release-title {
    font-size: 40px;
  }

  .release-date {
    margin-bottom: 40px;
  }

  .download-card {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions {
    flex: 0 0 auto;
    width: 100%;
  }

  .requirements div {
    display: block;
  }

}

@media (max-width: 560px) {
  .download-page {
    padding-top: 58px;
    padding-bottom: 72px;
  }

  .release-title {
    font-size: 34px;
  }

  .release-date {
    font-size: 17px;
  }

  .platform-tabs {
    display: flex;
    width: 100%;
  }

  .platform-tab {
    min-width: 0;
    flex: 1;
  }

  .download-card {
    padding: 24px;
  }

  .login-modal-content {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
}
