/* ===== Download Modal ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.show {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--card);
  border-radius: 14px;
  padding: 28px;
  max-width: 680px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  text-align: center;
}

.modal h3 {
  margin-top: 0;
  color: #fff;
  margin-bottom: 20px;
  font-size: 20px;
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.image-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.image-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  width: 240px;
  text-align: center;
  transition: border-color 0.2s ease;
  cursor: pointer;
  color: inherit;
}

.image-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.image-card svg {
  width: 64px;
  height: 64px;
  color: var(--accent) !important;
  margin-bottom: 10px;
}

.image-card h4 {
  font-size: 16px;
  margin: 6px 0;
  color: #fff;
}

.image-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}

.image-card .size {
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 10px;
}

/* Download modal layout */
.modal-download {
  max-width: 480px;
}

.download-latest {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.download-latest .image-card {
  width: 100%;
}

/* Older versions */
.older-versions {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 0;
}

.older-versions summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.older-versions summary:hover {
  color: #fff;
}

.older-versions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.older-version-item {
  display: block;
  text-decoration: none;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.older-version-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 480px) {
  .older-versions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
