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

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f0c29;
  font-family: 'Segoe UI', sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(138,43,226,0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,180,216,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.app {
  width: 400px;
  padding: 36px 28px;
  position: relative;
  z-index: 1;
}

.title {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.search-box input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 14px 18px;
  color: white;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

.search-box input:focus {
  border-color: rgba(124,58,237,0.8);
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.3);
}

.search-box button {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: opacity 0.2s, transform 0.1s;
}

.search-box button:hover {
  opacity: 0.9;
}

.search-box button:active {
  transform: scale(0.97);
}

.weather-card {
  display: none;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#cityName {
  color: white;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

#countryName {
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 18px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.weather-main img {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.2));
}

.temp {
  color: white;
  font-size: 68px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.temp span {
  font-size: 24px;
  font-weight: 400;
  vertical-align: super;
  letter-spacing: 0;
}

#description {
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  text-transform: capitalize;
  margin-bottom: 22px;
}

.divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 16px 10px;
  text-align: center;
}

.label {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.value {
  color: white;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.unit {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin-top: 4px;
}

.footer {
  text-align: center;
  color: rgba(255,255,255,0.2);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

#error {
  color: #f87171;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

.loader {
  display: none;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #7c3aed;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.7s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}