/* Colors follow the color scheme of the system. The :root selector outranks
   the html rule of Bulma, which is loaded after this file. */
:root {
  color-scheme: light dark;
  --page-background: #f4f4f4;
  --main-background: white;
  --main-color: #4a4a4a;
  --links-background: #ffffff;
  --links-border: #ccc;
  --links-color: black;
  --links-hover-background: #f1f1f1;
  background-color: var(--page-background);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-background: #1e2124;
    --main-background: #262b2f;
    --main-color: #e0e0e0;
    --links-background: #2f3439;
    --links-border: #45494d;
    --links-color: #e0e0e0;
    --links-hover-background: #3a3f44;
  }
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #009688 0%, var(--page-background) 100%);
}

header {
  position: relative;
  text-align: center;
  padding: 20px;
  background-color: transparent;
  width: 100%;
  color: white;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 1.5em;
}

.logo {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.25)); /* Attorno al logo */
}

.github-container {
  text-align: center;
  margin-top: 0px;
}

main {
  max-width: 800px;
  margin: 20px;
  padding: 20px;
  background-color: var(--main-background);
  color: var(--main-color);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2); /* Ombra interna su tutto il perimetro del box */
  width: 90%;
  border-radius: 8px; /* Aggiunto bordo arrotondato */
}

table {
  margin-left: auto;
  margin-right: auto;
}

.description {
  margin-bottom: 20px;
}

/* The screenshots of each OS differ in aspect ratio; the box keeps the one of
   the tallest (macOS), so the buttons below do not move when it switches. */
.screenshot img {
  width: 100%;
  aspect-ratio: 3164 / 1922;
  object-fit: contain;
  margin-bottom: 20px;
}

.download-section {
  text-align: center;
  margin-top: -10px;
}

.download-container {
  position: relative;
  display: inline-block;
}

.download-button {
  background-color: #009688;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 10px;
  cursor: pointer;
  font-size: 1em;
  border-radius: 4px; /* Aggiunto bordo arrotondato */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Aggiunta ombra al pulsante */
}

.download-button:hover {
  background-color: #00695c;
}

.arrow {
  display: inline-block;
  margin-left: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transition: transform 0.2s;
}

ion-icon {
  padding-right: 10px;
}

.arrow.down {
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

.arrow.up {
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}

.download-links {
  display: none;
  background-color: var(--links-background);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--links-border); /* Aggiunto bordo */
  border-radius: 4px; /* Aggiunto bordo arrotondato */
  margin-bottom: 20px; /* Aggiunto margine inferiore */
  max-height: calc(100vh - 150px); /* Limite altezza massima del pannellino */
  overflow-y: auto; /* Permette lo scorrimento verticale */
}

.download-links {
  position: static;
  transform: none;
  margin: 10px auto;
  max-height: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Aggiorna ombra */
}

.download-links a {
  color: var(--links-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.download-links a:hover {
  background-color: var(--links-hover-background);
}

.social-container {
  text-align: center;
}

footer {
  text-align: center;
  padding: 10px;
  width: 100%;
  color: #009688;
}

/* Media Queries for Responsiveness */
@media (min-width: 870) {
  .download-button {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .github-container {
    margin-top: 0px;
  }

  .social-container {
    margin-top: 0px;
  }

  .download-button {
    padding: 8px 16px;
    font-size: 0.9em;
  }

  .arrow {
    border-width: 0 1.5px 1.5px 0;
    padding: 3px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 75px;
  }

  main {
    padding: 10px;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.2em;
  }

  .download-button {
    padding: 6px 12px;
    font-size: 0.8em;
  }
}
