/* 基础表格样式 - 优化版 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    padding: 12px 15px;
    text-align: left;
}
th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}
tr:nth-child(even) {
    background-color: #f8f9fa;
}
tr:hover {
    background-color: #ebf5fb;
    transition: background-color 0.2s;
}

/* 调整列宽 */
td:nth-child(1), th:nth-child(1) 
{ 
    width: 20%; 
    text-align: center; 
}
td:nth-child(2), th:nth-child(2) 
{ 
    width: 15%;
    text-align: center;  
}
td:nth-child(3), th:nth-child(3) 
{ 
    width: 8%; 
    text-align: center; 
}
td:nth-child(4), th:nth-child(4) 
{
    width: 40%; 
    text-align: center; 
}
td:nth-child(5), th:nth-child(5) { width: 17%; }

/* 图片样式 - 优化为缩略图 */
td:nth-child(4) {
    text-align: center;
}

td:nth-child(4) img {
    max-width: 180px;
    max-height: 120px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    object-fit: cover;
}

td:nth-child(4) img:hover {
    transform: scale(1.05);
}

/* 按钮样式 - 优化布局和视觉效果 */
.copy-btn, .delete-btn {
    padding: 8px 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-btn {
    background-color: #2ecc71;
    color: white;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
}

.copy-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background-color: #3498db;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.delete-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.delete-btn.deleting {
    background-color: #f39c12;
}

/* 操作按钮容器 - 优化间距 */
.action-container {
    display: flex;
    gap: 10px;
}

/* Toast提示样式 - 更现代化 */
.toast {
    visibility: hidden;
    min-width: 280px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px 24px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    font-weight: 500;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 加载指示器 */
.loading-spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 确认对话框 - 更美观 */
.confirmation-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.dialog-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
    animation: dialogAppear 0.3s forwards;
}

@keyframes dialogAppear {
    to { transform: scale(1); }
}

.dialog-content h3 {
    color: #e74c3c;
    margin-top: 0;
    margin-bottom: 15px;
}

.dialog-content p {
    color: #34495e;
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 15px;
}

.dialog-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.confirm-btn {
    background-color: #e74c3c;
    color: white;
}

.confirm-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #7f8c8d;
    font-style: italic;
}

/* 图片模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.9);}
    to {transform: scale(1);}
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3001;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 18px;
}
.dialog-content p {
    color: #34495e;
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
    text-align: center; /* 添加居中显示 */
}