/* ===================== */
/* Animated Background Sky */
/* ===================== */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(270deg, #a2d2ff, #ffe8d6, #ffd6a5, #caffbf, #bdb2ff);
  background-size: 1000% 1000%;
  animation: skyShift 20s ease infinite;
}

@keyframes skyShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===================== */
/* Animated Heading */
/* ===================== */
.animated-heading {
  font-size: 2em;
  color: #2a4d69;
  margin-bottom: 25px;
  opacity: 0;
  position: relative;
  animation: slideDown 1.5s ease forwards;
}

.animated-heading::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background-color: #f4a261;
  margin: 10px auto;
  border-radius: 5px;
  animation: underline 1.5s ease forwards 1.2s;
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-40px); color: #64b5f6; }
  100% { opacity: 1; transform: translateY(0); color: #2a4d69; }
}

@keyframes underline {
  from { width: 0; }
  to { width: 140px; }
}

/* ===================== */
/* Table Fade-in */
/* ===================== */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.5s ease forwards 0.8s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== */
/* Table Styling */
/* ===================== */
.weather-table {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  border-collapse: collapse;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: #fffdf8;
}

.weather-table th, .weather-table td {
  border: 1px solid #ccc;
  padding: 14px;
  text-align: center;
  transition: all 0.4s ease;
}

/* Transform color animation */
.weather-table td:hover {
  background: linear-gradient(135deg, #ffd6a5, #caffbf);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.weather-table th {
  background-color: #f1f8e9;
  font-weight: bold;
  color: #2e7d32;
}

.weather-table td {
  background-color: #fff3e0;
  font-size: 1.1em;
}

.weather-table tr:nth-child(even) td {
  background-color: #fffde7;
}

/* ===================== */
/* Button Styling */
/* ===================== */
.report-btn {
  background-color: #cbb3ff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
.report-btn:hover {
  background-color: #b39ddb;
  color: white;
  transform: scale(1.1);
}

/* ===================== */
/* Weather Animations */
/* ===================== */
.sun::before {
  content: "☀️";
  display: inline-block;
  font-size: 1.5em;
  animation: spin 5s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rain::before {
  content: "🌧️";
  font-size: 1.5em;
  position: relative;
  animation: drop 1s linear infinite;
}
@keyframes drop {
  0% { top: 0; opacity: 1; }
  100% { top: 10px; opacity: 0.5; }
}

.wind::before {
  content: "💨";
  display: inline-block;
  font-size: 1.5em;
  animation: blow 2s ease-in-out infinite alternate;
}
@keyframes blow {
  0% { transform: translateX(0px); opacity: 1; }
  100% { transform: translateX(10px); opacity: 0.7; }
}

/* ===================== */
/* Decorative Pseudo-elements */
/* ===================== */
.weather-table::before {
  content: "🌦️";
  font-size: 2em;
  position: absolute;
  left: 8%;
  top: -25px;
  opacity: 0.3;
}

.weather-table::after {
  content: "☁️☀️🌧️";
  position: absolute;
  right: 10%;
  bottom: -30px;
  opacity: 0.3;
  font-size: 1.5em;
}

/* ===================== */
/* Responsive Design */
/* ===================== */
@media (max-width: 768px) {
  .animated-heading { font-size: 1.6em; }
  .weather-table th, .weather-table td { padding: 10px; font-size: 0.9em; }
  .report-btn { padding: 6px 10px; font-size: 0.85em; }
  body { padding: 20px 10px; }
}

@media (max-width: 500px) {
  .weather-table, .weather-table thead, .weather-table tbody, .weather-table th, .weather-table td, .weather-table tr {
    display: block;
    width: 100%;
  }

  .weather-table tr {
    margin-bottom: 12px;
    background: #fff8e1;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    padding: 10px;
  }

  .weather-table th { display: none; }

  .weather-table td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
  }

  .weather-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
    color: #2e7d32;
  }

  .animated-heading { font-size: 1.4em; }
  .report-btn { width: 100%; }
}