/* استایل‌های اصلی */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
}

/* کارت اصلی هواشناسی */
.weather-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 1rem;
}

/* بخش جستجو */
.search-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group {
  max-width: 400px;
  margin: 0 auto;
}

.form-control {
  border-radius: 10px !important;
  margin-left: 5px;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
}

.btn-primary {
  border-radius: 10px !important;
  border: none;
  padding: 12px 20px;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* اطلاعات آب‌وهوا */
.weather-info {
  margin-top: 2rem;
}

.current-weather {
  text-align: center;
  margin-bottom: 2rem;
}

.city-name {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.date-time {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.weather-main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.temperature {
  display: flex;
  align-items: baseline;
}

.temp-value {
  font-size: 4rem;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.temp-unit {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 0.5rem;
}

.weather-description {
  text-align: center;
}

.weather-icon {
  font-size: 3rem;
  color: #ffd700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.description {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* جزئیات آب‌وهوا */
.weather-details {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.detail-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.detail-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.detail-item i {
  font-size: 1.5rem;
  color: #ffd700;
  margin-bottom: 0.5rem;
  display: block;
}

.detail-item span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

.detail-item strong {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

/* بخش پیش‌بینی */
.forecast-section {
  margin-top: 2rem;
}

.forecast-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

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

.forecast-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.forecast-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
}

.forecast-date {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.forecast-icon {
  font-size: 2rem;
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.forecast-temp {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.forecast-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* لودینگ */
.loading {
  text-align: center;
  padding: 2rem;
}

/* پیام خطا */
.error-message {
  text-align: center;
  padding: 2rem;
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .weather-card {
    padding: 1.5rem;
    margin: 0.5rem;
  }

  .search-section h1 {
    font-size: 2rem;
  }

  .temp-value {
    font-size: 3rem;
  }

  .weather-main {
    flex-direction: column;
    gap: 1rem;
  }

  .forecast-container {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .forecast-item {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .weather-card {
    padding: 1rem;
  }

  .search-section h1 {
    font-size: 1.5rem;
  }

  .temp-value {
    font-size: 2.5rem;
  }

  .city-name {
    font-size: 1.5rem;
  }

  .weather-details .row {
    margin: 0;
  }

  .detail-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.weather-info {
  animation: fadeIn 0.5s ease-out;
}

.forecast-item {
  animation: fadeIn 0.5s ease-out;
}

/* استایل‌های اضافی برای بهبود تجربه کاربری */
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* استایل برای حالت تاریک */
@media (prefers-color-scheme: dark) {
  .weather-card {
    background: rgba(0, 0, 0, 0.2);
  }
}

.weather-map {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  margin-top: 1rem;
  box-shadow: 0 2px 12px #0002;
  z-index: 1;
}
.map-section {
  margin-top: 2rem;
}
.map-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-align: right;
}
