body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f4f6f9;
}

header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

header h1 {
  color: #1a73e8;
  margin-bottom: 20px;
}

.search-box {
  margin-bottom: 15px;
}

.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 1rem;
  outline: none;
}

.categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-btn {
  background: #e8f0fe;
  color: #1a73e8;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.cat-btn:hover, .cat-btn.active {
  background: #1a73e8;
  color: #fff;
}

#news-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: #eee;
}

.card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #202124;
  line-height: 1.4;
}

.card a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  display: inline-block;
}

.card a:hover {
  text-decoration: underline;
}


.source-tag {
  display: inline-block;
  background-color: #e8f0fe;
  color: #1a73e8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: fit-content;
  text-transform: uppercase;
}