/* News Page Specific Styles */

/* 页面基础样式 */
.tech-news-page {
    background: #ffffff;
    color: #000000;
    font-family: var(--font-family);
}

/* 新闻主要区域 */
.news-main {
    padding: 2rem 0;
}

/* 确保与公共样式兼容 */
.page-content {
    margin-bottom: 1rem;
}

.default-content .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color, #00d4ff), #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.default-content .page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #666);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 侧边栏小部件样式 */
.sidebar-widget {
    margin-bottom: 1.5rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

/* 小部件标题 */
.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.widget-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* 分类筛选器 */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background-secondary, #f8f9fa);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #333);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color, #00d4ff);
    transform: translateX(4px);
}

.category-item.active {
    background: var(--primary-color, #00d4ff);
    color: white;
    border-color: var(--primary-color, #00d4ff);
}

.category-name {
    font-weight: 500;
    flex: 1;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary, #666);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 搜索小部件 */
.search-form {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--background-secondary, #f8f9fa);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary, #333);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #00d4ff);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary, #666);
}

.search-btn {
    padding: 0.75rem 1rem;
    background: var(--primary-color, #00d4ff);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #0099cc;
    transform: translateY(-1px);
}

/* 最新资讯小部件 */
.recent-news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-news-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--background-secondary, #f8f9fa);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.recent-news-item:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-1px);
}

.recent-news-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-news-content {
    flex: 1;
    min-width: 0;
}

.recent-news-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.3;
}

.recent-news-title a {
    color: var(--text-primary, #333);
    text-decoration: none;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-news-title a:hover {
    color: var(--primary-color, #00d4ff);
}

.recent-news-date {
    color: var(--text-secondary, #666);
    font-size: 0.75rem;
}

/* 标签云小部件 */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--background-secondary, #f8f9fa);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    color: var(--text-secondary, #666);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--primary-color, #00d4ff);
    color: white;
    border-color: var(--primary-color, #00d4ff);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端分类筛选器 */
    .category-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .category-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

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

@media (max-width: 480px) {
    .category-item {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .recent-news-thumb {
        width: 50px;
        height: 50px;
    }
    
    .recent-news-title {
        font-size: 0.8rem;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--background-secondary, #f8f9fa);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.notification-content i:first-child {
    color: var(--primary-color, #00d4ff);
    font-size: 1.25rem;
}

.notification-content span {
    flex: 1;
    color: var(--text-primary, #333);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color, #00d4ff);
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-info {
    border-left: 4px solid var(--primary-color, #00d4ff);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
