* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-image: 
    url('https://images.unsplash.com/photo-1534088568595-a066f410bcda?w=1920&q=80'),
    linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  animation: backgroundShift 20s ease infinite;
  transition: background 0.8s ease;
}

/* Night Mode */
body.night-mode {
  background-image: 
    url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920&q=80'),
    linear-gradient(135deg, rgba(10, 25, 47, 0.95) 0%, rgba(27, 38, 59, 0.95) 100%);
}

/* Day Mode Variations */
body.clear-day {
  background-image: 
    url('https://images.unsplash.com/photo-1534088568595-a066f410bcda?w=1920&q=80'),
    linear-gradient(135deg, rgba(135, 206, 250, 0.9) 0%, rgba(255, 193, 7, 0.8) 100%);
}

body.cloudy-day {
  background-image: 
    url('https://images.unsplash.com/photo-1513002749550-c59d786b8e6c?w=1920&q=80'),
    linear-gradient(135deg, rgba(108, 117, 125, 0.9) 0%, rgba(134, 142, 150, 0.9) 100%);
}

body.rainy-day {
  background-image: 
    url('https://images.unsplash.com/photo-1519692933481-e162a57d6721?w=1920&q=80'),
    linear-gradient(135deg, rgba(52, 73, 94, 0.95) 0%, rgba(44, 62, 80, 0.95) 100%);
}

body.snowy-day {
  background-image: 
    url('https://images.unsplash.com/photo-1491002052546-bf38f186af56?w=1920&q=80'),
    linear-gradient(135deg, rgba(236, 240, 241, 0.9) 0%, rgba(189, 195, 199, 0.9) 100%);
}

@keyframes backgroundShift {
  0%, 100% {
    background-position: center center;
  }
  50% {
    background-position: center top;
  }
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 50%),
              radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.container {
  position: relative;
  z-index: 2;
  padding: 15px;
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 25px;
  padding: 25px 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 0 100px rgba(255, 255, 255, 0.08) inset;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  transition: all 0.5s ease;
}

