:root {
  /* Classic color palette - timeless and elegant */
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #c0392b;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --border-color: #ecf0f1;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header - Classic newspaper masthead style */
header {
  background-color: var(--bg-color);
  border-bottom: 3px solid var(--primary-color);
  padding: 20px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  font-family: 'Georgia', serif;
  letter-spacing: -1px;
}

/* Navigation - Classic horizontal menu */
nav {
  background-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.categories {
  display: flex;
  gap: 0;
}

.category-btn {
  background: none;
  border: none;
  color: white;
  padding: 15px 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease;
  font-family: 'Arial', sans-serif;
}

.category-btn:hover,
.category-btn.active {
  background-color: var(--accent-color);
}

/* Search Bar - Clean and simple */
.search-bar {
  display: flex;
  margin: 10px 0;
}

.search-input {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-right: none;
  font-size: 14px;
  min-width: 200px;
  font-family: 'Arial', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-btn {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 500;
  font-family: 'Arial', sans-serif;
}

.search-btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Source Filters - Simple button style */
.source-filters {
  margin: 30px 0 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.source-filter {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: 'Arial', sans-serif;
}

.source-filter.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.source-filter:hover:not(.active) {
  background-color: var(--border-color);
}

/* Loader */
.loader {
  text-align: center;
  padding: 40px;
  display: none;
}

.loader.active {
  display: block;
}

.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* News Grid - Classic card layout */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.news-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow);
}

.card-img-container {
  height: 200px;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-source {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Arial', sans-serif;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--text-color);
}

.card-title:hover {
  color: var(--primary-color);
}

.card-description {
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--text-light);
  line-height: 1.5;
  font-size: 14px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}

.card-date {
  color: var(--text-light);
  font-family: 'Arial', sans-serif;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
  font-size: 12px;
  font-family: 'Arial', sans-serif;
}

.read-more:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Load More Button */
.load-more {
  display: block;
  margin: 40px auto;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.3s ease;
  font-family: 'Arial', sans-serif;
}

.load-more:hover {
  background-color: var(--secondary-color);
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--accent-color);
  display: none;
  font-size: 16px;
  background-color: #fdf2f2;
  border: 1px solid #fecaca;
  margin: 20px 0;
}

.error-message.active {
  display: block;
}

/* Footer - Classic style */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-weight: bold;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

.footer-links {
  list-style: none;
}

.footer-link {
  margin-bottom: 8px;
}

.footer-link a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link a:hover {
  color: white;
}

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #34495e;
  font-size: 14px;
  color: #bdc3c7;
}

.api-attribution {
  font-size: 12px;
  margin-top: 10px;
  color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .logo {
    font-size: 2rem;
  }

  .nav-container {
    flex-direction: column;
  }

  .categories {
    flex-wrap: wrap;
    justify-content: center;
  }

  .search-bar {
    width: 100%;
    max-width: 300px;
    margin: 15px auto;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
  }

  .source-filters {
    justify-content: center;
  }

  .footer-container {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .logo {
    font-size: 1.75rem;
  }

  .category-btn {
    padding: 12px 15px;
    font-size: 13px;
  }

  .card-content {
    padding: 15px;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .notification {
    left: 15px;
    right: 15px;
    bottom: 15px;
  }
}