:root {
  --bg-overlay: rgba(20, 26, 35, 0.55);
  --card-bg: rgba(0, 0, 0, 0.45);
  --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  --border-radius: 10px;
  --text-muted: #ccc;
  --link-color: #6cf;
  --warning: #f39c12;
  --danger: #ff4d4d;
  --success: #2ecc71;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  background:
    linear-gradient(var(--bg-overlay), var(--bg-overlay)),
    url('/images/background.png') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
}

.site-shell {
  padding: 24px 16px 40px;
}

.container {
  text-align: center;
}

.site-logo {
  max-width: min(100%);
  height: auto;
}

.content {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.section-title {
  margin: 0 0 14px;
  text-align: left;
}

.section-title small,
.meta small {
  color: var(--text-muted);
}

.release-meta {
  display: block;
}

.checksum-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  line-height: 1;
}

.checksum-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.checksum-row code {
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  color: #fff;
  word-break: break-all;
}

.license-text {
  text-align: left;
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
}

.notice {
  border-left: 4px solid var(--warning);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(35, 35, 35, 0.55));
  font-size: 14px;
  text-align: left;
}

.notice p,
.fabric-card p {
  margin: 0;
}

.disclaimer {
  border-left: 4px solid var(--danger);
  background: rgba(255, 77, 77, 0.08);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
}

.download-left {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.icon-box {
  width: 52px;
  min-height: 52px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  flex-shrink: 0;
  align-self: stretch;
}

.icon-box i {
  font-size: 20px;
}

.meta {
  text-align: left;
}

.download-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.download-size {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.download-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.stable {
  background: var(--success);
}

.badge.beta {
  background: #e74c3c;
}

.top-links {
  margin: 10px 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.ui.inverted.button {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #fff !important;
}

.ui.inverted.button:hover,
.ui.inverted.button:focus-visible,
.top-links .is-active {
  background: rgba(255, 255, 255, 0.08) !important;
}

.fabric-card a {
  color: var(--link-color);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal.hidden {
  display: none;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  max-width: 520px;
  width: min(100%, 520px);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--danger);
  box-shadow:
    0 0 8px rgba(255, 0, 0, 0.2),
    0 0 20px rgba(255, 0, 0, 0.12),
    0 0 35px rgba(255, 0, 0, 0.08);
  animation: pulseGlow 2.2s infinite ease-in-out;
}

.modal-title {
  margin: 0;
  color: var(--danger);
  text-align: left;
}

.modal-copy {
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
}

.risk-warning {
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.disabled {
  pointer-events: none;
  opacity: 0.4;
}

@keyframes pulseGlow {
  0% {
    box-shadow:
      0 0 8px rgba(255, 0, 0, 0.2),
      0 0 20px rgba(255, 0, 0, 0.12),
      0 0 35px rgba(255, 0, 0, 0.08);
  }
  50% {
    box-shadow:
      0 0 14px rgba(255, 0, 0, 0.4),
      0 0 35px rgba(255, 0, 0, 0.25),
      0 0 60px rgba(255, 0, 0, 0.15);
  }
  100% {
    box-shadow:
      0 0 8px rgba(255, 0, 0, 0.2),
      0 0 20px rgba(255, 0, 0, 0.12),
      0 0 35px rgba(255, 0, 0, 0.08);
  }
}

@media (max-width: 640px) {
  .download {
    flex-direction: column;
    align-items: stretch;
  }

  .download-left {
    align-items: flex-start;
  }

  .download-action {
    align-items: stretch;
  }

  .download-size {
    text-align: center;
  }

  .modal-actions {
    flex-direction: column;
  }
}
