* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  margin: 0;
  color: #102033;
  background: linear-gradient(180deg, #eef5ff, #f8fafc);
}

header {
  min-height: 380px;
  background-image: url("https://images.unsplash.com/photo-1502602898657-3e91760cbb34?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  transition: background-image 1.5s ease-in-out;
}

.hero-overlay {
  min-height: 380px;
  background: linear-gradient(rgba(15, 23, 42, 0.45), rgba(37, 99, 235, 0.55));
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

header h1 {
  font-family: "Playfair Display", serif;
  font-size: 64px;
  margin: 0 0 14px;
}

header p {
  font-size: 20px;
  margin: 0;
}

main {
  max-width: 1280px;
  margin: -70px auto 40px;
  padding: 0 24px 50px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  padding: 30px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.card:hover {
  transform: translateY(-2px);
  transition: 0.25s ease;
}

.card h2 {
  margin-top: 0;
  font-size: 28px;
}

.full-width {
  grid-column: span 2;
}

.input-row {
  display: flex;
  gap: 12px;
}

input {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  font-size: 16px;
}

button {
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: #1e40af;
}

.delete-btn {
  background: #ef4444;
  padding: 8px 12px;
  font-size: 13px;
}

.delete-btn:hover {
  background: #b91c1c;
}

.stats {
  display: flex;
  gap: 14px;
  text-align: center;
}

.stats div {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 20px;
  border-radius: 20px;
  flex: 1;
}

.stats h3 {
  color: #2563eb;
  font-size: 34px;
  margin: 10px 0 0;
}

.country-item {
  background: #f8fafc;
  padding: 13px 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.country-item:hover {
  background: #eaf2ff;
}

#map {
  height: 520px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}

.info-box {
  background: #f8fafc;
  padding: 22px;
  border-radius: 22px;
}

.info-box h3 {
  color: #1d4ed8;
  margin-top: 0;
}

.info-box ul {
  padding-left: 20px;
  line-height: 1.7;
}

#message {
  color: #334155;
  font-weight: 600;
}

.muted {
  color: #64748b;
}

@media (max-width: 900px) {
  .grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: span 1;
  }

  .input-row,
  .stats {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  header h1 {
    font-size: 44px;
  }
}

.country-link {
  background: transparent;
  color: #172033;
  padding: 0;
  font-weight: 700;
  text-align: left;
  width: auto;
}

.country-link:hover {
  background: transparent;
  color: #2563eb;
}

.country-item {
  cursor: pointer;
}

.country-item:hover {
  background: #eaf2ff;
  transform: translateY(-2px);
  transition: 0.2s ease;
}