* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
}

.app {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 0 40px;
}

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

.header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: #38bdf8;
}

.header p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.top-bar {
  margin-bottom: 25px;
}

.search-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.search-box input {
  flex: 1;
  min-width: 240px;
  padding: 14px 16px;
  border: none;
  outline: none;
  border-radius: 12px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.search-box button {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: #38bdf8;
  color: #0f172a;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.search-box button:hover {
  opacity: 0.9;
}

.categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: #1e293b;
  color: #cbd5e1;
  cursor: pointer;
  transition: 0.2s;
}

.category-btn:hover {
  background: #334155;
}

.category-btn.active {
  background: #38bdf8;
  color: #0f172a;
  font-weight: bold;
}

.message {
  text-align: center;
  margin: 20px 0;
  color: #94a3b8;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.news-card {
  background: #1e293b;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: 0.25s;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.news-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-source {
  color: #38bdf8;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.news-content h3 {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.news-content p {
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.news-content a {
  margin-top: auto;
  width: fit-content;
  text-decoration: none;
  background: #38bdf8;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.2s;
}

.news-content a:hover {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .header h1 {
    font-size: 1.8rem;
  }

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