/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

body {
    background: #f0f2f5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 搜索框区域 */
.mode-select {
    width: 120px;
    padding: 10px 12px;
    border: 2px solid #1a73e8;
    border-radius: 8px;
    background: white;
    color: #1a73e8;
    font-size: 14px;
    cursor: pointer;
    appearance: none; 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* 输入区域布局 */
.input-group {
    flex: 1;
    min-width: 400px;
    width: 100%; 
    display: flex;
    transition: all 0.3s ease;
}

.header {
    text-align: center;
    padding: 40px 0;
    color: #1a73e8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 紧凑日期选择 */
.date-picker-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 8px;
    width: 100%; 
}

.date-input {
    border: none;
    background: transparent;
    padding: 8px 0;
    font-family: inherit;
    color: #606266;
}

.date-separator {
    color: #909399;
    font-size: 14px;
    margin: 0 4px;
}

/* 整体布局优化 */
.search-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}


.action-buttons {
    display: flex;
    gap: 8px;
}


.search-input {
    width: 100%;
    flex: 1;
    padding: 12px;
    border: 2px solid #1a73e8;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1557b0;
    box-shadow: 0 0 8px rgba(26,115,232,0.3);
}

.search-btn, .reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn {
    background: #1a73e8;
    color: white;
}

.search-btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.reset-btn {
    background: #f0f2f5;
    color: #606266;
    border: 1px solid #dcdfe6;
}

.reset-btn:hover {
    background: #e4e6eb;
}

/* 结果容器 */
.results-container {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 控制栏 */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    color: #606266;
    font-size: 14px;
}

.results-count span {
    color: #1a73e8;
    font-weight: bold;
    margin: 0 3px;
}

.per-page-select {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: white;
    color: #606266;
    cursor: pointer;
}

/* 表格样式 */
.result-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.result-table th {
    text-align: center;
    background: #1a73e8;
    color: white;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 2; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #606266;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative; 
    z-index: auto;
    word-wrap: break-word;
    padding: 12px 8px; /* 调整内边距 */
}

.result-table tr:hover {
    background-color: #f8f9fa;
}

.result-table th:nth-child(1),
.result-table td:nth-child(1) {
    width: 15%;
}

.result-table th:nth-child(2),
.result-table td:nth-child(2) {
    width: 50%;
}

.result-table th:nth-child(3),
.result-table td:nth-child(3) {
    width: 22%;
}

.result-table th:nth-child(4),
.result-table td:nth-child(4) {
    width: 13%;
}

.result-table td:nth-child(1) {
    text-align: center;
    white-space: normal;
}

.result-table td:nth-child(4) {
    text-align: center;
}

.result-table td:nth-child(2),
.result-table td:nth-child(3) {
    text-align: left;
}

/* 工具提示样式 */
.has-tooltip {
    position: relative;
    cursor: help;
}

.has-tooltip:hover::after {
    display: none !important;
}

/* 附件相关样式 */
.file-item {
    padding: 4px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item:not(:last-child) {
    border-bottom: 1px dashed #e0e0e0;
}

.no-file {
    color: #909399;
    font-style: italic;
}

.result-table td:nth-child(3) {
    white-space: normal;
}

/* 分页样式 */
.pagination-bar {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: white;
    color: #606266;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(.disabled) {
    background: #f5f7fa;
    border-color: #c0c4cc;
}

.page-btn.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.page-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px;
    color: #1a73e8;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26,115,232,0.1);
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#dynamic-tooltip {
    position: fixed; 
    background: rgba(255, 255, 255, 0.9);
    color: rgb(35, 35, 35);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 500px;
    pointer-events: none;
    z-index: 1000; /* 恢复更高层级 */
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: pre-wrap;
    word-break: break-word;
    transform: translate(10px, 10px); 
}

/* 详情弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
}

.modal-content {
    background: white;
    margin: auto;
    padding: 25px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    max-height: 90vh;
    overflow-y: auto;
    top: 50%;
    transform: translateY(-50%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.info-section {
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.info-section h3 {
    color: #1a73e8;
    margin-bottom: 12px;
    font-size: 16px;
    border-left: 4px solid #1a73e8;
    padding-left: 10px;
}

.content-box {
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    white-space: pre-wrap; 
    word-break: break-word; 
}

.file-list {
    display: grid;
    gap: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
}

.comment-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.comment-item:hover {
    background: #f5f7fa;
}


/* 弹窗附件链接样式 */
.file-item a {
    color: #1a73e8;
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: all 0.3s;
}

.file-item a:hover {
    color: #1557b0;
    text-decoration: underline;
    transform: translateX(5px);
}

.file-item a::before {
    content: "📎 ";
    margin-right: 5px;
}

.info-value[data-likes]::after {
    content: '♥';
    color: #ff4081;
    margin-left: 5px;
    font-size: 0.9em;
}

/* 评论列表样式 */
.comment-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.comment-header {
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 4px;
}

.comment-body {
    color: #606266;
    line-height: 1.5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.comment-time {
    color: #909399;
    font-size: 12px;
    white-space: nowrap;
    margin-left: 15px;
    flex-shrink: 0;
}

.no-comment {
    color: #909399;
    text-align: center;
    padding: 20px;
}


/* 保留以下 Element UI 必要样式 */
.el-date-picker {
    z-index: 2000 !important;
}

.el-date-range-picker {
    width: 780px !important; 
    min-width: auto !important;
}

.el-date-range-picker__header {
    padding: 12px 30px !important;
}

.el-date-range-picker__header div {
    font-size: 14px !important;
    letter-spacing: 1px;
}

.el-date-range-picker__time-header {
    padding: 12px 0 !important;
    font-size: 14px !important;
}

.el-date-range-picker__time-header > span {
    padding: 0 8px !important;
    font-size: 14px;
    color: #606266;
}


.el-date-range-picker__content {
    max-width: 100% !important;
    padding: 20px !important; 
}

.el-range-separator {
    width: 40px !important; 
    padding: 0 8px !important;
}

.el-date-table td {
    padding: 4px 2px !important;
}

.el-picker-panel__footer {
    padding: 12px 30px !important; 
}


.el-picker-panel__body-wrapper {
    background: #fff;
}

.el-date-table td.current:not(.disabled) span {
    background-color: #1a73e8 !important;
}

.el-date-range-picker__header div {
    color: #1a73e8;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.error {
    text-align: center;
    padding: 40px;
    color: #ff4d4f;
}

.error-detail {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 15px;
    }

    .mode-select,
    .input-group {
        width: 100%;
        min-width: auto;
    }

    .date-picker-group {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input {
        width: 100%;
    }
    
    .el-date-range-picker {
        width: 90% !important;
        min-width: 360px !important;
    }
    
    .el-range-separator {
        width: 30px !important; 
    }

    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .search-btn, .reset-btn {
        flex: 1;
    }

    .date-range {
        flex-direction: column;
    }
    
    .result-table {
        min-width: 600px;
    }
    
    .result-table th, 
    .result-table td {
        font-size: 14px;
        padding: 8px;
    }

    .result-table th {
        text-align: center; /* 保持居中 */
    }
    .result-table td:nth-child(1),
    .result-table td:nth-child(4) {
        text-align: center;
    }

    .pagination-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .page-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    .modal {
        align-items: flex-start; /* 手机端顶部对齐 */
    }
    .modal-content {
        top: 20px;
        transform: none;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}