* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
}

.page-selector {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-selector label {
    font-weight: 600;
    color: #2c3e50;
}

.page-selector select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.add-page-btn {
    background-color: #408D40;
}

.add-page-btn:hover {
    background-color: #408D40;
}

.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

/* 新增样式：让输入框和按钮在同一行 */
.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-button input {
    flex-grow: 1;
    padding-left: 100px; /* 增加左侧内边距，为按钮腾出空间 */
    margin-right: 0;
}

.input-with-button button {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%; /* 让按钮高度与输入框一致 */
    padding: 0 10px; /* 调整按钮内边距 */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 14px;
    z-index: 1;
}

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

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

/* 通用按钮样式 */
button {
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

/* 类型为 "button" 的按钮样式（例如 "上传图标" 按钮的默认样式） */
button[type="button"] {
    background-color: #5F7083; /* 更改为更深的灰蓝色 */
}

button[type="button"]:hover {
    background-color: #4D5C6C; /* 调整 hover 颜色 */
}

/* 重置按钮样式 */
.btn-reset {
    background-color: #7f8c8d; /* 浅灰色 */
}

.btn-reset:hover {
    background-color: #626f70; /* 稍深的灰色 */
}

/* 类型为 "submit" 的按钮样式（例如 "保存" 按钮） */
button[type="submit"] {
    background-color: #408D40; /* 绿色 */
}

button[type="submit"]:hover {
    background-color: #408D40; /* 深绿色 */
}

/* 页面操作按钮的蓝色样式（例如 "新建页面", "编辑页面", "管理页面"） */
.btn-blue {
    background-color: #34495e; /* 克莱因蓝 */
}
.btn-blue:hover {
    background-color: #2c3e50;
}

/* 红色按钮样式（例如 "删除页面", "退出登录"） */
.btn-red {
    background-color: #e67e22;
}
.btn-red:hover {
    background-color: #e67e22;
}

/* 绿色按钮样式（例如 "打包静态导航"） */
.btn-green {
    background-color: #408D40;
}
.btn-green:hover {
    background-color: #408D40;
}

/* 表格内编辑按钮的蓝色样式 */
.btn-action-edit {
    background-color: #002FA7;
}
.btn-action-edit:hover {
    background-color: #002FA7;
}

/* 表格内删除按钮的红色样式 */
.btn-action-delete {
    background-color: #e67e22;
}
.btn-action-delete:hover {
    background-color: #e67e22;
}

.links-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.export-btn {
    background-color: #408D40;
}

.export-btn:hover {
    background-color: #219a52;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

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

tr:hover {
    background-color: #f8f9fa;
}

td button {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap; /* 防止文字换行 */
}

.link-actions {
    display: flex;
    gap: 5px; /* 调整按钮之间的间距 */
}

#linksTable thead th:nth-child(4) {
    white-space: nowrap;
}
