* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  height: 100vh;
  overflow: hidden;
  /* Replicating the soft blue gradient from the image */
  background: linear-gradient(180deg, #a8c5dd 0%, #7fa8c9 50%, #6b9bc4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 1s ease;
}

/* Night mode - darker gradient between 6pm and 6am */
body.night-mode {
  background: linear-gradient(180deg, #1a2332 0%, #2d3e50 50%, #34495e 100%);
}

#app-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.weather-card {
  position: relative;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: fadeIn 1s ease-in-out;
}

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

.city-name {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 800;
  color: #3d5a6b;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.night-mode .city-name {
  color: #a8c5e0;
}

.weather-icon-container {
  margin: 3px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.weather-icon {
  font-size: clamp(2.5rem, 8vw, 4rem);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.date {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: #3d5a6b;
  font-weight: 500;
  margin-bottom: 2px;
  opacity: 0.9;
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.night-mode .date {
  color: #95b3d7;
}

.time {
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  color: #3d5a6b;
  font-weight: 500;
  margin-bottom: 3px;
  opacity: 0.85;
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.night-mode .time {
  color: #95b3d7;
}

.temperature-container {
  margin: 3px 0;
  flex-shrink: 0;
}

.temperature {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  color: #2d4a5b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
  transition: color 0.5s ease;
}

.night-mode .temperature {
  color: #b8d4f1;
}

.weather-description {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #3d5a6b;
  font-weight: 500;
  margin: 5px 0;
  text-transform: capitalize;
  flex-shrink: 0;
  transition: color 0.5s ease;
}

.night-mode .weather-description {
  color: #95b3d7;
}

.weather-advice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 5px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background 0.5s ease, border 0.5s ease;
}

.night-mode .weather-advice {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.advice-icon {
  font-size: clamp(1rem, 3vw, 1.2rem);
  flex-shrink: 0;
}

.advice-text {
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  color: #2d4a5b;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  transition: color 0.5s ease;
}

.night-mode .advice-text {
  color: #b8d4f1;
}

.additional-info {
  display: flex;
  justify-content: center;
  gap: clamp(15px, 4vw, 30px);
  margin: 6px 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  transition: background 0.5s ease;
}

.night-mode .additional-info {
  background: rgba(255, 255, 255, 0.1);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-label {
  font-size: clamp(0.65rem, 1.8vw, 0.75rem);
  color: #3d5a6b;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.5s ease;
}

.night-mode .info-label {
  color: #95b3d7;
}

.info-value {
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  color: #2d4a5b;
  font-weight: 700;
  line-height: 1.2;
  transition: color 0.5s ease;
}

.night-mode .info-value {
  color: #b8d4f1;
}

.sf-landmark {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.95;
  flex: 1.5;
  min-height: 0;
}

.landmark-img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  margin: 0 auto;
}

.landmark-img:hover {
  transform: scale(1.02);
}

.sparkle {
  position: absolute;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  animation: sparkle 2s ease-in-out infinite;
  pointer-events: none;
  transition: color 0.5s ease;
}

.night-mode .sparkle {
  color: rgba(255, 255, 255, 0.9);
}

.sparkle-1 {
  bottom: 15%;
  right: 5%;
  animation-delay: 0s;
}

.sparkle-2 {
  top: 20%;
  left: 5%;
  animation-delay: 1s;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* Loading state */
.loading {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  .weather-card {
    padding: 10px;
  }
  
  .city-name {
    margin-bottom: 5px;
  }
  
  .weather-icon-container {
    margin: 3px 0;
  }
  
  .temperature-container {
    margin: 3px 0;
  }
  
  .weather-description {
    margin: 5px 0;
  }
  
  .additional-info {
    margin: 5px 0;
    padding: 8px 12px;
  }
  
  .sf-landmark {
    margin-top: 5px;
  }
}
