/* 基础重置与字体 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 顶部导航 */
.top-header {
  background-color: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.top-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo h1 {
  color: #1a365d;
  font-size: 1.8rem;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: #4a5568;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #3182ce;
}

.search-bar {
  display: flex;
}

.search-bar input {
  padding: 0.5rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px 0 0 4px;
}

.search-bar button {
  background: #3182ce;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Breaking News Banner */
.breaking-banner {
  background-color: #e53e3e;
  color: white;
  padding: 0.5rem 0;
}

.breaking-label {
  background: #fff;
  color: #e53e3e;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 1rem;
}

.breaking-text {
  display: inline;
  font-weight: 600;
}

/* 主内容区布局 */
.main-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

/* 新闻卡片 */
.news-card {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
}

.card-image {
  flex: 0 0 300px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a202c;
}

.news-summary {
  color: #718096;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.category {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.category.tech {
  background: #e6fffa;
  color: #234e52;
}

.category.business {
  background: #faf5ff;
  color: #553c9a;
}

.timestamp {
  color: #a0aec0;
}

/* 侧边栏 */
.sidebar {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  height: fit-content;
}

.sidebar h3 {
  margin-bottom: 1rem;
  color: #2d3748;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.trending-section ul {
  list-style: none;
}

.trending-section li {
  margin-bottom: 0.7rem;
}

.trending-section a {
  text-decoration: none;
  color: #3182ce;
  font-weight: 500;
}

.weather-widget p {
  margin-bottom: 0.5rem;
  color: #4a5568;
}

/* 底部页脚 */
.main-footer {
  background: #1a202c;
  color: #cbd5e0;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.main-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-footer ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-footer a {
  color: #cbd5e0;
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .top-header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .news-card {
    flex-direction: column;
  }
  
  .card-image {
    flex: 0 0 200px;
  }
  
  .main-footer .container {
    flex-direction: column;
    gap: 1rem;
  }
}
