/* Impostazioni base */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #b30000; /* rosso acceso */  
  color: #fff;
  
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90dvh;
  display: flex;
  flex-direction: column;
  padding: 24px;

  transition: opacity 4s ease;

  background: linear-gradient(45deg,
    #0f0c29,
    #302b63,
    #24243e,
    #3a0ca3,
    #7209b7
  );
  
  /*background-attachment: scroll;*/
  background-size: cover;
  background-image: url("/img/home.jpg");
  background-repeat: no-repeat;

  background-attachment: fixed; /* fissa lo sfondo anche durante lo scroll */
  background-position: center;
  background-repeat: no-repeat;
  overflow-y: auto;             /* permette lo scroll verticale */
}

body.loaded {
  
}

a {
  color: #fff;
  text-decoration: none;

  opacity: 0.9;
}

a:hover {
  opacity: 1;
}

/* Layout principale con Flexbox */
main {
  display: flex;
  flex-direction: column;
  /*
  gap: 1rem;
  width: 90%;
  max-width: 400px;
  */
  margin-top:70px;
}

/* Generic shared styles */

.box {
  background-color: rgba(0,0,0,0.3);
  margin: 1em;
  padding: 1em;

  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.right {
  text-align: right;
}

.tiles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tiles > * 
{
  border:1px solid red;
    text-align: center;
    margin: 1em;
    display: flex;
    flex-direction: row;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

#map {
  left: 0px;
  width:80vw;
  height:50vh;
}

/* Pagine */

body.page_home
{
  background-image: url("/img/home.jpg");
}

body.page_about
{
  background-image: url("/img/about.jpg");
}

/* Pulsanti/link */
.btn {
  display: block;
  text-align: center;
  margin: 0.5em;  
  padding: 0.5em;
  padding-left:3em;
  padding-right:3em;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 1.3em;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.15);
}

.message_single
{
  font-size:3em;
  
  opacity: 0.6;
}

/* Pulsante in alto a destra */
#homeButton {
  position: fixed;
  top: 12px;
  right: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 3em;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
  opacity: 0.5;
}

#homeButton img {
  width: 90px;
}

#adminButton {
  position: absolute;
  top: 12px;
  right: 82px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}

#topButton:hover {
  background: rgba(255, 255, 255, 0.4);
}

#livenowbanner {
  position: fixed;
  top: 12px;
  left: -40px;
  transform: rotate(-45deg);
  background: linear-gradient(90deg, #ff0066, #ffcc00);
  color: #fff;
  font-weight: 700;
  padding: 6px 50px;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  letter-spacing: 1px;
}

/* Scrollbar stile cyberpunk blu su dark theme */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #000; /* sfondo nero pieno */
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #007bff, #00b4ff);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 140, 255, 0.7);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #33ccff, #3399ff);
  box-shadow: 0 0 16px rgba(51, 204, 255, 0.9);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #00b4ff #000;
}


/* Mobile friendly */
@media (max-width: 600px) {
  .btn {
    font-size: 1rem;
    padding: 0.9rem;
  }

  #topButton {
    font-size: 1rem;
    padding: 8px 12px;
  }
}
