/*
Theme Name: ModernNews
Theme URI: https://yourdomain.com/
Author: 你的名字
Author URI: https://yourdomain.com/
Description: 现代化深色风格新闻资讯WordPress主题，参考国内外一流新闻网站设计。
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modernnews
Tags: news, dark, responsive, modern
*/

/* 基础样式 */
* {
  box-sizing: border-box;
}

body {
  background: #0f1011;
  color: #e8e9ea;
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 16px;
}

/* 链接样式 */
a {
  color: #4fc3f7;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #81d4fa;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航样式 */
.site-header {
  background: #1a1d1f;
  border-bottom: 1px solid #2a2d2f;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo a {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}

.main-menu li a {
  color: #e8e9ea;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.main-menu li a:hover {
  color: #4fc3f7;
  border-bottom-color: #4fc3f7;
}

/* 搜索框样式 */
.header-search {
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input {
  background: #2a2d2f;
  border: 1px solid #3a3d3f;
  border-radius: 25px;
  padding: 8px 16px;
  color: #e8e9ea;
  width: 220px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #4fc3f7;
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.search-btn {
  background: #4fc3f7;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin-left: -40px;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #29b6f6;
}

/* 主要内容区域 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 新闻卡片样式 */
.news-card {
  background: #1a1d1f;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2a2d2f;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.news-card-image {
  position: relative;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 20px;
}

.news-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 12px 0;
}

.news-card-title a {
  color: #fff;
}

.news-card-meta {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.news-card-excerpt {
  color: #ccc;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* 轮播图样式 */
.featured-section {
  margin-bottom: 40px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  height: 400px;
}

.featured-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1d1f;
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 40px 30px 30px;
  color: #fff;
}

.featured-title {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.featured-side-item {
  flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1d1f;
}

.featured-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-side-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px 15px 15px;
  color: #fff;
}

.featured-side-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
}

/* 侧边栏样式 */
.sidebar {
  background: #1a1d1f;
  border-radius: 12px;
  padding: 24px;
  height: fit-content;
  border: 1px solid #2a2d2f;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #4fc3f7;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2d2f;
}

.sidebar-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-list a {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.sidebar-list a:hover {
  color: #4fc3f7;
}

/* 标签云样式 */
.tag-cloud a {
  display: inline-block;
  background: #2a2d2f;
  color: #ccc;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  margin: 4px 4px 4px 0;
  transition: all 0.3s ease;
}

.tag-cloud a:hover {
  background: #4fc3f7;
  color: #000;
}

/* 底部样式 */
.site-footer {
  background: #1a1d1f;
  border-top: 1px solid #2a2d2f;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  text-align: center;
  color: #888;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
  }
  
  .main-menu {
    gap: 20px;
    margin-top: 15px;
  }
  
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px auto;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .featured-main {
    height: 250px;
  }
  
  .featured-side {
    flex-direction: row;
    height: 120px;
  }
  
  .search-input {
    width: 180px;
  }
} 