/**
 * 娱乐资讯博客 - 主页样式表
 * 作者：娱乐资讯博客
 * 版本：1.0
 */

/* 全局重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面主体样式 */
body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 页面头部样式 */
.header {
    background: rgba(255,255,255,0.95);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header h1 {
    text-align: center;
    color: #764ba2;
    font-size: 28px;
}

/* 主容器样式 */
.container {
    display: flex;
    max-width: 1400px;
    margin: 100px auto 30px;
    padding: 20px;
    gap: 20px;
}

/* 左侧导航栏样式 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* 导航菜单样式 */
.nav-menu {
    list-style: none;
}

/* 导航项样式 */
.nav-item {
    margin-bottom: 10px;
}

/* 导航标题样式 */
.nav-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-title:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 箭头图标样式 */
.nav-title .arrow {
    transition: transform 0.3s ease;
}

.nav-item.active .nav-title .arrow {
    transform: rotate(180deg);
}

/* 子菜单样式 */
.sub-menu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.nav-item.active .sub-menu {
    max-height: 500px;
}

/* 子菜单项样式 */
.sub-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
}

.sub-menu li:last-child {
    border-bottom: none;
}

.sub-menu li:hover {
    background: #e9ecef;
    padding-left: 25px;
    color: #764ba2;
}

.sub-menu li.active {
    background: #764ba2;
    color: #fff;
}

/* 右侧内容区样式 */
.content {
    flex: 1;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-height: 600px;
}

/* iframe内容框架样式 */
#content-frame {
    width: 100%;
    height: 800px;
    border: none;
    border-radius: 8px;
}

/* 文章标题样式 */
.article-title {
    font-size: 24px;
    color: #764ba2;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

/* 文章内容样式 */
.article-content {
    line-height: 1.8;
    color: #555;
}

.article-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

/* 文章图片样式 - 已移除图片功能 */

/* 欢迎页面样式 */
.welcome {
    text-align: center;
    padding: 50px 20px;
}

.welcome h2 {
    font-size: 32px;
    color: #764ba2;
    margin-bottom: 20px;
}

.welcome p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* 品牌卡片样式 */
.brand-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.brand-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-5px);
}

.brand-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.brand-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #764ba2;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin-top: 80px;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .welcome h2 {
        font-size: 24px;
    }
    
    .brand-cards {
        grid-template-columns: 1fr;
    }
}


/* 新闻资讯导航样式 */
.nav-news .nav-title { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }

/* 新闻列表页面样式 */
.news-list-title { font-size: 28px; color: #764ba2; margin-bottom: 10px; text-align: center; }
.news-list-desc { text-align: center; color: #666; margin-bottom: 25px; }
.news-filter { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 8px 20px; border: none; border-radius: 20px; cursor: pointer; background: #e9ecef; color: #333; transition: all 0.3s ease; }
.filter-btn:hover { background: #667eea; color: #fff; }
.filter-btn.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.news-container { display: flex; flex-direction: column; gap: 12px; }
.news-item { display: flex; align-items: center; padding: 15px; background: #f8f9fa; border-radius: 8px; transition: all 0.3s ease; gap: 15px; }
.news-item:hover { background: #e9ecef; transform: translateX(5px); }
.news-brand { padding: 4px 12px; border-radius: 15px; font-size: 12px; color: #fff; flex-shrink: 0; }
.brand-辉达 { background: #e74c3c; }
.brand-恒盛 { background: #2ecc71; }
.brand-益达 { background: #3498db; }
.brand-星亿 { background: #9b59b6; }
.news-title { flex: 1; color: #333; text-decoration: none; font-size: 15px; transition: color 0.3s ease; }
.news-title:hover { color: #764ba2; }
.news-date { color: #999; font-size: 13px; flex-shrink: 0; }
@media (max-width: 768px) { .news-item { flex-wrap: wrap; } .news-date { width: 100%; text-align: right; margin-top: 5px; } }


/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.page-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #764ba2;
    cursor: default;
}

.page-dots {
    padding: 8px 5px;
    color: #999;
}

.page-info {
    margin-left: 15px;
    color: #666;
    font-size: 13px;
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
    }
    .page-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .page-info {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 综合资讯品牌标签 */
.brand-综合 { background: #f39c12; }
