/* Code crafted by Chirrenthen*/
/* PixlQR CSS */
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
  --bg: #f5f7fa;
  --primary: #4a90e2;
  --primary-dark: #3a7bc8;
  --text: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
}

/* Loader */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Navbar */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  vertical-align: middle;
}

.logo svg {
  width: 40px;
  height: 40px;
  margin-bottom: 1px;
  vertical-align: middle;
}

.nav nav {
  display: flex;
  gap: 2rem;
}

.nav nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav nav a.active,
.nav nav a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #4a90e2, #50e3c2);
  color: var(--white);
  padding: 0 2rem;
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: transparent;
  color: #f5f7fa;
  border: 2px solid #f5f7fa;
}

.btn.primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  color: var(--primary);
}

/* Main Dashboard Container */
.dashboard-container {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
}

.main-weather-box {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Search Section */
.search-section {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-container {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-container input {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-container input:focus {
  border-color: var(--primary);
}

.search-container button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  background: var(--primary);
  color: white;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.search-container button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Initial State */
.initial-state {
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.initial-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.initial-state h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.initial-state p {
  color: var(--text-light);
  max-width: 400px;
}

/* Weather Data */
.weather-data {
  padding: 2rem;
}

.primary-boxes {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.left-box, .right-box {
  flex: 1;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: var(--glass-bg);
}

/* Left Box Styles */
.location-info h2 {
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.location-info p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.weather-main img {
  width: 80px;
  height: 80px;
}

.temp-info h3 {
  font-size: 3rem;
  color: var(--text);
}

.temp-info p {
  color: var(--text-light);
  text-transform: capitalize;
}

.weather-stats, .sun-times {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  flex: 1;
  padding: 1rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.stat-box i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-box span {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.stat-box small {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Right Box Styles */
.right-box {
  display: flex;
  flex-direction: column;
}

#map {
  height: 300px;
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.coordinates {
  display: flex;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Bottom Stats */
.bottom-stats {
  display: flex;
  gap: 1rem;
}

.bottom-stats .stat-box {
  flex: 1;
}

/* Footer Styles */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-container {
  max-width: 800px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }
  
  .nav nav {
    gap: 1rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .primary-boxes {
    flex-direction: column;
  }
  
  .weather-stats, .sun-times, .bottom-stats {
    flex-wrap: wrap;
  }
  
  .stat-box {
    min-width: calc(50% - 0.5rem);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .search-container {
    flex-direction: column;
  }
  
  .search-container input,
  .search-container button {
    width: 100%;
  }
  
  .stat-box {
    min-width: 100%;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .nav nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}