    /* Imposta Nunito Sans per tutta la pagina */
    body,
    html {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: 'Nunito Sans', sans-serif;
      display: flex;
      flex-direction: column;
    }

    #map {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 100%;
    }

    .mapboxgl-ctrl-bottom-right {
      display: none;
    }

    header {
      background-color: #000e3a;
      color: white;
      text-align: center;
      padding: 10px 0;
      height: 9vh;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      z-index: 10;
    }

    .loghi {
      height: 100%;
      display: flex;
      align-items: center;
    }

    footer {
      background-color: #cc0001;
      color: white;
      text-align: center;
      padding: 8px 0;
      margin-top: auto;
      height: 5vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Logo positioning */
    .logo-left,
    .logo-right {
      position: relative;

    }

    .logo-left {
      left: 10px;
      height: 100%;
      z-index: 100;
      border-radius: 5px;
      box-shadow: 2px 2px 3px 3px rgb(0 0 0 / 50%);
    }

    .logo-right {
      height: 100%;
      right: 10px;
      z-index: 100;
      border-radius: 5px;

    }

    #map {
      flex: 1;
      position: relative;
    }

    .mapboxgl-marker {
      cursor: pointer;
      pointer-events: auto;
    }

    .custom-marker {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid #000;
      box-shadow: 0 0 10px 1px rgb(255 255 255 / 50%);
      transition: transform 0.2s ease;
      pointer-events: auto;
      /* Assicura che l'hover funzioni */
    }

    .ports-marker {
      width: 13px;
      height: 13px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid #000;
      box-shadow: inset 0 0 3px 2px rgb(0 0 0 / 63%);
      transition: transform 0.2s ease;
      pointer-events: auto;
      background-color: #0ae3ef;
    }

    /* Ingrandimento al passaggio del mouse */
    .custom-marker:hover {
      transform: scale(1.1);
      z-index: 1000;
      /* porta in primo piano se necessario */
    }

    .popup-table {
      border-collapse: collapse;
      table-layout: fixed;
      width: 100%;
      /* occuperà tutta la larghezza del popup */
      text-align: center;
      font-size: 12px;
      margin-top: 5px;
      background-color: white;
      color: black;
    }

    .popup-table th,
    .popup-table td {
      border: 1px solid #000e3a;
      padding: 4px;
      width: 100px;
      /* larghezza fissa colonne */
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .popup-table th {
      background-color: #c4c4c4;
      color: #000;
    }

    /* Stile popup personalizzato */
    .mapboxgl-popup-content {
      background-color: #000e3a !important;
      border-radius: 5px;
      color: #fff;
      padding: 10px;
      font-family: 'Nunito Sans', sans-serif;
      width: 360px;
      /* larghezza fissa del popup */
      box-sizing: border-box;
      border: solid 1px white;
    }

    .mapboxgl-popup-content h3 {
      margin: 0 0 5px;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
    }

    /* Colore della freccia del popup */
    .mapboxgl-popup-tip {
      border-top-color: #ffffff !important;
    }

    /* Overlay che copre tutta l’area mappa */
    #loader {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #000e3a70;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      /* sopra header/footer e marker */
    }

    #loader {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #000e3a70;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    /* nuovo container animato */
    .container {
      width: 250px;
      height: 250px;
      padding: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .cloud {
      position: absolute;
      width: 250px;
    }

    .front {
      padding-top: 45px;
      margin-left: 25px;
      z-index: 11;
      animation: clouds 8s infinite ease-in-out;
    }

    .back {
      margin-top: -30px;
      margin-left: 150px;
      z-index: 12;
      animation: clouds 12s infinite ease-in-out;
    }

    .left-front,
    .left-back,
    .right-front,
    .right-back {
      display: inline-block;
      background-color: #4c9beb;
      z-index: 5;
    }

    .left-front {
      width: 65px;
      height: 65px;
      border-radius: 50% 50% 0% 50%;
    }

    .right-front {
      width: 45px;
      height: 45px;
      border-radius: 50% 50% 50% 0%;
      margin-left: -25px;
    }

    .left-back {
      width: 30px;
      height: 30px;
      border-radius: 50% 50% 0% 50%;
    }

    .right-back {
      width: 50px;
      height: 50px;
      border-radius: 50% 50% 50% 0%;
      margin-left: -20px;
    }

    .sun {
      width: 120px;
      height: 120px;
      background: linear-gradient(to right, #fcbb04, #fffc00);
      border-radius: 60px;
      position: absolute;
    }

    .sunshine {
      animation: sunshines 2s infinite;
    }

    @keyframes sunshines {
      0% {
        transform: scale(1);
        opacity: 0.6;
      }

      100% {
        transform: scale(1.4);
        opacity: 0;
      }
    }

    @keyframes clouds {
      0% {
        transform: translateX(15px);
      }

      50% {
        transform: translateX(0);
      }

      100% {
        transform: translateX(15px);
      }
    }



    .control {
      position: absolute;
      bottom: 8vh;
      /* distanza dal fondo (adatta a seconda di footer) */
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 10px;
      z-index: 1000;
      /* sopra marker, loader, ecc. */
    }



    /* From Uiverse.io by gharsh11032000 */
    .animated-button {
      position: relative;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 16px 36px;
      border: 4px solid;
      border-color: transparent;
      font-size: 16px;
      background-color: white;
      border-radius: 100px;
      font-weight: 600;
      color: #000e3a;
      box-shadow: 0 0 0 2px #c42027;
      cursor: pointer;
      overflow: hidden;
      transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .animated-button svg {
      position: absolute;
      width: 24px;
      fill: #000e3a;
      z-index: 9;
      transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .animated-button .arr-1 {
      right: 16px;
    }

    .animated-button .arr-2 {
      left: -25%;
    }

    .animated-button .circle {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 20px;
      background-color: #000e3a;
      border-radius: 50%;
      opacity: 0;
      transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .animated-button .text {
      position: relative;
      z-index: 1;
      transform: translateX(-12px);
      transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .animated-button:hover {
      box-shadow: 0 0 0 12px transparent;
      color: white;
      border-radius: 12px;
    }

    .animated-button:hover .arr-1 {
      right: -25%;
    }

    .animated-button:hover .arr-2 {
      left: 16px;
    }

    .animated-button:hover .text {
      transform: translateX(12px);
    }

    .animated-button:hover svg {
      fill: white;
    }

    .animated-button:active {
      scale: 0.95;
      box-shadow: 0 0 0 4px #000e3a;
    }

    .animated-button:hover .circle {
      width: 220px;
      height: 220px;
      opacity: 1;
    }


    .mapboxgl-popup-content .popup-note {
      margin: 6px 0 0;
      font-size: 14px;
      color: #ffcc26;
      /* un giallo “Navimeteo” */
      text-align: center;
      font-style: italic;
    }

    #legend {
      position: absolute;
      bottom: 8vh;
      /* regola se serve */
      right: 10px;
      width: 140px;
      background-color: rgba(255, 255, 255, 0.8);
      color: #000;
      padding: 8px;
      border-radius: 4px;
      font-size: 13px;
      line-height: 1.4;
      z-index: 1000;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    #legend h4 {
      margin: 0 0 6px;
      font-size: 14px;
      text-align: center;
    }

    .legend-item {
      display: flex;
      align-items: center;
      margin-bottom: 4px;
      font-size: larger;
    }

    .legend-swatch {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      margin-right: 6px;
      border: 1px solid #000;
    }

    .legend-swatch.purple {
      background-color: purple;
    }

    .legend-swatch.red {
      background-color: red;
    }

    .legend-swatch.yellow {
      background-color: yellow;
    }

    .legend-swatch.green {
      background-color: #14e305;
    }

    #title {
      position: absolute;
      top: 9.5vh;
      left: 0%;
      padding-left: 20px;
      padding-right: 20px;
      padding-top: 12px;
      /* transform: translateX(-50%); */
      margin: auto;
      width: 430px;
      background: linear-gradient(90deg, rgba(0, 14, 58, 1) 0%, rgba(30, 56, 158, 1) 100%);
      color: rgb(255 255 255);
      font-family: 'Nunito Sans', sans-serif;
      font-size: medium;
      border-bottom-right-radius: 15px;
      align-content: center;
      box-shadow: 2px 2px 2px black;
    }




    /* Freccetta del popup */
    .mapboxgl-popup.ports-popup-container .mapboxgl-popup-tip {
      display: none;
      /*border-top-color: #005f6b !important;*/
    }

    /* Titolo del porto */
    .ports-popup__title {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      width: auto;
      color: #fff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
      z-index: 2;
    }