/* ================================================
   DASHBOARD LAVORATIVA - DANY
   Stili principali per la dashboard
   ================================================ */

/* NASCONDERE LA BARRA DI SCORRIMENTO */
html {
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer e Edge */
}

body {
  overflow-x: hidden;
  padding: 20px;
  font-size: 1.1rem;
  background-color: #121212;
  color: #ffffff;
}

/* Webkit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* ================================================
   LAYOUT PRINCIPALE
   ================================================ */

.time-display {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

h4 {
  color: #ffffff;
}

/* ================================================
   WIDGET METEO
   ================================================ */

.weather-icon {
  font-size: 2rem;
}

.weather-main-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.weather-unified-box {
  background: #1e1e1e;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 800px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.weather-unified-box.dark-theme {
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000, 0 0 3px rgba(0, 0, 0, 0.8);
}

.weather-unified-box.light-theme {
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000, 0 0 3px rgba(0, 0, 0, 0.8);
}

.weather-unified-box.dark-theme .weather-current {
  border-right-color: rgba(255, 255, 255, 0.6);
}

.weather-unified-box.light-theme .weather-current {
  border-right-color: rgba(0, 0, 0, 0.6);
}

.weather-unified-box.dark-theme .weather-info-extra {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000, 0 0 2px rgba(0, 0, 0, 0.8);
}

.weather-unified-box.light-theme .weather-info-extra {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000, 0 0 2px rgba(0, 0, 0, 0.8);
}

.weather-unified-box .weather-icon {
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

.weather-current {
  text-align: center;
  min-width: 200px;
  border-right: 2px solid #333;
  padding-right: 20px;
}

.weather-current .weather-icon {
  font-size: 3rem;
  margin-top: 10px;
  margin-bottom: 10px;
}

.weather-current .temp-main {
  font-size: 2.8rem;
  font-weight: bold;
  margin: 10px 0;
}

.weather-forecast-row {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.weather-forecast-box {
  text-align: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  min-width: 85px;
  transition: transform 0.2s ease;
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
}

.weather-forecast-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.weather-forecast-icon {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.weather-info-extra {
  font-size: 1rem;
  color: #aaaaaa;
  margin-top: 10px;
}

/* ================================================
   LISTE E CONTENUTI
   ================================================ */

.list-group-item b {
  margin-right: 0.5rem;
}

.list-group-item {
  background-color: #1e1e1e;
  color: #ffffff;
  border-color: #333;
}

.list-group-item-success {
  background-color: #2e7d32 !important;
  color: #ffffff;
}

.list-group-item.text-muted {
  color: #bbbbbb !important;
}

.list-group-item.text-danger {
  color: #ff6b6b !important;
}

.list-group-horizontal .list-group-item.bg-light {
  background-color: #2c2c2c !important;
  color: #ffffff;
}

.list-group-item.todo-domani {
  background-color: #3399ff !important;
  color: #ffffff;
  border-color: #3399ff;
}

.list-group-item.todo-pending {
  background-color: #a83636ff !important;
  color: #ffffff;
  border-color: #a83636ff;
}

/* ================================================
   TICKER NEWS E OROSCOPO
   ================================================ */

#news-ticker,
#oroscopo-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding: 10px 0;
  background-color: #222;
  color: #fff;
  font-size: 1.8rem;
  overflow: hidden;
  z-index: 9999;
  border-top: 1px solid #444;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.8s ease;
}

#oroscopo-ticker {
  z-index: 9998;
  font-size: 1.6rem;
  background-color: #184169;
  border-top: 1px solid #555;
}

#news-ticker.ticker-visible,
#oroscopo-ticker.ticker-visible {
  transform: translateY(0%);
  opacity: 1;
}

#news-ticker.ticker-hidden,
#oroscopo-ticker.ticker-hidden {
  transform: translateY(100%);
  opacity: 0;
}

#news-ticker.shifted-up {
  transform: translateY(-60px);
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
}

/* ================================================
   REFRESH COUNTER
   ================================================ */

