* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #d8d8d8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.container {
  width: 100%;
  max-width: 1200px;
  min-height: 90vh;
  background: #1f2027;
  border-radius: 25px;
  display: flex;
  overflow: hidden;
  color: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

/* LEFT SECTION */
.left {
  width: 30%;
  padding: 25px;
  background: linear-gradient(to bottom, #2c2f3a, #1f2027);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  height: 100%;
}

.left::-webkit-scrollbar {
  display: none;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search {
  width: 100%;
  padding: 12px;
  border: none;
  outline: none;
  border-radius: 20px;
  background: #dfe7e7;
  font-size: 14px;
}

.search:focus {
  box-shadow: 0 0 10px rgba(77, 166, 255, 0.5);
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 15px;
  background: #4da6ff;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

button:hover {
  background: #3a8ee6;
}

.weather-icon {
  text-align: center;
  margin: 30px 0;
}

.weather-icon img {
  width: 100%;
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(77, 166, 255, 0.3));
}

.temp {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: bold;
  text-align: center;
}

.city-day {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  color: #ddd;
  font-size: 1.125rem;
}

hr {
  border: 1px solid #444;
  margin: 20px 0;
}

.details p {
  margin: 12px 0;
  color: #ddd;
  font-size: 0.95rem;
}

.bottom-cards {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.mini-card {
  flex: 1;
  background: #2a2b33;
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s;
}

.mini-card:hover {
  transform: translateY(-5px);
}

.mini-card h2 {
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  margin-bottom: 5px;
  color: #4da6ff;
}

.mini-card p {
  color: #aaa;
  font-size: 12px;
}

/* TOMORROW SECTION */
.tomorrow-section {
  margin-top: auto;
  padding-top: 20px;
}

.tomorrow-section h3 {
  color: #aaa;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.tomorrow-card {
  background: #2a2b33;
  padding: 15px;
  border-radius: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  transition: transform 0.3s;
}

.tomorrow-card:hover {
  transform: translateY(-3px);
}

.tomorrow-card img {
  width: 100%;
  max-width: 50px;
  height: auto;
}

.tomorrow-card p {
  margin: 5px 0;
  color: #ddd;
}

.tomorrow-card strong {
  color: #4da6ff;
  font-size: 20px;
}

/* RIGHT SECTION */
.right {
  width: 70%;
  padding: 30px;
  max-height: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}

.right::-webkit-scrollbar {
  display: none;
}

.title {
  margin-bottom: 25px;
}

.title h2 {
  font-size: 1.75rem;
}

.forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
  padding: 10px 0;
  position: sticky;
  top: 0;
  background: linear-gradient(to bottom, #1f2027, #1f2027);
  z-index: 10;
  padding-top: 15px;
  padding-bottom: 15px;
}

.forecast-card {
  flex: 1;
  min-width: 100px;
  background: #2a2b33;
  padding: 20px 15px;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.forecast-card:hover {
  background: #353640;
  border-color: #4da6ff;
  transform: translateY(-5px);
}

.forecast-card h4 {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 8px;
}

.forecast-card img {
  width: 100%;
  max-width: 50px;
  height: auto;
  margin: 10px auto;
}

.forecast-card p {
  font-size: 16px;
  font-weight: bold;
  color: #4da6ff;
}

/* OVERVIEW SECTION */
.overview {
  margin-top: 35px;
  flex-shrink: 0;
}

.overview h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.overview-card {
  background: #2a2b33;
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s;
}

.overview-card:hover {
  transform: translateY(-5px);
}

.overview-card h4 {
  color: #aaa;
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.big {
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: bold;
  color: #4da6ff;
}

.chart {
  grid-column: span 2;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.chart canvas {
  width: 100%;
  height: 180px !important;
  flex-grow: 1;
}

/* Prevent horizontal overflow on all screens */
body {
  overflow-x: hidden;
}

/* Responsive breakpoints */
/* Mobile: 320px–480px */
@media (max-width: 480px) {
  .container {
    flex-direction: column;
    border-radius: 18px;
    min-height: auto;
    padding: 12px;
  }

  .left,
  .right {
    width: 100%;
    padding: 16px;
    height: auto;
  }

  .search {
    padding: 10px;
    font-size: 0.95rem;
  }

  .temp {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .forecast {
    position: static;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
}

/* Tablet: 481px–768px */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    flex-direction: column;
    min-height: 80vh;
  }

  .left,
  .right {
    width: 100%;
    padding: 20px;
  }

  .forecast {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* Laptop: 769px–1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    flex-direction: row;
  }

  .left {
    width: 35%;
  }

  .right {
    width: 65%;
  }
}

/* Desktop: 1025px+ */
@media (min-width: 1025px) {
  .container {
    flex-direction: row;
  }

  .left {
    width: 30%;
  }

  .right {
    width: 70%;
  }
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #1f2027;
  margin: 5% auto;
  padding: 25px;
  border: 1px solid #4da6ff;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  color: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #fff;
}

#modalTitle {
  margin-bottom: 20px;
  color: #4da6ff;
  font-size: 24px;
}

.modal-body {
  display: grid;
  gap: 15px;
}

.day-detail-card {
  background: #2a2b33;
  padding: 15px;
  border-radius: 15px;
  border-left: 4px solid #4da6ff;
}

.day-detail-card h3 {
  color: #4da6ff;
  margin-bottom: 10px;
  font-size: 18px;
}

.day-detail-card p {
  color: #ddd;
  margin: 8px 0;
  font-size: 14px;
}

.day-detail-card strong {
  color: #4da6ff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1000px) {
  body {
    height: auto;
    padding: 10px;
  }

  .container {
    flex-direction: column;
    height: auto;
  }

  .left, .right {
    width: 100%;
  }

  .right {
    max-height: none;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .chart {
    grid-column: span 1;
  }

  .temp {
    font-size: 50px;
  }

  .modal-content {
    width: 95%;
    margin: 20% auto;
  }
}