/* Night mode card styling */
body.night-mode .app-card {
  background: rgba(20, 30, 48, 0.75);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 100px rgba(100, 150, 255, 0.1) inset;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced text contrast for night mode */
body.night-mode .app-card {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.night-mode .logo h1,
body.night-mode .location-info h2,
body.night-mode .temperature-display h3,
body.night-mode .condition-text {
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7),
               0 0 20px rgba(100, 150, 255, 0.3);
}

/* Snowy day text contrast */
body.snowy-day .app-card {
  background: rgba(255, 255, 255, 0.25);
  color: #1a1a2e;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

body.snowy-day .logo h1,
body.snowy-day .location-info h2,
body.snowy-day .temperature-display h3,
body.snowy-day .condition-text,
body.snowy-day .detail-value {
  color: #1a1a2e;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

body.snowy-day .detail-label,
body.snowy-day .current-time,
body.snowy-day .footer {
  color: #2d3436;
}

.app-card:hover {
  transform: translateY(-5px);
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo svg {
  animation: rotate 20s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
  width: 35px;
  height: 35px;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo h1 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.current-time {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Search Box Styles - IMPROVED */
.search-container {
  margin-bottom: 25px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 5px 5px 5px 20px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  stroke: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  stroke-width: 2;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: white;
  font-size: 16px;
  font-weight: 400;
  padding: 12px 5px;
  font-family: 'Poppins', sans-serif;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* IMPROVED Search Button */
.search-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
}

.search-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.search-btn:hover::before {
  left: 100%;
}

.search-btn:hover {
  transform: translateX(3px) translateY(-2px);
  box-shadow: 0 7px 20px rgba(102, 126, 234, 0.6);
}

.search-btn:active {
  transform: scale(0.98);
}

.search-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.search-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Weather Content */
.weather-content {
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.location-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.location-info svg {
  stroke-width: 2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.location-info h2 {
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Main Weather Display */
.main-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.weather-icon-container {
  position: relative;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.weather-icon-container .weather-icon {
  font-size: 100px;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
  transition: all 0.5s ease;
}

/* Icon color variations */
.weather-icon.sunny {
  color: #FDB813;
  text-shadow: 0 0 30px rgba(253, 184, 19, 0.6);
}

.weather-icon.cloudy {
  color: #B0BEC5;
  text-shadow: 0 0 20px rgba(176, 190, 197, 0.4);
}

.weather-icon.rainy {
  color: #5DADE2;
  text-shadow: 0 0 20px rgba(93, 173, 226, 0.5);
}

.weather-icon.snowy {
  color: #E3F2FD;
  text-shadow: 0 0 25px rgba(227, 242, 253, 0.7);
}

.weather-icon.night {
  color: #FFD700;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.weather-icon.thunder {
  color: #FFB74D;
  text-shadow: 0 0 30px rgba(255, 183, 77, 0.7);
  animation: thunderPulse 2s ease-in-out infinite;
}

@keyframes thunderPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Night mode icon adjustments */
body.night-mode .weather-icon {
  filter: drop-shadow(0 10px 30px rgba(100, 150, 255, 0.5));
}

body.night-mode .weather-icon.night {
  color: #FFE082;
  text-shadow: 0 0 40px rgba(255, 224, 130, 0.8);
}

.weather-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.temperature-display h3 {
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feels-like {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  opacity: 0.9;
}

.feels-like span:first-child {
  font-weight: 300;
  opacity: 0.8;
}

.feels-like span:last-child {
  font-weight: 600;
  font-size: 18px;
}

.condition-text {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 22px;
  text-transform: capitalize;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Weather Details Grid */
.weather-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.detail-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.detail-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-icon svg {
  stroke-width: 2px;
  width: 24px;
  height: 24px;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Last Updated */
.last-updated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.7;
  margin-top: 10px;
}

.last-updated svg {
  stroke-width: 2px;
}

/* Error Message */
.error-message {
  background: rgba(255, 82, 82, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 15px 20px;
  border-radius: 15px;
  text-align: center;
  font-weight: 500;
  border: 1px solid rgba(255, 82, 82, 0.3);
  box-shadow: 0 5px 15px rgba(255, 82, 82, 0.2);
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Hidden Class */
.hidden {
  display: none !important;
}

/* Footer Styles - IMPROVED */
.footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeIn 0.8s ease 0.3s backwards;
}

.footer p {
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

/* IMPROVED Developer Name Link */
.developer-name {
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 15px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  position: relative;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.developer-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.developer-name:hover::after {
  transform: scaleX(1);
}

.developer-name:hover {
  filter: brightness(1.2);
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.footer-link {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
}

.footer-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.footer-link svg {
  stroke-width: 2px;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* RESPONSIVE DESIGN - MOBILE FIRST */

/* Extra Small Devices (320px - 374px) */
@media (max-width: 374px) {
  body {
    padding: 5px;
  }

  .container {
    padding: 8px;
    width: 100%;
  }

  .app-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .header {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
  }

  .logo {
    gap: 8px;
  }

  .logo svg {
    width: 28px;
    height: 28px;
  }

  .logo h1 {
    font-size: 17px;
  }

  .current-time {
    font-size: 10px;
    padding: 5px 10px;
    width: 100%;
    text-align: center;
  }

  .search-container {
    margin-bottom: 20px;
  }

  .search-box {
    padding: 3px 3px 3px 12px;
    flex-direction: row;
  }

  .search-box input {
    font-size: 14px;
    padding: 9px 5px;
  }

  .search-btn {
    padding: 9px 15px;
    font-size: 13px;
    white-space: nowrap;
  }

  .btn-text {
    display: inline;
  }

  .location-info {
    margin-bottom: 18px;
  }

  .location-info svg {
    width: 18px;
    height: 18px;
  }

  .location-info h2 {
    font-size: 17px;
  }

  .main-weather {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .weather-icon-container .weather-icon {
    font-size: 75px;
  }

  .weather-glow {
    width: 95px;
    height: 95px;
  }

  .temperature-display h3 {
    font-size: 44px;
  }

  .feels-like {
    font-size: 11px;
  }

  .feels-like span:last-child {
    font-size: 14px;
  }

  .condition-text {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .weather-details {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .detail-card {
    padding: 12px 10px;
    gap: 10px;
  }

  .detail-icon {
    width: 38px;
    height: 38px;
  }

  .detail-icon svg {
    width: 18px;
    height: 18px;
  }

  .detail-label {
    font-size: 10px;
  }

  .detail-value {
    font-size: 15px;
  }

  .last-updated {
    font-size: 10px;
    margin-top: 8px;
  }

  .footer {
    margin-top: 18px;
    padding-top: 16px;
  }

  .footer p {
    font-size: 10px;
  }

  .developer-name {
    font-size: 11px;
    display: block;
    margin-top: 3px;
  }

  .footer-links {
    gap: 10px;
    margin-top: 10px;
  }

  .footer-link {
    width: 30px;
    height: 30px;
  }

  .footer-link svg {
    width: 13px;
    height: 13px;
  }
}

/* Small Mobile Devices (375px - 480px) */
@media (min-width: 375px) and (max-width: 480px) {
  body {
    padding: 5px;
  }

  .container {
    padding: 10px;
    width: 100%;
  }

  .app-card {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .header {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
  }

  .logo {
    gap: 10px;
  }

  .logo svg {
    width: 32px;
    height: 32px;
  }

  .logo h1 {
    font-size: 20px;
  }

  .current-time {
    font-size: 11px;
    padding: 6px 12px;
    width: 100%;
    text-align: center;
  }

  .search-container {
    margin-bottom: 22px;
  }

  .search-box {
    padding: 4px 4px 4px 14px;
  }

  .search-box input {
    font-size: 15px;
    padding: 10px 6px;
  }

  .search-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .location-info {
    margin-bottom: 20px;
  }

  .location-info h2 {
    font-size: 19px;
  }

  .main-weather {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
  }

  .weather-icon-container .weather-icon {
    font-size: 85px;
  }

  .weather-glow {
    width: 105px;
    height: 105px;
  }

  .temperature-display h3 {
    font-size: 52px;
  }

  .feels-like {
    font-size: 12px;
  }

  .feels-like span:last-child {
    font-size: 15px;
  }

  .condition-text {
    font-size: 17px;
    margin-bottom: 22px;
  }

  .weather-details {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-bottom: 20px;
  }

  .detail-card {
    padding: 14px 12px;
  }

  .detail-icon {
    width: 42px;
    height: 42px;
  }

  .detail-icon svg {
    width: 22px;
    height: 22px;
  }

  .detail-label {
    font-size: 11px;
  }

  .detail-value {
    font-size: 16px;
  }

  .last-updated {
    font-size: 11px;
  }

  .footer {
    margin-top: 20px;
    padding-top: 18px;
  }

  .footer p {
    font-size: 12px;
  }

  .developer-name {
    font-size: 13px;
  }

  .footer-links {
    gap: 14px;
  }

  .footer-link {
    width: 34px;
    height: 34px;
  }

  .footer-link svg {
    width: 15px;
    height: 15px;
  }
}

/* Medium Mobile / Large Phones (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
  .container {
    padding: 12px;
    max-width: 400px;
  }

  .app-card {
    padding: 24px 20px;
  }

  .header {
    flex-direction: row;
    margin-bottom: 24px;
  }

  .current-time {
    font-size: 12px;
    width: auto;
  }

  .main-weather {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }

  .weather-icon-container .weather-icon {
    font-size: 90px;
  }

  .weather-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Small Tablets (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
  .container {
    padding: 15px;
    max-width: 420px;
  }

  .app-card {
    padding: 26px 22px;
  }

  .header {
    margin-bottom: 24px;
  }

  .search-container {
    margin-bottom: 26px;
  }

  .main-weather {
    gap: 22px;
    margin-bottom: 18px;
  }

  .weather-icon-container .weather-icon {
    font-size: 95px;
  }

  .temperature-display h3 {
    font-size: 56px;
  }

  .condition-text {
    font-size: 18px;
  }

  .weather-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .detail-card {
    padding: 16px;
  }
}

/* Tablets / Small Desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 420px;
  }

  .app-card {
    padding: 28px 24px;
  }

  .weather-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Tablets / Medium Desktops (1025px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
  .container {
    max-width: 420px;
  }
}

/* Large Screens (1200px+) */
@media (min-width: 1200px) {
  .container {
    max-width: 440px;
  }

  .app-card {
    padding: 30px 25px;
  }

  .temperature-display h3 {
    font-size: 64px;
  }

  .weather-icon-container .weather-icon {
    font-size: 110px;
  }
}

/* Extra Large Screens (1600px+) */
@media (min-width: 1600px) {
  .container {
    max-width: 460px;
  }

  .app-card {
    padding: 32px 28px;
  }
}

/* Landscape Mode Optimization (Small Devices) */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: 5px 0;
  }

  .container {
    padding: 8px;
    max-height: 100vh;
    overflow-y: auto;
  }

  .app-card {
    padding: 18px 20px;
  }

  .header {
    margin-bottom: 15px;
    flex-direction: row;
  }

  .logo h1 {
    font-size: 20px;
  }

  .logo svg {
    width: 30px;
    height: 30px;
  }

  .current-time {
    font-size: 11px;
    padding: 5px 10px;
  }

  .search-container {
    margin-bottom: 18px;
  }

  .search-box {
    padding: 3px 3px 3px 12px;
  }

  .search-box input {
    padding: 8px 5px;
    font-size: 13px;
  }

  .search-btn {
    padding: 8px 15px;
    font-size: 13px;
  }

  .location-info {
    margin-bottom: 15px;
  }

  .location-info h2 {
    font-size: 18px;
  }

  .main-weather {
    margin-bottom: 15px;
    flex-direction: row;
    gap: 20px;
  }

  .weather-icon-container .weather-icon {
    font-size: 70px;
  }

  .weather-glow {
    width: 90px;
    height: 90px;
  }

  .temperature-display h3 {
    font-size: 42px;
  }

  .condition-text {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .weather-details {
    gap: 8px;
    margin-bottom: 15px;
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-card {
    padding: 10px;
  }

  .detail-icon {
    width: 38px;
    height: 38px;
  }

  .detail-icon svg {
    width: 20px;
    height: 20px;
  }

  .detail-label {
    font-size: 11px;
  }

  .detail-value {
    font-size: 15px;
  }

  .last-updated {
    font-size: 11px;
    margin-top: 8px;
  }

  .footer {
    margin-top: 15px;
    padding-top: 12px;
  }

  .footer p {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .footer-links {
    gap: 10px;
    margin-top: 8px;
  }

  .footer-link {
    width: 30px;
    height: 30px;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .search-btn,
  .footer-link {
    min-height: 44px;
    min-width: 44px;
  }

  .search-box input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .app-card {
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 255, 255, 0.25) inset,
      0 0 100px rgba(255, 255, 255, 0.08) inset;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
