/* ===== Global reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

/* ===== Body layout ===== */
body {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  background: linear-gradient(180deg, #dcdcdc 0%, #ffffff 100%);
  color: #fff; 
}

/* ===== Fonts ===== */
h1 {
  font-size: 120px;
}

h2 {
  font-size: 34px;
  margin-bottom: 12px;
  padding-left: 15px;
}

h3 {
  font-size: 22px;
  opacity: 95%;
  font-weight: 400;
}

/* ===== Card ===== */
.card {
  position: relative;
  margin-top: 0;
  min-width: 414px;
  height: 896px;
  background: #ffffff;
  border-radius: 24px;
  margin-top: 30px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* ===== Upper part ===== */
.header {
  position: relative;
  height: 320px;
  border-bottom-left-radius: 100px;
  border-bottom-right-radius: 100px;
  text-align: flex-start;
  padding: 40px 20px;
}

#background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
}

path {
  position: absolute;
  width: 414px;
  z-index: 0;
}

.summary {
  padding-top: 90px;
  z-index: 100;
  position: relative;
}

/* --- Current temperature --- */
.temperature {
  font-weight: 300;
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.temperature span {
  padding-bottom: 65px;
  font-size: 28px;
  font-weight: 500;
}

/* --- Weather icon --- */
.weather-icon {
  width: 40px;
  height: 40px;
  display: block;
}

/* --- Location & Condition --- */
.location {
  font-weight: 400;
  margin-top: 10px;
}

.condition {
  opacity: 0.9;
  margin-bottom: 10px;
  margin-top: 20px;
  padding-left: 15px;
}

.current-condition {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
}

/* --- Time --- */
.time {
  justify-self: flex-start;
  font-size: 20px;
  padding: 30px 15px;
}


/* ===== Toggle Button ===== */

#toggle-button {
  position: absolute;
  right: 1px;
  border: none;
  background: none;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
  cursor: pointer;
}

#buttonimg {
  width: 100px;
  height: 100px;
}

#toggle-button:hover {
  transform: translateX(-50%) scale(1.1);
}

/* ===== Lower section ===== */
.forecast {
  margin-top: 60px;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px;
  margin-top: auto;
}

/* --- Each day line --- */
.day {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  transition: background 0.3s;
}

.day:hover {
  background: #cccccc;
}

.day-name {
  font-weight: 500;
  font-size: 20px;
  color: #333;
}

.day-temp {
  font-weight: 400;
  font-size: 20px;
  color: #666;
}

.day-icon {
  position: absolute;
  left: 178px;
  width: 50px;
  height: 50px;
}


/* ===== Footer ===== */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 414px;
  padding: 20px 0;
  color: #a0a0a0;
}

#cat {
  display: inline-block;
  transform: scale(-1, 1);
}

/* ===== SMOOTH TRANSITIONS ===== */
.fade {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}