#refresh-counter {
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-family: monospace;
  margin: 20px auto;
  width: fit-content;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
  .weather-unified-box {
    flex-direction: column;
    text-align: center;
  }

  .weather-current {
    border-right: none;
    border-bottom: 2px solid #444;
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .weather-forecast-row {
    justify-content: center;
  }
}

/* ================================================
   ANIMAZIONI ICONE METEO
   ================================================ */

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(4px);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes flicker {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    opacity: 1;
  }
  20%,
  24%,
  55% {
    opacity: 0.6;
  }
}

@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 5px currentColor;
  }
  50% {
    text-shadow: 0 0 15px currentColor, 0 0 20px currentColor;
  }
}

/* SOLE - Giallo brillante con rotazione */
.wi-day-sunny {
  color: #ffd700;
  animation: rotate 8s linear infinite, glow 3s ease-in-out infinite;
}

/* SOLE NOTTURNO - Giallo pallido */
.wi-night-clear {
  color: #f0e68c;
  animation: rotate 12s linear infinite, glow 4s ease-in-out infinite;
}

/* NUVOLE GIORNO - Bianco/grigio con movimento */
.wi-day-cloudy {
  color: #87ceeb;
  animation: float 4s ease-in-out infinite;
}

/* NUVOLE NOTTE - Grigio scuro */
.wi-night-cloudy {
  color: #708090;
  animation: float 5s ease-in-out infinite;
}

/* NUVOLE GENERICHE - Grigio chiaro */
.wi-cloud,
.wi-cloudy {
  color: #b0c4de;
  animation: float 4s ease-in-out infinite;
}

/* PIOGGIA - Blu con movimento */
.wi-showers {
  color: #4682b4;
  animation: sway 2s ease-in-out infinite;
}

/* PIOGGIA INTENSA - Blu scuro */
.wi-day-hail,
.wi-night-hail {
  color: #1e90ff;
  animation: bounce 1.5s ease-in-out infinite;
}

/* TEMPORALE - Giallo elettrico con lampeggio */
.wi-thunderstorm {
  color: #ffd700;
  animation: flicker 1.5s infinite;
}

/* NEVE - Bianco/azzurro con caduta */
.wi-snow {
  color: #f0f8ff;
  animation: bounce 3s ease-in-out infinite;
  text-shadow: 0 0 10px #87ceeb;
}

/* NEBBIA - Grigio con pulsazione */
.wi-fog {
  color: #c0c0c0;
  animation: glow 3s ease-in-out infinite;
}

/* ICONA FALLBACK */
.wi-na {
  color: #696969;
  animation: glow 4s ease-in-out infinite;
}

/* ANIMAZIONI PIÙ INTENSE PER ICONE GRANDI */
.weather-current .wi-day-sunny {
  animation: rotate 6s linear infinite, glow 2s ease-in-out infinite;
  font-size: 3.5rem !important;
}

.weather-current .wi-night-clear {
  animation: rotate 8s linear infinite, glow 3s ease-in-out infinite;
  font-size: 3.5rem !important;
}

.weather-current .wi-thunderstorm {
  animation: flicker 1s infinite;
  font-size: 3.5rem !important;
  text-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700;
}

.weather-current .wi-snow {
  animation: bounce 2s ease-in-out infinite;
  font-size: 3.5rem !important;
  text-shadow: 0 0 15px #87ceeb, 0 0 25px #87ceeb;
}

/* HOVER EFFECTS */
.weather-forecast-box:hover .weather-forecast-icon {
  transform: scale(1.2);
  transition: transform 0.3s ease;
  filter: brightness(1.3);
}

/* EFFETTI SPECIALI PER CONDIZIONI PARTICOLARI */
.weather-current .wi-day-cloudy,
.weather-current .wi-night-cloudy {
  animation: float 3s ease-in-out infinite;
  font-size: 3.5rem !important;
}

.weather-current .wi-showers {
  animation: sway 1.5s ease-in-out infinite;
  font-size: 3.5rem !important;
  text-shadow: 0 0 10px #4682b4;
}
