/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    font-weight: 300;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.header-stats {
    font-size: 0.4em;
    font-weight: normal;
    color: #7f8c8d;
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-stats span {
    display: inline-flex;
    align-items: center;
}

.header-stats span span {
    font-weight: bold;
    color: #3498db;
    margin-left: 5px;
}

/* 导航栏样式 */
.navigation-bar {
    background: #34495e;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navigation-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.navigation-bar li {
    margin: 0;
    display: flex;
    align-items: center;
}

.navigation-bar li:not(:last-child)::after {
    content: "|";
    color: #7f8c8d;
    margin: 0 5px;
    font-size: 14px;
}

.navigation-bar a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navigation-bar a:hover {
    background: #2c3e50;
    border-bottom-color: #3498db;
}

.navigation-bar a.active {
    background: #2c3e50;
    border-bottom-color: #e74c3c;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.control-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.panel-section {
    margin-bottom: 30px;
}

.panel-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.website-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.website-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.website-form button {
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.website-form button:hover {
    background: #2980b9;
}

.website-list {
    max-height: 200px;
    overflow-y: auto;
}

.website-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 5px;
    background: #f9f9f9;
}

.website-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.website-name {
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    text-decoration: none;
}

.website-name:hover {
    color: #3498db;
}

.website-actions {
    display: flex;
    gap: 5px;
}

.website-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.website-actions button:first-child {
    background: #3498db;
    color: white;
}

.website-actions button:last-child {
    background: #e74c3c;
    color: white;
}

.crawl-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#crawlBtn {
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#crawlBtn:hover {
    background: #229954;
}

#crawlBtn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.status.success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status.error {
    background: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status.info {
    background: #e8f4fd;
    color: #3498db;
    border: 1px solid #3498db;
}

.news-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.news-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.1em;
}

.news-list-info-text {
    font-size: 0.9em;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 5px;
}

/* 当前列表展示的新闻说明 */
.news-list-info {
    display: flex;
    align-items: flex-start;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.95em;
}

.news-list-info .info-icon {
    font-size: 1.2em;
    margin-right: 10px;
    flex-shrink: 0;
}

.news-list-info .info-text {
    color: #1976d2;
    line-height: 1.5;
}

.news-dashboard {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-title {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    font-size: 1.2em;
}

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

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease;
}

/* 库内新闻查询区域样式 */
.query-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.query-section.collapsed .query-controls {
    display: none;
}

.query-header {
    margin-bottom: 10px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.query-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.1em;
}

.query-toggle-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.query-section.collapsed .query-toggle-icon {
    transform: translateY(-50%) rotate(-90deg);
}

