/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-bottom: none;
    padding: 1.2rem 1.5rem;
}

/* 上传区域样式 */
.upload-area {
    border: 3px dashed #007bff;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8fbff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background-color: #e8f4ff;
    border-color: #0056b3;
}

.upload-area h5 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

/* 图片预览样式 */
.image-preview {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 表格样式 */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #28a745;
    color: white;
    border-bottom: 2px solid #1e7e34;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

/* 状态指示器 */
.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #6c757d;
}

.status-indicator.connected {
    background-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.status-indicator.disconnected {
    background-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.status-indicator.connecting {
    background-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    opacity: 0.5;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

/* 进度条样式 */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 5px;
    background-color: #007bff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .image-preview {
        height: 200px;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* 编辑表格样式 */
#editTableContainer table {
    width: 100%;
    border-collapse: collapse;
}

#editTableContainer th,
#editTableContainer td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

#editTableContainer th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#editTableContainer input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

#editTableContainer input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 页脚样式 */
footer {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
}
