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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
}

/* Screen reader only */
.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;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

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

.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Location info */
.location-info {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  color: white;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-location h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.location-text {
  font-size: 1.1rem;
  font-weight: 500;
}

.coordinates {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Search section */
.search-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.input-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

#locationInput {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.5rem;
  border: 2px solid #e1e5e9;
  border-radius: 50px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

#locationInput:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.submit-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Weather results */
.weather-results {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.weather-message {
  font-size: 1.5rem;
  font-weight: 600;
  color: #4A90E2;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(74, 144, 226, 0.1);
  border-radius: 15px;
}

.location-display {
  font-size: 1.3rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
  text-align: center;
}

.temperature {
  font-size: 4rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

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

.weather-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(74, 144, 226, 0.05);
  border-radius: 10px;
  border-left: 4px solid #4A90E2;
}

.weather-detail .label {
  font-weight: 600;
  color: #666;
}

.weather-detail .value {
  font-weight: 500;
  color: #333;
}

/* Error message */
.error-message {
  background: rgba(231, 76, 60, 0.1);
  color: #c0392b;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  border-left: 4px solid #e74c3c;
  font-weight: 500;
  text-align: center;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* 404 Error page */
.error-page {
  text-align: center;
  color: white;
  padding: 4rem 2rem;
}

.error-page h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-page p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .location-info,
  .search-section,
  .weather-results {
    padding: 1.5rem;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  #locationInput {
    min-width: auto;
  }
  
  .temperature {
    font-size: 3rem;
  }
  
  .weather-info {
    grid-template-columns: 1fr;
  }
  
  .weather-detail {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem;
  }
  
  .weather-message {
    font-size: 1.2rem;
  }
  
  .location-display {
    font-size: 1.1rem;
  }
  
  .temperature {
    font-size: 2.5rem;
  }
}