.query-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.query-control-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.query-control-group label {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.query-control-group select,
.query-control-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.query-control-group select:hover,
.query-control-group input:hover {
    border-color: #3498db;
}

.query-control-group select:focus,
.query-control-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.query-btn {
    padding: 8px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 38px;
    flex-shrink: 0;
    white-space: nowrap;
}

.query-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.query-btn.secondary {
    background: #95a5a6;
}

.query-btn.secondary:hover {
    background: #7f8c8d;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 1.2em !important;
    font-weight: bold !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(45deg, #3498db, #e74c3c, #f39c12, #27ae60) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: colorChange 6s linear infinite !important;
    text-shadow: 0 0 6px rgba(52, 152, 219, 0.3) !important;
}

@keyframes colorChange {
    0% {
        background: linear-gradient(90deg, #3498db, #e74c3c, #f39c12, #27ae60);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    25% {
        background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    50% {
        background: linear-gradient(90deg, #f39c12, #27ae60, #3498db, #e74c3c);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    75% {
        background: linear-gradient(90deg, #27ae60, #3498db, #e74c3c, #f39c12);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    100% {
        background: linear-gradient(90deg, #3498db, #e74c3c, #f39c12, #27ae60);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

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

.news-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.news-actions button:nth-child(1) { background: #9b59b6; color: white; }
.news-actions button:nth-child(2) { background: #3498db; color: white; }
.news-actions button:nth-child(3) { background: #3498db; color: white; }
.news-actions button:nth-child(3).active { background: #27ae60; color: white; }

.news-list {
    min-height: 400px;
}

.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 50px;
}

.news-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.2s;
    cursor: default;
}

.news-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item.selected {
    border-color: #3498db;
    background: #f8f9fa;
}

.news-item.sortable-ghost {
    opacity: 0.4;
}

.news-item-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.news-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.news-checkbox {
    margin-right: 0;
}

.drag-handle {
    margin-right: 10px;
    color: #bdc3c7;
    cursor: default;
}

.reorder-mode .drag-handle {
    cursor: grab;
}

.reorder-mode .drag-handle:active {
    cursor: grabbing;
}

.reorder-mode .news-item {
    cursor: move;
}

.reorder-mode .news-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.reorder-mode .news-item .drag-handle {
    color: #3498db;
    font-weight: bold;
}

.news-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    word-wrap: break-word;
    line-height: 1.4;
}

.news-content {
    padding: 15px;
    color: #34495e;
    line-height: 1.6;
}

/* 搜索结果关键词高亮 */
.highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

.reorder-mode .news-title:hover {
    color: #2c3e50;
    text-decoration: none;
}

.news-date {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: normal;
    flex-shrink: 0;
    white-space: nowrap;
}

.news-source {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.website-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.website-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.news-actions-btn {
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

.news-actions-btn button {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn { background: #3498db; color: white; }
.view-btn { background: #9b59b6; color: white; }
.delete-btn { background: #e74c3c; color: white; }
.share-btn { background: #27ae60; color: white; }
.download-btn { background: #27ae60; color: white; }

/* Modal样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    -webkit-backface-visibility: hidden; /* 改善移动端性能 */
    backface-visibility: hidden;
}

.modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
    -webkit-transform: translateZ(0); /* 启用硬件加速 */
    transform: translateZ(0);
}

.modal-content-wide {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content-crawl {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 统一对话框样式 */
.modal-content-small {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.alert-icon {
    font-size: 48px;
    font-weight: bold;
    flex-shrink: 0;
}

.alert-message {
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.5;
}

.alert-actions {
    display: flex;
    justify-content: center;
}

.alert-actions button {
    padding: 10px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.alert-actions button:hover {
    background: #2980b9;
}

/* 居中提示框样式 */
.modal-content-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 400px;
    width: 90%;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1001;
    text-align: center;
}

.modal-content-center h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content-center .success-icon {
    font-size: 48px;
    color: #27ae60;
    margin-bottom: 15px;
}

.modal-content-center .message {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-content-center .close-btn {
    padding: 10px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.modal-content-center .close-btn:hover {
    background: #219a52;
}

/* 抓取过程和结果内容的显示控制 */
#crawlProcessContent,
#crawlResultsContent {
    display: none !important;
}

/* 确保内容区域有足够的空间 */
#crawlProcessContent,
#crawlResultsContent {
    padding: 10px 0;
}

/* 进度容器样式 */
.process-progress-container {
    width: 100%;
    margin: 15px 0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-actions button[type="submit"] {
    background: #27ae60;
    color: white;
}

.form-actions button[type="button"] {
    background: #95a5a6;
    color: white;
}

/* 标签页样式 */
.tab-button {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    color: #666;
    cursor: pointer;
    float: left;
    outline: none;
    padding: 10px 20px;
    transition: 0.3s;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
    margin-right: 2px;
}

.tab-button:hover {
    background-color: #ddd;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.tab-content {
    display: none;
    padding: 15px;
    border: 1px solid #ccc;
    border-top: none;
    clear: both;
}

.tab-content.active {
    display: block;
}

/* 分页控制样式 */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

.pagination-controls button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pagination-controls button:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #3498db;
}

.pagination-controls button:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 进度条样式 */
.progress-container {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    background: -webkit-linear-gradient(90deg, #27ae60, #2ecc71);
    background: -moz-linear-gradient(90deg, #27ae60, #2ecc71);
    background: -o-linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    transition: width 0.3s ease;
    -webkit-transition: width 0.3s ease;
    -moz-transition: width 0.3s ease;
    -o-transition: width 0.3s ease;
    width: 0%;
    will-change: width; /* 性能优化，提示浏览器此属性将频繁变化 */
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: bold;
    -webkit-font-smoothing: antialiased; /* 改善字体渲染 */
    -moz-osx-font-smoothing: grayscale;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: 2;
    }
    
    .news-section {
        order: 1;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    /* 分页控件优化 */
    .pagination-controls {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 10px 0;
        margin-top: 5px;
    }
    
    .pagination-controls button {
        padding: 6px 8px;
        font-size: 12px;
        white-space: nowrap;
        min-width: 40px;
    }
    
    .pagination-controls span {
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* 标题栏优化 */
    header h1 {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .header-stats {
        font-size: 0.5em;
        gap: 15px;
    }
    
    /* 导航栏优化 - 移除图标 */
    .navigation-bar a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* 新闻查询栏默认折叠 */
    .query-section.collapsed .query-controls {
        display: none;
    }
    
    .query-header {
        margin-bottom: 0;
        padding-bottom: 8px;
    }
    
    .query-toggle-icon {
        right: 8px;
        font-size: 12px;
    }
    
    /* 新闻操作按钮优化 */
    .news-actions {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
    }
    
    .news-actions button {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 新闻列表优化 */
    .news-item-header {
        gap: 3px;
        padding: 8px 10px;
    }
    
    .news-header-row {
        gap: 5px;
    }
    
    .news-actions-row {
        gap: 5px;
    }
    
    .news-title {
        font-size: 14px;
        flex: 1;
        min-width: 0;
    }
    
    .news-date {
        font-size: 11px;
    }
    
    .news-source {
        font-size: 11px;
        flex-shrink: 0;
    }
    
    .news-actions-btn {
        display: flex;
        gap: 3px;
        flex-shrink: 0;
    }
    
    .news-actions-btn button {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 40px;
        white-space: nowrap;
    }
    
    /* 分享按钮样式 */
    .share-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 40px;
        white-space: nowrap;
    }
    
    .news-checkbox {
        margin: 0 5px 0 0;
        flex-shrink: 0;
    }
    
    .news-content {
        padding: 10px;
        font-size: 13px;
    }
    
    /* 模态框优化 - 全屏显示 */
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
        padding: 15px;
        overflow-y: auto;
    }
    
    .modal-content-wide {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    .modal-content-crawl {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    /* 隐藏header的关闭按钮 */
    #viewDownloadModal .close,
    #editModal .close {
        display: none;
    }
    
    /* 优化查看新闻详情模态框布局 */
    #viewDownloadModal .view-download-content {
        height: 100vh;
        max-height: none;
        padding: 15px;
    }
    
    #viewDownloadModal .view-download-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    #viewDownloadModal .view-download-meta {
        padding: 8px;
        margin-bottom: 10px;
        font-size: 12px;
    }
    
    #viewDownloadModal .view-download-body {
        max-height: calc(100vh - 200px);
        padding: 10px;
        font-size: 13px;
    }
    
    #viewDownloadModal .view-download-actions {
        margin-top: 10px;
        text-align: center;
    }
    
    #viewDownloadModal .view-download-actions button {
        flex: 1;
        min-width: 30%;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    /* 优化编辑模态框布局 */
    #editModal .view-download-content {
        height: 100vh;
        max-height: none;
        padding: 15px;
    }
    
    #editModal .form-group {
        margin-bottom: 10px;
    }
    
    #editModal .form-group label {
        font-size: 13px;
    }
    
    #editModal .form-group input,
    #editModal .form-group textarea {
        font-size: 13px;
        padding: 8px;
    }
    
    #editModal .form-actions {
        display: flex;
        gap: 10px;
    }
    
    #editModal .form-actions button {
        flex: 1;
        padding: 10px;
        font-size: 14px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 10px 0;
    }
    
    /* 按钮优化 */
    .modal-header button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .modal-footer {
        padding: 15px 0 0 0;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .modal-footer button {
        flex: 1;
        min-width: 45%;
        padding: 10px;
        font-size: 14px;
    }
    
    .news-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .news-actions {
        flex-wrap: wrap;
    }
}

/* ==================== 下载目录样式 ==================== */

.downloads-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

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

.downloads-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.downloads-header .downloads-count {
    color: #666;
    font-size: 0.9em;
}

.downloads-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.downloads-controls .search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.downloads-controls .search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.downloads-controls .search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.downloads-controls .search-btn {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.downloads-controls .search-btn:hover {
    background: #2980b9;
}

.downloads-controls .reset-btn {
    padding: 10px 20px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.downloads-controls .reset-btn:hover {
    background: #7f8c8d;
}

.downloads-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.downloads-table thead {
    background: #f8f9fa;
}

.downloads-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.downloads-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.downloads-table tbody tr:hover {
    background: #f5f5f5;
}

.downloads-table .text-center {
    text-align: center;
}

.downloads-table .text-left {
    text-align: left;
}

.downloads-table .empty-cell {
    text-align: center;
    padding: 40px;
    color: #999;
}

.downloads-table .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.downloads-table .empty-state p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.view-btn {
    background: #27ae60;
    color: white;
}

.view-btn:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 查看文件模态框样式 */
#viewFileModal .modal-content {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

#viewFileModal pre {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

#viewFileModal h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

#viewFileModal p {
    margin: 5px 0 15px;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .downloads-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .downloads-controls {
        flex-direction: column;
    }
    
    .downloads-controls .search-box {
        width: 100%;
    }
    
    .downloads-table {
        font-size: 12px;
    }
    
    .downloads-table th,
    .downloads-table td {
        padding: 8px;
    }
}

/* 下载目录预览样式 */
.view-download-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 40px);
}

.view-download-content h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.view-download-meta {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #6c757d;
    font-size: 14px;
    flex-shrink: 0;
}

.view-download-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
}

.view-download-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin: 0;
}

/* 读取内容区域样式 */
.read-content-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.read-content-area h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    flex-shrink: 0;
}

.read-content-body {
    flex: 1;
    min-height: 300px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    padding: 5px;
}

.read-content-body p {
    margin-bottom: 10px;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.read-content-loading {
    text-align: center;
    padding: 50px;
    color: #95a5a6;
    font-size: 16px;
}

.view-download-actions {
    margin-top: 20px;
    text-align: right;
    flex-shrink: 0;
}

.view-download-actions button {
    padding: 8px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.view-download-actions button:hover {
    background-color: #5a6268;
}

/* 查看模态框按钮颜色区分 */
.view-download-actions .btn-download {
    background-color: #27ae60;
}

.view-download-actions .btn-download:hover {
    background-color: #219a52;
}

.view-download-actions .btn-read {
    background-color: #e67e22;
}

.view-download-actions .btn-read:hover {
    background-color: #d35400;
}

.view-download-actions .btn-source {
    background-color: #3498db;
}

.view-download-actions .btn-source:hover {
    background-color: #2980b9;
}

.view-download-actions .btn-edit {
    background-color: #9b59b6;
}

.view-download-actions .btn-edit:hover {
    background-color: #8e44ad;
}

.view-download-actions .btn-close {
    background-color: #95a5a6;
}

.view-download-actions .btn-close:hover {
    background-color: #7f8c8d;
}

/* 编辑模态框样式调整 */
#editModal .view-download-content {
    max-height: calc(90vh - 40px);
}

#editModal .form-group {
    margin-bottom: 15px;
}

#editModal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

#editModal .form-group input,
#editModal .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

#editModal .form-group textarea {
    resize: vertical;
    min-height: 200px;
}

#editModal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

#editModal .form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#editModal .form-actions button[type="submit"] {
    background: #27ae60;
    color: white;
}

#editModal .form-actions button[type="button"] {
    background: #95a5a6;
    color: white;
}

/* ========== 社情民意板块 ========== */
.sheqing-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

/* 搜索关键词高亮 */
mark.search-highlight {
    background-color: #fff3b0;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.sheqing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    flex-wrap: wrap;
    gap: 8px;
}

.sheqing-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.1em;
}

.sheqing-subtitle {
    font-size: 0.8em;
    color: #95a5a6;
    font-weight: normal;
    margin-left: 5px;
}

.sheqing-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sheqing-forum-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    color: #2c3e50;
}

.sheqing-forum-select:focus {
    outline: none;
    border-color: #e74c3c;
}

.sheqing-update-time {
    font-size: 12px;
    color: #95a5a6;
    font-weight: normal;
    margin-left: 8px;
}

.sheqing-refresh-btn {
    padding: 5px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.sheqing-refresh-btn:hover {
    background: #c0392b;
}

.sheqing-loading {
    text-align: center;
    padding: 30px;
    color: #95a5a6;
    font-size: 14px;
}

.sheqing-error {
    background: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.sheqing-empty {
    text-align: center;
    padding: 30px;
    color: #95a5a6;
}

.sheqing-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sheqing-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.sheqing-item:hover {
    background-color: #fafafa;
}

.sheqing-item-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    margin-top: 2px;
}

.sheqing-item-body {
    flex: 1;
    min-width: 0;
}

.sheqing-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sheqing-item-title {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.sheqing-item-title:hover {
    color: #e74c3c;
    text-decoration: underline;
}

.sheqing-state {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
    color: #7f8c8d;
    white-space: nowrap;
}

.sheqing-state.state-done {
    background: #d5f4e6;
    color: #27ae60;
}

.sheqing-state.state-pending {
    background: #fef9e7;
    color: #f39c12;
}

.sheqing-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.sheqing-item-forum {
    font-size: 12px;
    color: #95a5a6;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
}

.sheqing-item-date {
    font-size: 12px;
    color: #95a5a6;
}

.sheqing-item-type {
    font-size: 11px;
    color: #8e44ad;
    background: #f4ecf7;
    padding: 1px 6px;
    border-radius: 3px;
}

.sheqing-item-content {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    padding: 6px 10px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #ddd;
}

.sheqing-item-answer {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f0f8f0;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
}

.sheqing-answer-label {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    color: white;
    background: #27ae60;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 6px;
}

.sheqing-answer-text {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

.sheqing-answer-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #7f8c8d;
}

/* 社情民意搜索框 */
.sheqing-search {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 160px;
    outline: none;
    transition: border-color 0.2s;
}

.sheqing-search:focus {
    border-color: #e74c3c;
}

/* 社情民意分页栏 */
.sheqing-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 4px 0;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.sheqing-page-info {
    font-size: 12px;
    color: #95a5a6;
    white-space: nowrap;
}

.sheqing-page-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.sheqing-page-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: white;
    color: #2c3e50;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.sheqing-page-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.sheqing-page-btn.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.sheqing-loadmore {
    width: 100%;
    text-align: center;
    padding: 8px 0 4px 0;
}

.sheqing-loadmore-btn {
    padding: 8px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.sheqing-loadmore-btn:hover {
    background: #c0392b;
}

/* 留言内容区域 — 默认展开全文 */
.sheqing-item-content {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    word-break: break-word;
    background: #fafafa;
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid #eee;
    position: relative;
}

.sheqing-item-answer {
    margin-top: 8px;
    padding: 10px;
    background: #f0faf0;
    border: 1px solid #c8e6c9;
    border-left: 3px solid #4caf50;
    border-radius: 4px;
}

/* ===== 社情民意标签页 ===== */
.sheqing-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e74c3c;
}

.sheqing-tab {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px 6px 0 0;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    outline: none;
}

.sheqing-tab:hover {
    background: #eee;
    color: #2c3e50;
}

.sheqing-tab.active {
    background: white;
    color: #e74c3c;
    border-bottom: 2px solid #e74c3c;
    font-weight: bold;
}

.sheqing-tab-content {
    display: none;
    padding: 15px 0 0 0;
}

.sheqing-tab-content.active {
    display: block;
}

/* 社情民意三板块不同颜色 */
.sheqing-tab.tab-people {
    color: #c0392b;
}
.sheqing-tab.tab-zhuhai {
    color: #2471a3;
}
.sheqing-tab.tab-proposal {
    color: #d35400;
}

.sheqing-tab.active.tab-people {
    background: #e74c3c;
    color: #fff;
    border-bottom-color: #e74c3c;
}
.sheqing-tab.active.tab-zhuhai {
    background: #2980b9;
    color: #fff;
    border-bottom-color: #2980b9;
}
.sheqing-tab.active.tab-proposal {
    background: #e67e22;
    color: #fff;
    border-bottom-color: #e67e22;
}
.sheqing-tab.tab-people:hover:not(.active) {
    background: #fadbd8;
}
.sheqing-tab.tab-zhuhai:hover:not(.active) {
    background: #d4e6f1;
}
.sheqing-tab.tab-proposal:hover:not(.active) {
    background: #fdebd0;
}