* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", Arial, sans-serif;
  background: linear-gradient(135deg, #122a72, #2450d3);
  min-height: 100vh;
  color: #0f172a;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: #f7f9fc;
  border-radius: 18px;
  padding: 26px 24px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Brand header (BlueDream + whale) */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  background: linear-gradient(135deg, #e0f2ff, #c7e7ff);
  box-shadow: 0 4px 12px rgba(0, 70, 140, 0.12);
}

.brand-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #0d47a1, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.weather-title {
  margin: 8px 0 6px;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.subtitle {
  margin: 0 0 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.98rem;
}

.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box input {
  flex: 1;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.search-box button {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, opacity 0.2s ease, background 0.2s ease;
}

.search-box button:hover {
  background: #1d4ed8;
}

.search-box button:active {
  transform: translateY(1px);
}

.search-box button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hint {
  margin: 10px 0 14px;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 600;
}

.weather {
  margin-top: 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.weather-header {
  text-align: center;
  margin-bottom: 12px;
}

.weather-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.weather-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.main-info {
  margin-bottom: 14px;
}

.temp-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.icon {
  font-size: 2.2rem;
  line-height: 1;
}

.temp {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.desc {
  margin: 4px 0 0;
  color: #475569;
  text-transform: capitalize;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-item span {
  color: #475569;
  font-size: 0.92rem;
}

.detail-item strong {
  color: #0f172a;
  font-size: 1rem;
}

.footer-note {
  margin-top: 14px;
  text-align: center;
  color: #64748b;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .card {
    padding: 20px 16px 16px;
    border-radius: 14px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    font-size: 22px;
    border-radius: 10px;
  }

  .brand-title {
    font-size: 1.55rem;
  }

  .weather-title {
    font-size: 1.55rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}