body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}
/* 上传选项样式 */
.upload-options {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.upload-option {
    flex: 1;
    position: relative;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
}

.upload-label:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
}

.upload-label svg {
    margin-bottom: 10px;
    color: #666;
}

.upload-label span {
    font-weight: 500;
    color: #333;
}

.upload-label input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 主按钮样式 */
.primary-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 123, 255, 0.3);
}

/* 响应式调整 - 在小屏幕上优化显示 */
@media (max-width: 768px) {
    .records-section {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    table {
        font-size: 14px; /* 稍微减小字体大小 */
    }
    
    th, td {
        padding: 8px 6px;
    }
}
/* 新增样式结束 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
/* 表格容器 - 添加水平滚动支持 */
.records-section {
    overflow-x: auto; /* 允许水平滚动 */
    margin-bottom: 30px;
}


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

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

label {
    display: block;
    margin-bottom: 5px;
}

input[type="file"] {
    padding: 5px;
}

button {
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

#previewContainer {
    margin-top: 15px;
}

#previewImage {
    max-width: 300px;
    max-height: 200px;
}

/* 表格样式优化 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: auto; /* 改为自动布局，更灵活 */
    min-width: 800px; /* 设置最小宽度确保表格不会过窄 */
}

/* 表头样式 */
th {
    background-color: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #ddd; /* 加粗底部边框以区分表头 */
    font-weight: 600;
    position: sticky;
    top: 0;
}

/* 单元格基础样式 */
td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle; /* 垂直居中 */
    line-height: 1.4;
}

/* 特定列宽调整 - 基于图片中的内容长度 */
th:nth-child(1), td:nth-child(1) { min-width: 90px; max-width: 120px; } /* 护照ID */
th:nth-child(2), td:nth-child(2) { min-width: 70px; max-width: 100px; } /* 姓 */
th:nth-child(3), td:nth-child(3) { min-width: 70px; max-width: 100px; } /* 名 */
th:nth-child(4), td:nth-child(4) { width: 60px; } /* 性别 */
th:nth-child(5), td:nth-child(5) { min-width: 80px; max-width: 100px; } /* 国家代码 */
th:nth-child(6), td:nth-child(6) { width: 100px; } /* 出生日期 */
th:nth-child(7), td:nth-child(7) { width: 90px; } /* 护照类型 */
th:nth-child(8), td:nth-child(8) { width: 135px; } /* 上传时间 */
th:nth-child(9), td:nth-child(9) { width: 150px; } /* 操作 */

/* 操作按钮容器 */
td:last-child {
    white-space: nowrap; /* 确保按钮在同一行 */
}

th {
    background-color: #f8f9fa;
}

.copyable:hover::after {
    opacity: 1;
}

/* 可复制单元格样式 */
.copyable {
    cursor: pointer;
    white-space: nowrap; /* 防止文本换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 过长文本显示省略号 */
    position: relative;
    transition: all 0.2s ease;
}

/* 表格单元格中的复制内容优化 */
td.copyable {
    padding: 8px 10px; /* 减少不必要的内边距 */
    line-height: 1.4; /* 标准的行高 */
}

.copyable:hover {
    background-color: #f0f8ff;
    border-radius: 3px;
}

.copyable:active {
    background-color: #e1f5fe;
    transform: scale(0.98);
}

.copyable::after {
    content: "点击复制";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.view-btn, .delete-btn {
    padding: 5px 10px;
    margin-right: 5px;
}

.view-btn {
    background: #28a745;
}

.view-btn:hover {
    background: #218838;
}

.delete-btn {
    background: #dc3545;
}

.delete-btn:hover {
    background: #c82333;
}

/* 复制反馈提示 */
.copy-feedback {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 加载按钮样式 */
.primary-btn.loading {
    position: relative;
    color: transparent !important;
}

.primary-btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 禁用状态的按钮样式 */
.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 保存反馈提示样式 */
.save-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

.save-feedback.success {
    background-color: #4CAF50;
    border-left: 4px solid #388E3C;
}

.save-feedback.error {
    background-color: #F44336;
    border-left: 4px solid #D32F2F;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(100%);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* 小屏幕适配 */
@media (max-width: 768px) {
    .save-feedback {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* 中央保存反馈提示样式 */
.save-feedback-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 30px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    min-width: 280px;
    max-width: 80%;
    animation: fadeInOutCenter 3s ease-in-out;
}

.save-feedback-center.success {
    background-color: #4CAF50;
    border: 1px solid #388E3C;
}

.save-feedback-center.error {
    background-color: #F44336;
    border: 1px solid #D32F2F;
}

@keyframes fadeInOutCenter {
    0%, 100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9);
    }
    15%, 85% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}