/* 通用样式 */
.module-section {
    display: none;
}

.module-section.active {
    display: block;
}

/* 卡片样式 */
.article-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.clickable-card {
    cursor: pointer;
}

/* 文章样式 */
.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-content {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    height: 4.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.article-content-detail {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.article-content-detail p {
    margin-bottom: 1rem;
    text-align: justify;
}

.article-detail-card {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 15px;
}

/* 标签样式 */
.keyword-tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 0.75rem;
    margin: 2px;
    display: inline-block;
}

/* 统计卡片 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

/* 报表卡片 */
.report-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 按钮样式 */
.action-btn {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.8rem;
    margin: 2px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
}

.loading i {
    font-size: 2rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI工作流模块样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.uploaded-file-info i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #667eea;
}

.uploaded-file-name {
    font-weight: 500;
}

.uploaded-file-size {
    font-size: 0.85rem;
    color: #6c757d;
}

.result-container {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.result-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 按钮交互效果 */
.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5568d3, #6941a5);
    border-color: #5568d3;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-info:hover {
    background: #0dcaf0;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* 上传区域交互效果 */
.upload-area {
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: scale(1.02);
}

.upload-area:active {
    transform: scale(0.98);
}

/* 文件项交互效果 */
.uploaded-file-item {
    transition: all 0.2s ease;
}

.uploaded-file-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* 结果成功样式 */
.result-success {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.result-success i.bi-file-earmark-pdf {
    font-size: 4rem !important;
    color: #dc3545;
}

.result-success h5 {
    color: #28a745;
    font-weight: 600;
}

.result-success .btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}


/* AI历史记录样式 */
.history-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.history-item:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.history-item.selected {
    background-color: #e7f1ff;
    border-color: #0d6efd;
}

.history-item .form-check {
    margin-right: 15px;
}

.history-item-content {
    flex: 1;
    cursor: pointer;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-body {
    color: #6c757d;
}

.history-item-text {
    font-size: 14px;
    line-height: 1.5;
}

.history-item-actions {
    display: flex;
    gap: 5px;
}

.history-item-actions .btn {
    padding: 4px 8px;
}


/* AI模块历史记录面板样式 */
.module-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.module-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}

.module-history-item:hover {
    background: #f9fafb;
}

.module-history-item:last-child {
    border-bottom: none;
}

.module-history-item-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.module-history-item-time {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}


/* AI模块上传区域紧凑样式 */
.upload-area {
    border: 2px dashed #dee2e6 !important;
    border-radius: 10px !important;
    padding: 15px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.upload-area:hover {
    border-color: #667eea !important;
    background: #f8f9fa !important;
}

.upload-area .bi-cloud-upload {
    font-size: 1.8rem !important;
}

.upload-area p {
    font-size: 0.9rem;
    margin-bottom: 2px !important;
}

/* AI模块输入框统一最小高度 */
#query-input-ip,
#query-input-industry,
#query-input-innovation,
#query-input-sector,
#query-input-achievement {
    min-height: 180px !important;
}


/* 覆盖Bootstrap对AI模块textarea的min-height限制 */
#query-input-ip,
#query-input-industry,
#query-input-innovation,
#query-input-sector,
#query-input-achievement {
    min-height: 180px !important;
    height: auto !important;
}


/* 强制覆盖Bootstrap对AI模块textarea的高度限制 */
textarea.form-control#query-input-ip,
textarea.form-control#query-input-industry,
textarea.form-control#query-input-innovation,
textarea.form-control#query-input-sector,
textarea.form-control#query-input-achievement {
    min-height: 180px !important;
    height: 180px !important;

}



/* 示例标签 */
.example-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.example-tag { display: inline-block; padding: 3px 10px; background: #f0f4ff; border: 1px solid #c7d7ff; border-radius: 12px; font-size: 12px; color: #4a6cf7; cursor: pointer; transition: all 0.2s; }
.example-tag:hover { background: #4a6cf7; color: white; border-color: #4a6cf7; }
