/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #333;
}

.app-container {
  max-width: 800px;
  width: 100%;
}

/* Main input section */
.main {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.main header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.main header h1 {
  font-size: 2rem;
  font-weight: 600;
}

.input-part {
  padding: 30px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 18px;
  transition: all 0.3s ease;
  outline: none;
}

.content input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.content button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.separator {
  height: 1px;
  background: #e1e5e9;
  margin: 10px 0;
}

.separatorGet {
  position: relative;
  height: 1px;
  background: #e1e5e9;
  margin: 20px 0;
}

.separatorGet::before {
  content: "or";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 0 15px;
  color: #666;
  font-size: 16px;
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4facfe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error message */
.error-message {
  background: #fee;
  color: #c33;
  padding: 15px;
  border-radius: 8px;
  margin: 20px;
  border-left: 4px solid #c33;
}

/* Weather display section */
.weather {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 30px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.weather header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weather header h2 {
  flex-grow: 1;
  text-align: center;
  font-size: 1.5rem;
}

.weather header button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.weather header button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.weather-content {
  padding: 30px;
}

#data-top {
  text-align: center;
  margin-bottom: 30px;
}

#data-top img {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

#temp {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

#description {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 10px;
  text-transform: capitalize;
}

#location {
  font-size: 1.1rem;
  color: #333;
  font-weight: 500;
}

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

.column {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

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

.column i {
  font-size: 2rem;
  color: #4facfe;
}

.details p {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

.details span {
  font-size: 0.9rem;
  color: #666;
}

/* Forecast section */
#forecast {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 30px;
  padding: 30px;
  overflow: hidden;
}

#forecast h3 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-size: 1.5rem;
}

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

.forecast-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

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

.forecast-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.forecast-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

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

/* Responsive design */
@media (max-width: 768px) {
  .app-container {
    padding: 10px;
  }

  .main, .weather, #forecast {
    margin-top: 20px;
  }

  .input-part {
    padding: 20px;
  }

  .weather-content {
    padding: 20px;
  }

  #forecast {
    padding: 20px;
  }

  #temp {
    font-size: 3rem;
  }

  .data-bottom {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .column {
    padding: 15px;
  }

  .forecast-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .forecast-card {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .data-bottom {
    grid-template-columns: 1fr;
  }

  .forecast-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .weather header {
    padding: 15px;
  }

  .weather header h2 {
    font-size: 1.2rem;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
button:focus, input:focus {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
}
