/* Descarga de Michis de Guerra (n3k3.com/michis/): el CSS de la página, con los valores del material original. */

.downloadBody {
  min-height: 100svh;
  line-height: 1.5;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(255, 138, 61, 0.22), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(78, 168, 255, 0.16), transparent 60%), #14203a;
}

.downloadWrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* Cabecera: selector de idioma, mascota, título y bajada */

.downloadHeader {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 12px 0 30px;
}

/* Selector de idioma: su propia fila, a la derecha, encima de la mascota */
.languageSwitch {
  display: flex;
  flex: 1 0 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin: -12px 0 -6px;
  font-size: 14.5px;
  color: #a9b6d3;
}

.languageOption {
  padding: 6px 8px;
  border-radius: 8px;
  color: #cfd8ee;
  text-underline-offset: 3px;

  &[aria-current="true"] {
    color: #ffd23f;
    font-weight: 800;
    text-decoration: none;
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 1px;
  }
}

.languageSeparator {
  color: #a9b6d3;
}

.downloadMascot {
  width: 124px;
  height: auto;
  flex: none;
}

.downloadHeading {
  min-width: 0;
}

.downloadTitle {
  margin: 0;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1;
  letter-spacing: 0.3px;
  font-weight: 800;
  color: #ffd23f;
  text-shadow: 0 4px 0 #0c1424;
}

.downloadTitleName {
  display: inline;
}

.downloadTitleBadge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px 6px;
  border-radius: 12px;
  font-size: 0.36em;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff5a7a, #ff3d6e);
  text-shadow: none;
  box-shadow: 0 4px 0 #0c1424;
}

.downloadLead {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 19px;
  color: #a9b6d3;
}

/* Tarjeta de Android: la única que queda; su ancho es el de una tarjeta, no el de toda la página */

.downloadMain {
  display: block;
}

.androidCard {
  position: relative;
  max-width: 520px;
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(42, 61, 104, 0.92), rgba(20, 32, 58, 0.96));
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 0 rgba(6, 10, 20, 0.55);
}

.androidCardTitle {
  margin: 0 0 4px;
  font-size: 23px;
}

.androidCardText {
  margin: 0 0 14px;
  color: #cfd8ee;
  font-size: 15.5px;
}

/* Acción principal en #play: Google Play */
.playStoreButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  min-height: 54px;
  margin-top: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8a3d, #ff3d6e);
  box-shadow: 0 5px 0 #a3243f;
  transition: transform 0.06s, box-shadow 0.06s;

  &:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #a3243f;
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

/* Acción principal en #apk y #en: el APK, con el icono de Android */
.apkDownloadButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-align: center;
  min-height: 54px;
  margin-top: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8a3d, #ff3d6e);
  box-shadow: 0 5px 0 #a3243f;
  transition: transform 0.06s, box-shadow 0.06s;

  &:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #a3243f;
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

/* Sin APK todavía: misma forma que el botón principal, apagado y sin acción */
.apkSoonButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  font-size: 17.5px;
  font-weight: 700;
  color: #a9b6d3;
  background: #22304f;
  cursor: default;
}

.apkSoonLabel {
  display: inline;
}

.apkDownloadIcon {
  flex: none;
  width: 24px;
  height: 24px;
}

.apkDownloadLabel {
  display: inline;
}

/* Requisito de Android, debajo de la acción principal */
.androidRequirement {
  margin: 10px 0 0;
  text-align: center;
  font-size: 14px;
  color: #cfd8ee;
}

/* Alternativa en #play: el APK, como botón secundario */
.apkAlternativeButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  min-height: 48px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: #2c4170;
  box-shadow: 0 5px 0 #0c1424;
  transition: transform 0.06s, box-shadow 0.06s;

  &:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0c1424;
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

.apkAlternativeIcon {
  flex: none;
  width: 22px;
  height: 22px;
}

.apkAlternativeLabel {
  display: inline;
}

/* Datos del APK: versión y tamaño a la izquierda y, a la derecha, el SHA-256 abreviado y discreto */
.apkFacts {
  margin-top: 16px;
}

.apkMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 2px;
  font-size: 14px;
  color: #cfd8ee;
}

.apkMetaInfo {
  display: inline;
}

.apkVersionLabel {
  display: inline;
}

/* A la derecha en la misma línea; cuando en el teléfono baja a su propia línea, queda a la izquierda */
.apkSha {
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: none;
  font: inherit;
  font-size: 12px;
  color: #a9b6d3;
  cursor: pointer;

  &:hover {
    color: #cfd8ee;
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 2px;
  }
}

.apkShaLabel {
  display: inline;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.apkShaValue {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Aviso de «copiado» para lectores de pantalla, sin verse */
.apkCopyStatus {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Google Play próximamente (#apk y #en): un aviso secundario, sin enlace */
.playStoreSoon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  padding: 9px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 700;
  color: #cfd8ee;
  background: rgba(255, 255, 255, 0.08);
}

/* Cómo instalar: una parte de la tarjeta, con sus pasos numerados */
.apkInstall {
  margin-top: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.apkInstallSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 15px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;

  &::-webkit-details-marker {
    display: none;
  }

  /* Flecha que gira al abrir */
  &::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    margin: -4px 4px 0 0;
    border-right: 2px solid #ffd23f;
    border-bottom: 2px solid #ffd23f;
    transform: rotate(45deg);
    transition: transform 0.15s;
  }

  .apkInstall[open] &::after {
    margin-top: 4px;
    transform: rotate(-135deg);
  }

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    &::after {
      transition: none;
    }
  }
}

.apkInstallSummaryText {
  display: inline;
}

.apkInstallSteps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 2px 16px 16px;
  list-style: none;
  counter-reset: apkStep;
  color: #cfd8ee;
  font-size: 15px;
}

/* Número en un círculo amarillo, alineado con la primera línea del paso */
.apkInstallStep {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: baseline;
  gap: 12px;
  counter-increment: apkStep;

  &::before {
    content: counter(apkStep);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    color: #14203a;
    background: #ffd23f;
  }
}

/* Capturas: una fila de tres en escritorio; una tira con desplazamiento lateral en el teléfono */

.gameShots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 0;
  border-radius: 18px;

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 4px;
  }

  @media (max-width: 640px) {
    display: flex;
    gap: 12px;
    margin: 30px -20px 0;
    padding: 0 20px 10px;
    border-radius: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: thin;
  }
}

.gameShot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: #0c1424;

  @media (max-width: 640px) {
    flex: 0 0 84%;
    min-width: 0;
    scroll-snap-align: start;
  }
}

.gameFeatures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: #a9b6d3;
  font-size: 15.5px;
}

.gameFeature {
  min-width: 0;
}

.gameFeatureTitle {
  display: block;
  color: #f3f6ff;
  font-size: 16.5px;
}

.gameFeatureText {
  display: inline;
}

/* Pie: en una fila en escritorio; en el teléfono, autor y versión arriba y los enlaces debajo */

.downloadFooter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  color: #a9b6d3;

  @media (max-width: 640px) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "byline version" "links links";
    gap: 10px 16px;
  }
}

.downloadByline {
  grid-area: byline;
}

.downloadFooterLinks {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.downloadHomeLink {
  color: inherit;
  text-underline-offset: 3px;

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

.privacyLink {
  color: inherit;
  text-underline-offset: 3px;

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

.contactLink {
  color: inherit;
  text-underline-offset: 3px;

  &:focus-visible {
    outline: 3px solid #ffd23f;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

.downloadVersion {
  grid-area: version;
  margin-left: auto;
}
