/* 中国历史朝代时间查询表 - 特有样式 */

/* 卡片上下布局 */
#history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 15px;
}

#history-container .preview-card {
    flex: 1;
    min-height: 300px;
}

/* 时期筛选标签 */
#history-container .timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#history-container .timeline-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

#history-container .timeline-item:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: #faf5ff;
}

#history-container .timeline-item.active {
    background: #f3e8ff;
    border-color: #8b5cf6;
    color: #8b5cf6;
}

#history-container .timeline-dot {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    border-radius: 50%;
}

#history-container .timeline-item.active .timeline-dot {
    background: #8b5cf6;
}

#history-container .timeline-years {
    font-size: 11px;
    color: #9ca3af;
}

/* 朝代表格 */
#history-container .table-container {
    overflow-x: auto;
}

#history-container .history-table {
    width: 100%;
    border-collapse: collapse;
}

#history-container .history-table th {
    background: #f3f4f6;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

#history-container .history-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

#history-container .table-row {
    cursor: pointer;
    transition: background 0.2s;
}

#history-container .table-row:hover {
    background: #f9fafb;
}

#history-container .table-row.highlight {
    background: #f3e8ff;
}

#history-container .dynasty-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

#history-container .dynasty-icon {
    font-size: 18px;
}

#history-container .dynasty-years {
    color: #6b7280;
}

#history-container .dynasty-duration {
    color: #8b5cf6;
    font-weight: 500;
}

#history-container .dynasty-events {
    color: #6b7280;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 朝代详情区域 */
#history-container .detail-section {
    margin: 0 0 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    border-radius: 10px;
    border: 1px solid #ddd6fe;
}

#history-container .detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd6fe;
}

#history-container .detail-icon {
    font-size: 28px;
}

#history-container .detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

#history-container .detail-content {
    display: grid;
    gap: 10px;
}

#history-container .detail-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#history-container .detail-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 90px;
}

#history-container .detail-value {
    color: #1f2937;
}

/* 响应式 */
@media (max-width: 768px) {
    #history-container .timeline-item {
        padding: 5px 10px;
        font-size: 12px;
    }

    #history-container .history-table th,
    #history-container .history-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    #history-container .dynasty-events {
        max-width: 150px;
    }

    #history-container .detail-section {
        margin: 0 0 12px 0;
        padding: 15px;
    }
}
