/* 百度新闻风格 - 响应式样式 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器 */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.news-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-left .logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
}

/* 搜索框 */
.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-form {
    width: 100%;
}

.search-box {
    display: flex;
    border: 2px solid #e8e8e8;
    border-radius: 24px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: #1890ff;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.search-btn {
    padding: 12px 20px;
    background: #1890ff;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #40a9ff;
}

/* 导航菜单 */
.header-right .nav-menu {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #1890ff;
    background: #f0f8ff;
}

/* 面包屑导航 */
.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb a {
    color: #1890ff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 8px;
    color: #999;
}

.current {
    color: #666;
}

/* 主要内容 */
.news-main {
    flex: 1;
    padding: 20px 0;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 左侧内容 */
.content-left {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 右侧边栏 */
.content-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 标题样式 */
.section-title, .aside-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1890ff;
}

.aside-title {
    font-size: 16px;
    border-bottom: 1px solid #e8e8e8;
}

/* 焦点新闻 */
.focus-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.focus-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.focus-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.focus-img img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.focus-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
}

.focus-title a:hover {
    color: #1890ff;
}

.focus-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.focus-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    transition: box-shadow 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-img img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.news-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.news-title a:hover {
    color: #1890ff;
}

.news-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #999;
    flex-wrap: wrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.page-btn.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 右侧边栏组件 */
.hot-recommend, .category-nav, .latest-articles, .ad-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommend-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommend-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.recommend-title {
    font-size: 14px;
    line-height: 1.4;
}

.recommend-title a {
    color: #333;
    text-decoration: none;
}

.recommend-title a:hover {
    color: #1890ff;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-item:hover,
.category-item.active {
    background: #f0f8ff;
    color: #1890ff;
}

.latest-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-item a {
    text-decoration: none;
    color: inherit;
}

.latest-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #333;
}

.latest-title:hover {
    color: #1890ff;
}

.latest-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #999;
}

.ad-content img {
    width: 100%;
    border-radius: 4px;
}

/* 文章详情页样式 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 24px;
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tag-label {
    color: #666;
}

.tag-item {
    padding: 4px 8px;
    background: #f0f8ff;
    color: #1890ff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.tag-item:hover {
    background: #e6f7ff;
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.article-image {
    margin: 20px 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    border-radius: 8px;
}

.article-text {
    margin-top: 20px;
}

.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.article-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 上一篇下一篇 */
.article-nav {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-prev, .nav-next {
    margin-bottom: 12px;
}

.nav-label {
    color: #666;
    font-size: 14px;
}

.article-nav a {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}

.article-nav a:hover {
    text-decoration: underline;
}

/* 相关文章 */
.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.related-item {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.related-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-img img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-info {
    padding: 12px;
}

.related-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.related-title a:hover {
    color: #1890ff;
}

.related-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* 列表页样式 */
.list-header {
    margin-bottom: 24px;
}

.list-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.list-desc {
    color: #666;
    font-size: 14px;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-img img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.item-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.item-title a:hover {
    color: #1890ff;
}

.item-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.item-meta .meta-tags {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-link {
    padding: 2px 6px;
    background: #f0f8ff;
    color: #1890ff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
}

.tag-link:hover {
    background: #e6f7ff;
}

/* 搜索页样式 */
.search-header {
    margin-bottom: 24px;
}

.search-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.search-desc {
    color: #666;
    font-size: 14px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-img img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.result-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.result-title a:hover {
    color: #1890ff;
}

.result-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.result-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.tag-label {
    color: #999;
}

/* 无搜索结果 */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.no-results-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.no-results-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.no-results-suggestions p {
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
}

.no-results-suggestions ul {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.no-results-suggestions li {
    margin-bottom: 4px;
}

/* 搜索建议 */
.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-item {
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f0f8ff;
    color: #1890ff;
}

/* 底部 */
.news-footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    flex: 1;
}

.copyright, .icp {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr 250px;
        gap: 20px;
    }
    
    .focus-item {
        grid-template-columns: 150px 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }
    
    .header-center {
        margin: 0;
        max-width: 100%;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .focus-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .focus-img img {
        height: 200px;
    }
    
    .news-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .news-img img {
        height: 150px;
    }
    
    .list-item, .result-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .item-img img, .result-img img {
        height: 150px;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
    
    .article-actions {
        justify-content: center;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 12px 16px;
    }
    
    .main-container {
        padding: 0 16px;
    }
    
    .content-left {
        padding: 16px;
    }
    
    .article-detail {
        padding: 16px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .focus-meta, .news-meta, .item-meta, .result-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .search-box {
        border-radius: 20px;
    }
    
    .search-input, .search-btn {
        padding: 10px 14px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .news-header, .breadcrumb, .content-left, .hot-recommend, .category-nav, .latest-articles, .ad-section, .article-detail, .article-nav, .related-articles {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .section-title, .aside-title, .article-title, .focus-title a, .news-title a, .item-title a, .result-title a, .related-title a, .recommend-title a, .latest-title {
        color: #e0e0e0;
    }
    
    .focus-desc, .news-desc, .item-desc, .result-desc {
        color: #b0b0b0;
    }
    
    .focus-item, .news-item, .list-item, .result-item {
        border-color: #444;
    }
    
    .search-box {
        border-color: #444;
    }
    
    .search-input {
        background: transparent;
        color: #e0e0e0;
    }
    
    .page-btn {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .page-btn:hover {
        border-color: #1890ff;
        color: #1890ff;
    }
    
    .page-btn.active {
        background: #1890ff;
        color: #fff;
    }
    
    .category-item:hover,
    .category-item.active {
        background: #3d3d3d;
        color: #1890ff;
    }
    
    .suggestion-item:hover {
        background: #3d3d3d;
        color: #1890ff;
    }
}

/* 打印样式 */
@media print {
    .news-header, .breadcrumb, .content-right, .news-footer, .article-actions, .pagination {
        display: none !important;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .content-left {
        box-shadow: none;
        border: none;
    }
    
    .article-detail {
        box-shadow: none;
        border: none;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.focus-item, .news-item, .list-item, .result-item, .related-item {
    animation: fadeIn 0.5s ease-out;
}

/* 可访问性改进 */
a:focus, button:focus, input:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 