:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --text-color: #333;
  --card-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

[data-theme='dark'] {
  --primary-color: #4895ef;
  --secondary-color: #4361ee;
  --accent-color: #3f37c9;
  --light-color: #212529;
  --dark-color: #f8f9fa;
  --text-color: #f8f9fa;
  --card-bg: rgba(33, 37, 41, 0.9);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-color);
  transition: var(--transition);
  min-height: 100%;
}

[data-theme='dark'] body {
  background: linear-gradient(135deg, #2b2d42 0%, #1a1a2e 100%);
}

.weather-app {
  max-width: 100%;
  margin: 0 auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.app-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

#location-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  background: var(--card-bg);
  color: var(--text-color);
  transition: var(--transition);
}

#search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: var(--transition);
}

#search-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
}

.suggestions {
  position: absolute;
  width: 100%;
  background: var(--card-bg);
  border-radius: 0 0 10px 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow);
  display: none;
}

.suggestions div {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.suggestions div:hover {
  background: var(--primary-color);
  color: white;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.current-weather {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .current-weather {
    grid-template-columns: 1fr;
  }
}

.weather-card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.weather-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.location-info h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.location-info p {
  color: var(--text-color);
  opacity: 0.8;
}

.weather-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
}

.temperature {
  font-size: 3.5rem;
  font-weight: bold;
}

.unit {
  font-size: 1.5rem;
  vertical-align: super;
}

.weather-icon i {
  font-size: 5rem;
  color: var(--accent-color);
}

.weather-details {
  margin-top: 1rem;
}

.weather-details p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.detail-row span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.animated-visualization {
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 70px 0px 10px 0px;
}

.forecast-section h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.forecast-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.forecast-day {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.forecast-day:hover {
  transform: translateY(-5px);
}

.forecast-day h4 {
  margin-bottom: 0.5rem;
}

.forecast-icon {
  font-size: 2rem;
  margin: 0.5rem 0;
  color: var(--accent-color);
}

.forecast-temp {
  display: flex;
  justify-content: space-around;
}

.weather-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .weather-charts {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
}

#theme-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
}

#theme-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
}
