:root {
  --h1-color: rgba(30, 144, 255, 0.60);
  --shadow: rgba(0, 0, 0, 0.2);
  --shadow-white: rgba(255, 255, 255, 0.2);
  --city-border-color: #007BFF;
  --city-focus-shadow: rgba(0, 123, 255, 0.5);
  --forecast-bg: rgba(30, 144, 255, 0.40);
  --table-th-bg: rgba(95, 175, 255, 0.5);
  --table-th-color: #fff;
}

body {
  font-family: Arial, sans-serif;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

#skyBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/sky.png");
  background-size: cover;
  z-index: 0;
}

#houseWithCharacters {
  position: relative;
  width: 300px;
  margin: 0 auto;
  z-index: 1;
  text-align: center;
}

#houseWithCharacters img {
  height: auto;
  max-width: 100%; 
}

#mainContainer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 20px;
  gap: 10px;
}

h1 {
  font-size: 26px;
  color: var(--h1-color);
  text-shadow: 2px 2px 3px var(--shadow);
  margin-bottom: 10px;
}

.input-wrapper h1 {
  margin: 0;
}

#city {
  width: 200px;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  outline: none;
  font-size: 14px;
  box-shadow: 0 4px 8px var(--shadow);
}

#city:focus {
  border-color: var(--city-border-color);
  box-shadow: 0 0 5px var(--city-focus-shadow);
}

.input-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px; 
  width: auto; 
  margin-bottom: 15px;
}

#suggestions {
  position: absolute;
  top: 100%;
  right: 0;
  width: 50%;
  max-height: 120px;
  overflow-y: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 6px var(--shadow);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1000;
}

#suggestions.show {
  opacity: 1;
}

.suggestion {
  padding: 5px;
  cursor: pointer;
}

.suggestion:hover {
  background-color: #f8f8f8;
}

#forecastContainer {
  width: auto; 
  max-width: 100%; 
  margin-top: 10px;
  background: var(--forecast-bg);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 8px 20px var(--shadow);
  text-align: center;
  z-index: 2;
}

#forecast {
  margin-top: 0;
}

.weather-icon {
  position: relative;
  width: 60px;
  height: 60px;
  cursor: pointer;
  margin: 0 auto; 
  display: block; 
}

.weather-icon .weather,
.weather-icon .graph {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 1.0s, opacity 3.0s;
}

.weather-icon .graph {
  opacity: 0;
}

.weather-icon:hover .weather {
  transform: scale(1.5);
  opacity: 0;
}

.weather-icon:hover .graph {
  opacity: 1;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--shadow);
  z-index: 10;
}

.modal-content {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  width: 350px;
  position: relative;
  z-index: 11;
}

table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  background: var(--shadow-white);
  box-shadow: inset 0 0 5px var(--shadow-white);
}

th,
td {
  padding: 10px;
  text-align: center;
  border: 1px solid whitesmoke;
  min-width: 120px;
  white-space: nowrap;
}

th {
  background-color: var(--table-th-bg);
  color: var(--table-th-color);
  font-weight: normal;
  padding: 6px;
}

td {
  padding: 6px;
  color: var(--table-td-color);
  border-bottom: 1px solid var(--shadow-white);
}

th:first-child,
td:first-child {
  min-width: 100px; 
}

tr:last-child td {
  border-bottom: none;
}