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

/* Global Styles */
body { font-family: sans-serif; line-height: 1.5; background-color: #f5f5f5; padding: 20px; }

/* Header */
header {
  background-color: #ffffff; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}
.header-btns { display: flex; gap: 12px; }
#updateBtn, .external-btn {
  background-color: #007bff; color: #fff; border: none; border-radius: 4px;
  padding: 8px 16px; font-size: 0.95rem; cursor: pointer;
  text-decoration: none; text-align: center; transition: opacity 0.2s;
}
#updateBtn:hover, .external-btn:hover { opacity: 0.9; }

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* News Card */
.news-item {
  background-color: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden; display: flex; flex-direction: column;
}
.news-item img {
  width: 100%; height: 160px; object-fit: cover;
}
.news-content {
  padding: 12px; display: flex; flex-direction: column; flex: 1;
}
.news-content h2 {
  font-size: 1rem; margin-bottom: 8px; flex: 1;
}
.news-content .date {
  font-size: 0.8rem; color: #666; margin-top: auto;
}

/* Error */
.error { color: red; text-align: center; margin-top: 20px; }
