:root {
    --primary-color: #2d6ed7;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --ad-bg: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.nav {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.ad-slot {
    background-color: var(--ad-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.ad-size {
    font-size: 10px;
    color: var(--text-light);
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
}

.ad-leaderboard {
    min-height: 90px;
    max-width: 728px;
    margin: 16px auto;
}

.ad-leaderboard[data-size="728x90"] {
    height: 90px;
}

.ad-leaderboard[data-size="320x50"] {
    height: 50px;
    max-width: 320px;
}

.ad-mid-content {
    min-height: 250px;
    margin: 24px auto;
    max-width: 300px;
}

.ad-mid-content[data-size="300x250"] {
    width: 300px;
    height: 250px;
}

.ad-sidebar {
    min-height: 600px;
    margin: 24px auto;
    max-width: 300px;
}

.ad-sidebar[data-size="300x600"] {
    width: 300px;
    height: 600px;
}

.ad-sidebar[data-size="160x600"] {
    width: 160px;
    height: 600px;
}

.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 0;
    min-height: 50px;
    z-index: 99;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-sticky-footer[data-size="320x50"] {
    max-width: 320px;
    height: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.ad-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.featured-section {
    margin: 24px 0;
}

.featured-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 24px;
    border-top: 4px solid transparent;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-top-color: var(--primary-color);
}

.featured-image {
    display: none;
}

.featured-content {
    padding: 0;
}

.category {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.featured-excerpt {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.category-header {
    margin: 32px 0 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.category-description {
    font-size: 16px;
    color: var(--text-light);
}

.meta {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.author {
    font-weight: 500;
}

.date {
    color: var(--text-light);
}

.news-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
    padding-bottom: 80px;
}

.news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
    border-top: 3px solid transparent;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-top-color: var(--primary-color);
}

.news-image {
    display: none;
}

.news-content {
    padding: 0;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 80px;
}

.article {
    background-color: #ffffff;
    padding: 24px 0;
    flex: 1;
    max-width: 100%;
}

.article-header {
    margin-bottom: 20px;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

@media (max-width: 767px) {
    .article-image {
        display: none;
    }
}

.article-content {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    text-align: justify;
}

.article-content p {
    margin-bottom: 20px;
}

.ad-article-top {
    min-height: 90px;
    margin: 20px auto;
    max-width: 728px;
}

.ad-article-top[data-size="728x90"] {
    height: 90px;
}

.ad-article-top[data-size="320x100"] {
    height: 100px;
    max-width: 320px;
}

.ad-article-mid {
    min-height: 250px;
    margin: 32px auto;
    max-width: 300px;
}

.ad-article-mid[data-size="300x250"] {
    width: 300px;
    height: 250px;
}

.ad-article-mid-728 {
    min-height: 90px;
    margin: 32px auto;
    max-width: 728px;
}

.ad-article-mid-728[data-size="728x90"] {
    width: 728px;
    height: 90px;
}

.ad-article-bottom {
    min-height: 280px;
    margin: 32px auto 24px;
    max-width: 336px;
}

.ad-article-bottom[data-size="336x280"] {
    width: 336px;
    height: 280px;
}

.ad-article-bottom[data-size="300x250"] {
    width: 300px;
    height: 250px;
}

.next-article-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: #ffffff;
    text-align: center;
    padding: 24px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    margin: 32px 0;
    position: relative;
    overflow: hidden;
}

.next-article-btn::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;
}

.next-article-btn:hover::before {
    left: 100%;
}

.next-article-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

.next-article-btn:active {
    transform: translateY(-1px);
}

.next-article-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.next-article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.next-article-arrow {
    font-size: 24px;
    font-weight: 700;
    animation: arrowBounce 1.5s infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

.sidebar {
    background-color: #ffffff;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.related-card {
    display: block;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-top: 3px solid transparent;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-top-color: var(--primary-color);
}

.related-image {
    display: none;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 8px 0;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card .category {
    font-size: 10px;
    padding: 3px 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.related-card .meta {
    font-size: 12px;
    margin-top: 8px;
}

.ad-sidebar-sticky {
    min-height: 600px;
    margin-top: 24px;
    margin-bottom: 24px;
    max-width: 300px;
}

.ad-sidebar-sticky[data-size="300x600"] {
    width: 300px;
    height: 600px;
}

.ad-sidebar-sticky[data-size="160x600"] {
    width: 160px;
    height: 600px;
}

.footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 40px;
    text-align: center;
}

.footer p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .logo {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .nav {
        gap: 24px;
    }

    .nav-link {
        font-size: 15px;
    }

    .featured-title {
        font-size: 32px;
    }

    .featured-excerpt {
        font-size: 18px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .ad-mid-content {
        grid-column: 1 / -1;
    }

    .ad-sidebar {
        position: sticky;
        top: 100px;
        grid-column: 1 / -1;
    }

    .article-layout {
        flex-direction: row;
        gap: 40px;
    }

    .article {
        flex: 1;
        max-width: 700px;
    }

    .sidebar {
        width: 320px;
        flex-shrink: 0;
    }

    .related-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .related-card {
        margin-bottom: 0;
    }

    .related-title {
        font-size: 14px;
    }

    .article-title {
        font-size: 36px;
    }

    .next-article-btn {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1024px) {
    .header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        margin-bottom: 0;
    }

    .featured-title {
        font-size: 36px;
    }

    .article {
        max-width: 750px;
    }

    .sidebar {
        width: 400px;
    }

    .related-grid {
        gap: 20px;
    }
}