/* 军事新闻网站 - 现代化样式 */

/* CSS Variables - 军事主题配色 */
:root {
    --primary-color: #1a472a;        /* 军绿色 */
    --secondary-color: #2c3e50;      /* 深蓝灰 */
    --accent-color: #dc2626;         /* 战斗红 */
    --military-gold: #d4af37;        /* 军用金色 */
    --text-color: #1a1a1a;          /* 深黑文字 */
    --text-light: #4a5568;          /* 中灰文字 */
    --text-muted: #718096;          /* 浅灰文字 */
    --border-color: #e2e8f0;        /* 边框色 */
    --bg-color: #f7fafc;            /* 背景色 */
    --bg-military: #1a472a;         /* 军用背景 */
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(26, 71, 42, 0.1);
    --shadow-hover: 0 8px 25px rgba(26, 71, 42, 0.15);
    --shadow-military: 0 2px 8px rgba(220, 38, 38, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-military: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #edf2f7 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* 军事风格背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(26, 71, 42, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header 样式 - 军事风格 */
.header {
    background: var(--gradient-military);
    border-bottom: 3px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(26, 71, 42, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--military-gold) 20%, 
        var(--military-gold) 80%, 
        transparent 100%);
}

.header::after {
    content: '⚔️ 专业军事资讯平台 ⚔️';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--white);
    padding: 2px 15px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo a {
    font-size: 28px;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: var(--transition);
    position: relative;
    letter-spacing: 1px;
}

.logo a::before {
    content: '🛡️';
    margin-right: 8px;
    font-size: 24px;
}

.logo a:hover {
    color: var(--military-gold);
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav {
    display: flex;
    gap: 35px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
    letter-spacing: 0.5px;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #b91c1c 100%);
    border-radius: var(--border-radius);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
    border-color: var(--military-gold);
}

/* Loading 样式 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid #dc2626;
}

.hero-content h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hot-topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.hot-topic-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.hot-topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.hot-topic-item h4 {
    color: #212529;
    margin-bottom: 10px;
    font-size: 18px;
}

.hot-topic-item p {
    color: #666;
    margin-bottom: 8px;
}

.topic-count {
    color: #dc2626;
    font-weight: bold;
    font-size: 14px;
}

/* Featured News */
.featured-section {
    margin-bottom: 30px;
}

.featured-section h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #212529;
    padding-bottom: 10px;
    border-bottom: 3px solid #dc2626;
    position: relative;
}

.featured-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #000;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.featured-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.featured-content {
    padding: 20px;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 12px;
}

