
    html, body {
      margin: 0; padding: 0;
      height: 100vh;
      font-family: Arial, sans-serif;
      display: flex;
      flex-direction: column;
    }
    #map {
      flex-grow: 1;
      width: 100%;
      position: relative;
    }
    /* Panel ostrzeżeń po lewej */
    #alertsPanel {
      position: fixed;
      top: 10px;
      left: 10px;
      width: 300px;
      max-height: 80vh;
      overflow-y: auto;
      background: white;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      padding: 15px;
      z-index: 7000;
      font-size: 15px;
    }
    #alertsPanel h4 {
      margin-top: 0;
      margin-bottom: 10px;
      font-weight: bold;
      font-size: 18px;
      color: #004080;
      text-align: center;
    }
    .alertItem {
      padding: 10px 12px;
      border-radius: 6px;
      margin-bottom: 12px;
      box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
      cursor: default;
      user-select: none;
      color: #000;
    }
    .alertItem:hover {
      box-shadow: inset 0 0 12px rgba(0,0,0,0.15);
    }
    .alertTitle {
      font-weight: bold;
      font-size: 16px;
      margin-bottom: 6px;
      color: #004080;
    }
    .scale1 { background-color: #adebad; }
    .scale2 { background-color: #ffff7d; }
    .scale3 { background-color: #ffbb33; }
    .scale4 { background-color: #ef5350; color: white; }
    #legend {
      position: fixed;
      bottom: 60px; /* wyżej niż pasek dat */
      right: 15px;
      background: white;
      padding: 10px 15px;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      font-size: 14px;
      z-index: 5000;
      max-width: 220px;
    }
    #legend h4 {
      margin-bottom: 8px;
      color: #0077cc;
    }
    .legend-item {
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .color-box {
      width: 20px;
      height: 20px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    /* Pasek z datami */
    #dateFilter {
      position: fixed;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      padding: 6px 10px;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      font-size: 14px;
      z-index: 6000;
      display: flex;
      gap: 8px;
      max-width: 90vw;
      overflow-x: auto;
      white-space: nowrap;
    }
    #dateFilter button {
      cursor: pointer;
      background: #0077cc;
      border: none;
      color: white;
      padding: 6px 12px;
      border-radius: 4px;
      font-weight: bold;
      flex-shrink: 0;
      white-space: nowrap;
      user-select: none;
      transition: background-color 0.3s;
    }
    #dateFilter button:hover {
      background-color: #005fa3;
    }
    #dateFilter button.active {
      background-color: #004080;
      box-shadow: 0 0 5px #004080;
    }
    /* Popup styling */
    .leaflet-popup-content-wrapper {
      border-radius: 12px !important;
      box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
      font-size: 14px !important;
      color: #333 !important;
      background: #fafafa !important;
      padding: 15px !important;
      min-width: 500px !important;
      max-width: 700px !important;
      box-sizing: border-box;
      animation: fadeInPop 0.3s ease forwards;
    }
    .leaflet-popup-content {
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      box-sizing: border-box;
      white-space: normal !important;
    }
    .leaflet-popup-content p {
      margin: 4px 0;
    }
.leaflet-popup-content strong {
    display: inline-block;
    font-weight: 600;
    color: #0077cc;
    /* width: 130px; */ /* ZAKOMENTOWANA LUB USUNIĘTA LINIA */
}
    .leaflet-popup-content ul {
      padding-left: 1em !important;
      margin: 0 !important;
      list-style-type: none;
      width: 100% !important;
      box-sizing: border-box;
    }
    .leaflet-popup-content li {
      width: 100% !important;
      box-sizing: border-box;
      padding: 8px 0;
      border-bottom: 1px solid #ddd;
    }
    .leaflet-popup-content li:last-child {
      border-bottom: none;
    }
    .leaflet-popup-content li > div {
      margin-top: 4px;
      font-size: 13px;
      color: #555;
    }
    .leaflet-popup-tip-container {
      filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    }
    @keyframes fadeInPop {
      from {opacity: 0; transform: translateY(10px);}
      to {opacity:1; transform: translateY(0);}
    }
	
#rain-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    font-family: sans-serif;
    display: none; /* Domyślnie ukryta */
}

#rain-legend .legend-item {
    height: 18px;
    line-height: 18px;
    color: black;
    text-align: right;
    padding-right: 5px;
    font-size: 11px;
    font-weight: bold;
}

        #map {
            height: 100vh;
            width: 100%;
        }
        .cross-marker {
            width: 18px;
            height: 18px;
            background-color: transparent;
        }
        .cross-marker-inner {
            position: absolute;
        }
        .info.legend {
            background: white;
            padding: 10px;
            font-size: 12px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0,0,0,0.3);
            line-height: 18px;
            display: none;
        }
        .leaflet-control-layers-list {
            padding-right: 20px;
        }
        #timeline {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            background: white;
            padding: 10px;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        #timeline button {
            background: #f0f0f0;
            border: 1px solid #ccc;
            padding: 5px 12px;
            cursor: pointer;
            border-radius: 3px;
            font-weight: bold;
        }
        #timeline button.active {
            background: #0077cc;
            color: white;
            border-color: #005f9c;
        }
        .leaflet-pane.leaflet-labels-pane {
            z-index: 650;
            pointer-events: none;
        }
        /* Style dla połączonej legendy */
        #combined-legend {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.8);
            padding: 10px;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
            font-family: sans-serif;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        #combined-legend h4 {
            margin: 0 0 5px;
        }
        .legend-section {
            display: none;
        }
        .legend-section.active {
            display: block;
        }
        .legend-item {
            display: flex;
            align-items: center;
        }
        .legend-item .color-box {
            width: 10px;
            height: 10px;
            margin-right: 5px;
            border-radius: 50%;
        }
        #rain-legend-section .legend-item {
            height: 18px;
            line-height: 18px;
            color: black;
            text-align: right;
            padding-right: 5px;
            font-size: 11px;
            font-weight: bold;
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }
        #rain-legend-section .legend-item {
            background-color: var(--color);
        }

        /* Przycisk do ukrywania legendy dla urządzeń mobilnych */
        #legend-toggle {
            display: none;
            position: absolute;
            bottom: 90px;
            right: 10px;
            z-index: 1001;
            background: #fff;
            border: 1px solid #ccc;
            padding: 10px;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0,0,0,0.3);
            cursor: pointer;
            font-weight: bold;
        }

        /* Ustawienie wyświetlania dla urządzeń mobilnych */
        @media (max-width: 768px) {
            #combined-legend {
                display: none;
                bottom: 120px;
            }
            #legend-toggle {
                display: block;
            }
        }

        /* Styl dla wyświetlania godziny obrazka */
        #image-time-display {
            position: absolute;
            top: 90px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            background: rgba(255, 255, 255, 0.8);
            padding: 5px 10px;
            border-radius: 5px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
            font-weight: bold;
            font-family: sans-serif;
        }
        .leaflet-image-layer img {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
            image-rendering: pixelated;
        }
		.custom-weather-icon {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    text-align: center;
    font-family: sans-serif;
    font-size: 12px;
}