/* News section styles */
.news-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

/* 新添加的滚动容器 */
.news-scroll-container {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

/* 隐藏 Webkit 滚动条 */
.news-scroll-container::-webkit-scrollbar {
    display: none;
}

/* 添加渐变阴影提示 */
.news-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(var(--bg-primary-rgb), 0),
        var(--bg-primary) 90%
    );
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* 当滚动到底部时隐藏渐变 */
.news-container.at-bottom::after {
    opacity: 0;
}

.news-section {
    max-width: 800px;
    margin: 0 auto;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-date {
    min-width: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-content {
    flex: 1;
    color: var(--text-primary);
}

/* Responsive design */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 5px;
    }

    .news-item:hover {
        transform: none;
    }

    .news-date {
        font-size: 0.85rem;
        min-width: auto;
    }

    .news-content {
        font-size: 0.95rem;
    }
}

.news-time-ago {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.news-content a {
    text-decoration: none;
    color: var(--link-color);
    transition: opacity 0.2s ease;
}

.news-content a:hover {
    opacity: 0.7;
}

.hidden {
    display: none;
}

.news-controls {
    text-align: center;
    margin-top: 20px;
}

.news-toggle {
    background-color: transparent;
    color: var(--link-color);
    border: 1px solid var(--link-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.news-toggle:hover {
    background-color: var(--link-color);
    color: var(--bg-primary);
}

.news-toggle i {
    transition: transform 0.3s ease;
}

.news-toggle.expanded i {
    transform: rotate(180deg);
}

/* Animation for expanding/collapsing */
.news-list.animating {
    overflow: hidden;
}

.oral-presentation {
    color: #ff4444;
    font-weight: bold;
} 