.category-tech { background: #17a2b8; }
.category-drill { background: #28a745; }
.category-equipment { background: #ffc107; color: #000; }
.category-navy { background: #007bff; }
.category-airforce { background: #6f42c1; }
.category-cooperation { background: #fd7e14; }
.category-situation { background: #dc3545; }
.category-defense { background: #6c757d; }

.featured-card h3 a {
    color: #212529;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.featured-card h3 a:hover {
    color: #dc2626;
}

.featured-card p {
    color: #666;
    margin: 12px 0;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
    margin-top: 15px;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Content Area */
.content-area {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-section, .categories-section {
    margin-bottom: 30px;
}

.news-section h3, .categories-section h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #212529;
    padding-bottom: 8px;
    border-bottom: 2px solid #dc2626;
}

/* News Cards */
.news-list {
    display: grid;
    gap: 20px;
}

.news-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #fff;
}

.news-card:hover {
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.news-card h4 a {
    color: #212529;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-card h4 a:hover {
    color: #dc2626;
}

.category-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.news-card-content p {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

.news-card-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.news-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    padding: 2px 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover, .tag-item.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.tag-item.small {
    font-size: 11px;
    padding: 1px 6px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.category-card {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.category-card h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.category-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.category-card:hover p,
.category-card:hover .news-count {
    color: #fff;
}

.news-count {
    font-size: 12px;
    color: #999;
    font-weight: bold;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.sidebar-widget h3 {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    color: #fff;
    padding: 15px 18px;
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    border-bottom: 2px solid #dc2626;
}

.tag-cloud, .ranking-list, .stats-chart {
    padding: 18px;
}

/* Tag Cloud */
.tag-cloud-item {
    display: inline-block;
    margin: 4px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tag-cloud-item:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    transform: scale(1.05);
}

/* Ranking List */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: #f8f9fa;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
}

.ranking-item.top-rank .rank-number {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

.rank-number {
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
}

.rank-content {
    flex: 1;
}

.rank-content h5 a {
    color: #212529;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.rank-content h5 a:hover {
    color: #dc2626;
}

.rank-reads {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Stats Chart */
.stats-item {
    margin-bottom: 15px;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.stats-info, .stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stats-icon {
    font-size: 16px;
    margin-right: 8px;
}

.stats-name {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.stats-count {
    font-size: 12px;
    color: #999;
    font-weight: bold;
}

.stats-bar {
    height: 6px;
    background: #f8f9fa;
    border-radius: 3px;
    overflow: hidden;
}

.stats-progress {
    height: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* News Detail Page */
.news-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.article-title {
    font-size: 28px;
    font-weight: bold;
    color: #212529;
    line-height: 1.3;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Article Content */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.content-intro {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #dc2626;
    border-radius: 4px;
}

.content-section {
    margin-bottom: 25px;
}

.content-section h3 {
    font-size: 20px;
    color: #212529;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dc2626;
}

.content-section p {
    margin-bottom: 15px;
}

.highlights, .advantages, .projects {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.highlights h4, .advantages h4, .projects h4 {
    color: #dc2626;
    margin-bottom: 10px;
    font-size: 16px;
}

.highlights ul, .advantages ul, .projects ul {
    padding-left: 20px;
}

.highlights li, .advantages li, .projects li {
    margin-bottom: 6px;
    color: #666;
}

.data-box, .specs, .scale {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.data-box h4, .specs h4, .scale h4 {
    color: #212529;
    margin-bottom: 12px;
    font-size: 16px;
}

.data-item, .spec-item, .scale-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
}

.data-item:last-child, .spec-item:last-child, .scale-item:last-child {
    border-bottom: none;
}

.content-conclusion {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    font-weight: 500;
}

/* Related News */
.related-news {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.related-news h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #212529;
    border-bottom: 2px solid #dc2626;
    padding-bottom: 8px;
}

.related-item {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.related-item:last-child {
    border-bottom: none;
}

.related-item:hover {
    background: #f8f9fa;
    margin: 0 -25px;
    padding-left: 25px;
    padding-right: 25px;
}

.related-item h4 a {
    color: #212529;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.related-item h4 a:hover {
    color: #dc2626;
}

.related-item p {
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

/* Category Page */
.category-page {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.category-title {
    font-size: 28px;
    color: #212529;
    margin-bottom: 8px;
}

.category-description {
    color: #666;
    font-size: 16px;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-icon {
    font-size: 48px;
}

.category-nav {
    margin-bottom: 25px;
}

.category-nav h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #212529;
}

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

.category-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-nav-item:hover,
.category-nav-item.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.category-nav-icon {
    font-size: 16px;
}

.category-nav-count {
    font-size: 12px;
    opacity: 0.8;
}

.news-grid {
    display: grid;
    gap: 20px;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-message h2 {
    color: #dc2626;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    border-top: 3px solid #dc2626;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

.footer-content p {
    color: #adb5bd;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .nav {
        gap: 15px;
        margin-top: 10px;
    }

    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-content h2 {
        font-size: 20px;
    }

    .hot-topics {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .content-area {
        padding: 20px 15px;
    }

    .news-detail {
        padding: 20px 15px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo a {
        font-size: 20px;
    }

    .nav {
        gap: 10px;
    }

    .nav-link {
        font-size: 12px;
        padding: 4px 8px;
    }

    .hot-topic-item,
    .featured-card,
    .news-card {
        padding: 15px;
    }

    .article-title {
        font-size: 20px;
    }

    .content-intro {
        font-size: 16px;
        padding: 15px;
    }
    
    .news-ad-container {
        margin: 10px 0 !important;
    }
    
    .news-ad-container > div {
        min-height: 120px !important;
        padding: 10px !important;
    }
}

/* ==================== 新闻广告系统样式 ==================== */

/* 新闻广告容器 */
.news-ad-container {
    margin: 15px 0;
    animation: fadeInUp 0.5s ease-out;
}

.news-ad-container > div {
    min-height: 140px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.news-ad-container > div:hover {
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

/* 广告加载占位符 */
.ad-loading-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.ad-loading-placeholder:not(.converted-content) {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 占位符转换为内容后的样式 */
.ad-loading-placeholder.converted-content {
    background: #fff;
    animation: none;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.ad-loading-placeholder.converted-content:hover {
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

/* 加载动画 - 改进版 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 广告成功加载后的样式 */
.news-ad-container[data-loaded="true"] {
    margin: 15px 0;
}

.news-ad-container[data-loaded="true"] > div {
    background: #fff;
    border-color: #e9ecef;
    min-height: auto;
}

.news-ad-container[data-loaded="true"] iframe {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 广告失败回退样式 */
.ad-fallback-content {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-fallback-content:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ad-fallback-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.ad-fallback-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 广告状态指示器 */
.ad-status-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-ad-container[data-loaded="true"] .ad-status-indicator {
    opacity: 1;
}

.news-ad-container[data-loading="true"] .ad-status-indicator {
    background: #ffc107;
    opacity: 1;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 广告性能优化类 */
.news-ad-container.lazy-loaded {
    animation: fadeInUp 0.6s ease-out;
}

.news-ad-container.priority-high {
    animation-delay: 0s;
}

.news-ad-container.priority-low {
    animation-delay: 0.2s;
}

/* ==================== 原生广告样式 ==================== */

/* 原生广告卡片 - 完全融入新闻流 */
.native-ad-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    background: var(--white);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.native-ad-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 原生广告标识 - 小而不显眼 */
.native-ad-label {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    opacity: 0.8;
}

/* 原生广告容器 */
.native-ad-container {
    margin-top: 10px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* 专题推荐标签样式 */
.category-tag:contains("专题推荐") {
    background: var(--gradient-gold) !important;
    color: var(--text-color) !important;
    font-weight: 600;
    position: relative;
}

.category-tag:contains("专题推荐")::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-top: 8px solid var(--military-gold);
}

/* 增强军事风格的新闻卡片 */
.news-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-military);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover::before {
    opacity: 1;
}

.news-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 军事风格分类标签 */
.category-tech { background: var(--gradient-military); }
.category-drill { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.category-equipment { background: var(--gradient-gold); color: var(--text-color) !important; }
.category-navy { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
.category-airforce { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.category-cooperation { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.category-situation { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.category-defense { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); }

/* 军事风格按钮 */
.btn-primary {
    background: var(--gradient-military);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-military);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 71, 42, 0.3);
}

/* ==================== 侧边栏紧凑布局样式 ==================== */

/* 主要广告横幅 */
.main-ad-banner {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

/* 侧边栏今日热点 */
.hot-topics-sidebar .hot-topics-compact {
    padding: 0;
}

.hot-topic-item-compact {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.hot-topic-item-compact:last-child {
    border-bottom: none;
}

.hot-topic-item-compact:hover {
    background: #f8f9fa;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 6px;
}

.topic-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.topic-rank {
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.topic-info {
    flex: 1;
}

.topic-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
    margin-bottom: 4px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.topic-info h5:hover {
    color: #dc2626;
}

.topic-count {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

/* 侧边栏头条新闻 */
.featured-news-sidebar .featured-news-compact {
    padding: 0;
}

.featured-card-compact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.featured-card-compact:last-child {
    border-bottom: none;
}

.featured-card-compact:hover {
    background: #f8f9fa;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 6px;
}

.featured-rank {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.featured-content-compact {
    flex: 1;
    min-width: 0;
}

.category-badge-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.featured-content-compact h5 {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-content-compact h5 a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content-compact h5 a:hover {
    color: #dc2626;
}

.news-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #999;
}

.read-count {
    color: #dc2626;
    font-weight: 500;
}

.publish-time {
    color: #666;
}

/* 响应式设计 - 侧边栏紧凑布局 */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1; /* 在移动端将侧边栏移到上方 */
        margin-bottom: 20px;
    }
    
    .hot-topics-sidebar,
    .featured-news-sidebar {
        margin-bottom: 15px;
    }
    
    .topic-header,
    .featured-card-compact {
        padding: 10px 0;
    }
    
    .topic-info h5,
    .featured-content-compact h5 {
        font-size: 13px;
    }
    
    .main-ad-banner {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .topic-rank,
    .featured-rank {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .topic-info h5 {
        font-size: 12px;
    }
    
    .featured-content-compact h5 {
        font-size: 12px;
    }
    
    .news-meta-compact {
        font-size: 10px;
    }
}
