/* 全局样式 - 统一使用黑体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "黑体", "SimHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 容器样式 - 左右各留1/5空白，中央内容 */
.container {
    width: 60%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* A区样式 - 顶部导航栏 */
.header {
    background-color: #1E3A8A;
    color: white;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    padding-left: 20px;
}

.admin-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    margin-right: 20px;
}

.admin-btn:hover {
    background-color: #45a049;
}

/* B区样式 - 分类区域 */
.category-area {
    background-color: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 5px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-btn:hover {
    background-color: #e9ecef;
}

.category-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.delete-category-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 5px;
}

/* C区样式 - 网址区域 */
.bookmark-area {
    background-color: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
}

.bookmark-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.bookmark-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.bookmark-btn {
    width: 150px;
    height: 50px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    padding: 5px;
    text-align: center;
    transition: all 0.3s;
}

.bookmark-btn:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.bookmark-item {
    position: relative;
    display: inline-block;
}

.delete-bookmark-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* D区样式 - 版权信息 */
.footer {
    background-color: #f8f9fa;
    padding: 15px 0;
    text-align: center;
    margin-top: 20px;
    color: #666;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.login-box {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    width: 400px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.login-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
}

.login-btn:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
}

/* 管理页面样式 */
.admin-container {
    width: 60%;
    margin: 0 auto;
    padding: 20px 0;
}

.admin-section {
    background-color: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #c82333;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

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

.form-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
}

.form-btn:hover {
    background-color: #218838;
}

.category-list {
    margin-top: 15px;
}

.category-item {
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-item-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.bookmark-list {
    margin-top: 15px;
}

.bookmark-item-admin {
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}