.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #333;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
}

.pages-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.pages-table th, .pages-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.pages-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.edit-btn {
    background-color: #28a745;
    color: white;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.inline-form {
    display: inline;
}

.empty {
    text-align: center;
    color: #666;
    padding: 20px;
}

.edit-form .form-group {
    margin-bottom: 25px;
}

.edit-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.edit-form input[type="text"],
.edit-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.images-preview {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-item {
    text-align: center;
}

.preview-item img {
    max-width: 150px;
    max-height: 150px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.button-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.button-item input, .button-item select {
    flex: 1;
}

.remove-btn {
    background-color: #dc3545;
    color: white;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#add-button {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.submit-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.hint {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}


/* 图片上传按钮美化 */
.upload-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
}

.upload-btn input[type="file"] {
    display: none; /* 隐藏原始input */
}

/* 空图片位置样式 */
.empty-preview .placeholder {
    width: 150px;
    height: 150px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    background-color: #f9f9f9;
}

/* 确保预览项布局一致 */
.images-preview {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.preview-item {
    text-align: center;
    min-width: 150px; /* 固定宽度，避免布局错乱 */
}

.preview-item img {
    max-width: 150px;
    max-height: 150px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.add-btn {
    background-color: #007bff;
    color: white;
    margin-bottom: 20px;
    display: inline-block;
}