/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background-color: #f5f7fa;
    padding-top: 80px; /* 给置顶头部留空间 */
}

/* 置顶头部样式 */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 10px 0;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #165dff;
}

/* 搜索框样式（居中） */
.search-box {
    flex: 0 1 500px;
    display: flex;
}

#search-input {
    flex: 1;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e5e7eb;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

#search-btn {
    width: 80px;
    height: 40px;
    background-color: #165dff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

#search-btn:hover {
    background-color: #0d47a1;
}

.edit-btn-container {
    flex: 0 1 100px;
}

#edit-btn {
    padding: 8px 16px;
    background-color: #165dff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

#password-input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.modal-btns {
    display: flex;
    justify-content: space-between;
}

.modal-btns button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#confirm-pwd {
    background-color: #165dff;
    color: #fff;
}

#cancel-pwd {
    background-color: #e5e7eb;
    color: #333;
}

/* 编辑区域样式 */
.edit-area {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#edit-content {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 15px;
}

#save-edit {
    padding: 10px 20px;
    background-color: #165dff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 导航内容展示样式 */
.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

.nav-category {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-category h2 {
    font-size: 18px;
    color: #165dff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-link-item {
    flex: 0 1 calc(16.666% - 15px); /* 6列布局 */
    min-width: 120px;
}

.nav-link-item a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link-item a:hover {
    background-color: #f5f7fa;
    color: #165dff;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}