/* 资讯模块专用样式 */

.news-list {
    margin: 20px 0;
}

.news-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.news-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.news-item h4 a {
    color: #1e3c72;
    text-decoration: none;
}

.news-item h4 a:hover {
    color: #2a5298;
}

.news-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.news-category {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.news-date, .news-source {
    display: inline-block;
}

.news-summary {
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
}

.news-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-info {
    color: #666;
    font-weight: bold;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.date-filter label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.date-filter input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #f8f9fa;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* 页码导航按钮样式 */
.btn-page {
    padding: 8px 12px;
    min-width: 40px;
    text-align: center;
    background-color: #ccc;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-page:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.btn-active {
    padding: 8px 12px;
    min-width: 40px;
    text-align: center;
    background-color: #1e3c72;
    color: white;
    border: 1px solid #1e3c72;
    border-radius: 4px;
    font-weight: bold;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 800px;
    max-height: 80vh;
    margin: 2rem auto;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    color: #333;
    background: #e9ecef;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.news-content {
    line-height: 1.8;
}

/* 输入框和按钮美化 */
#news-search {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#news-search:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

#news-category {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
}

#news-category:focus {
    outline: none;
    border-color: #1e3c72;
}

/* 996开发效率贴士特殊样式 */
.tool-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card h3:has(.dev-efficiency-tip)::after {
    content: "💡";
    font-size: 1.2em;
}

.dev-efficiency-tip {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .tool-container {
        flex-direction: column;
    }
    
    .tool-info, .tool-operation {
        width: 100%;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .news-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .filter-container {
        align-items: stretch;
    }
    
    .date-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-filter input {
        width: 100%;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: none;
    }
}