body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(
    to bottom,
    rgba(173, 216, 230, 1) 0%,
    rgba(173, 216, 230, 1) 30%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 182, 193, 1) 70%,
    rgb(174, 123, 131) 100%
  );
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  min-height: 2000px;
  max-width: 1000px;
}

a,
a:visited {
  color: #333;
}

.blue {
  color: rgb(37, 117, 209);
}
.orange {
  color: rgb(255, 102, 0);
}
.green {
  color: rgb(34, 197, 94);
}
.red {
  color: rgb(239, 68, 68);
}
.gold {
  color: #7f7305d3;
}
.menu {
  width: 100%;
  font-size: 0.8em;
  text-align: center;
}

.menu a {
  text-decoration: none;
  padding: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  text-wrap: nowrap;
}

.menu a:hover {
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

h1 {
  text-align: center;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

#controls {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#controls input,
#controls button {
  padding: 10px;
  font-size: 1rem;
}

#controls input {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
  width: 250px;
}

#controls button {
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#controls button:hover {
  background-color: #45a049;
}

#container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.station.full-width {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  grid-column: 1 / -1;
  padding: 20px;
}

.station.half-width {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 20px;
}

.station h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.station .current-info {
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.station .info {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
}

.historical-info {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 20px;
}

.station canvas {
  width: 100%;
  height: 300px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 5px solid rgba(225, 11, 11, 0.25);
  border-left-color: #0061e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.small-info {
  clear: both;
  font-size: 0.6em;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.header-container img {
  max-width: 200px;
  margin-right: 20px;
}

.header-text {
  text-align: center;
  font-size: 1.2em;
  line-height: 1.1em;
  margin: 0;
  font-weight: 600;
}

.header-text b {
  font-size: 1.2em;
  font-weight: 600;
}

.header-text span {
  font-size: 0.8em;
  font-weight: 200;
}

.warning-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.warning-text b {
  font-size: 1em;
  font-weight: 700;
}

.warning-text a {
  line-height: 1.8em;
}

/* Responsywność */
@media (max-width: 600px) {
  #controls input {
    width: 150px;
  }

  #container {
    grid-template-columns: 1fr;
  }

  .header-container {
    flex-direction: column;
  }

  .header-container img {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .header-text {
    font-size: 1em;
  }

  .header-text b {
    font-size: 1.1em;
  }

  .header-text span {
    font-size: 0.7em;
  }
}
canvas {
  image-rendering: pixelated; /* Zoptymalizowanie renderowania dla ostrości */
  width: 100% !important;
  height: auto !important;
}
.refresh-btn i {
  font-size: 1.2rem;
  color: #333;
  transition: transform 0.3s ease;
}

.refresh-btn:hover i {
  transform: rotate(180deg);
}

.river {
  color: rgb(0, 88, 188);
  font-weight: 800;
  text-transform: uppercase;
}

.data {
  font-size: 0.6em;
  text-wrap: nowrap;
}

#rain {
  text-align: center;
  width: 100%;
  color: #0b4495;
  margin-top: 20px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.grey,
.grey a,
.grey a:visited {
  color: #888 !important;
}

.label {
font-size: 0.8em;
padding-left: 3px; 
padding-right: 3px;
background-color: #888888;
color: #dddddd;
border-radius: 3px;
font-weight: bold;
}

/* Nowoczesne style dla newsów */
.news-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.news-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid transparent;
  transition: all 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15), 0 6px 15px rgba(0, 0, 0, 0.1);
}

.news-item.info {
  border-left-color: #3b82f6;
}

.news-item.success {
  border-left-color: #10b981;
}

.news-item.warning {
  border-left-color: #f59e0b;
}

.news-item.danger {
  border-left-color: #ef4444;
}

.news-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  position: relative;
}

.news-close {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.news-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transform: scale(1.1);
}

.news-icon {
  font-size: 1.3em;
  padding: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s ease;
  height: 25px;
  width: 25px;
  text-align: center;
  margin-right: 20px;
}

.news-icon:hover {
  transform: scale(1.1);
}

.news-content {
  flex: 1;
}

.news-title {
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2937;
  margin-bottom: 8px;
}

.news-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-title a:hover {
  color: #3b82f6;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  color: #6b7280;
}

.news-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8em;
}

.news-link {
  display: inline-flex;
  font-size: 0.8em;
}

.news-date i {
  font-size: 0.9em;
}

.news-pulse {
  position: relative;
}

.news-pulse::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

/* Responsywność dla newsów */
@media (max-width: 600px) {
  .news-item {
    padding: 15px;
  }
  
  .news-header {
    gap: 10px;
  }
  
  .news-icon {
    font-size: 1.1em;
    padding: 6px;
  }
  
  .news-title {
    font-size: 1em;
  }
  
  .news-meta {
    font-size: 0.8em;
  }
}

.news-description {
  font-size: 0.8em;
  margin-bottom: 10px;
}