/* style.css - Discuz 4.1 风格样式 */
/*!
 * 主题名字：仲梦PHP导航管理系统
 * 作者：凡星儿
 * 适用版本：1.0.1
 * 时间：2026-01-01
 * 简介：这就是曾经经典Discuz！4.1.0风格的设计来源，怀念
 * 包含对各大搜索引擎蜘蛛的检测和友好处理。
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    background-color: #A1B5D8 !important;
    transition: background-color 0.3s ease;
}

body.dark-mode {
    background-color: #2d3748 !important;
    color: #e2e8f0;
}

/* 容器 */
.container {
    width: 970px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 - 修复蓝色 */
.header {
    background: linear-gradient(to bottom, #A1B5D8 0%, #8CA0C3 100%) !important;
    border: 2px solid #2D4D9E !important;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 10px 0 0 0;
}

.nav-bar {
    height: 45px !important;
    width: 970px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    background: transparent !important;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    padding: 5px 0;
}

.nav-links a {
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid transparent;
    white-space: nowrap;
    display: inline-block;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: bold;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 150px;
    padding: 4px 25px 4px 8px;
    border: 1px solid #2D4D9E;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    outline: none;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #2D4D9E;
    cursor: pointer;
    font-size: 11px;
}

.theme-switch {
    display: flex;
    align-items: center;
}

.switch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    white-space: nowrap;
}

.switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 主体内容 */
.main-content {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 欢迎区域 - 修改为210px高度 */
.welcome-box {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #A1B5D8 !important;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0 3px 0; /* 与下方分类框间距3px */
    color: #333;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

body.dark-mode .welcome-box {
    background: rgba(45, 55, 72, 0.9) !important;
    color: #e2e8f0;
}

.welcome-box h1 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #2D4D9E;
}

body.dark-mode .welcome-box h1 {
    color: #90cdf4;
}

.welcome-box p {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

body.dark-mode .welcome-box p {
    color: #cbd5e0;
}

/* 搜索引擎选择框 */
.search-engine-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    width: 100%;
    max-width: 600px;
}

.search-engine-select {
    padding: 8px 12px;
    border: 1px solid #A1B5D8;
    border-radius: 4px 0 0 4px;
    background: white;
    font-size: 12px;
    color: #333;
    outline: none;
}

body.dark-mode .search-engine-select {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.search-engine-input {
    padding: 8px 12px;
    border: 1px solid #A1B5D8;
    border-left: none;
    border-right: none;
    width: 300px;
    font-size: 12px;
    outline: none;
}

body.dark-mode .search-engine-input {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.search-engine-btn {
    padding: 8px 20px;
    background: linear-gradient(to bottom, #3A5FCD 0%, #2D4D9E 100%);
    color: white;
    border: 1px solid #2D4D9E;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.search-engine-btn:hover {
    background: linear-gradient(to bottom, #2D4D9E 0%, #3A5FCD 100%);
}

/* 分类容器 - 白色背景蓝色边框 */
.category-container {
    margin-bottom: 3px; /* 分类框之间的间距 */
    background: #FFFFFF !important;
    border: 2px solid #A1B5D8 !important;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .category-container {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}

.category-header {
    background: #FFFFFF !important;
    border-bottom: 1px solid #A1B5D8;
    padding: 6px 15px; /* 减小上下内边距，使与网站链接间距为2px */
    color: #333 !important;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark-mode .category-header {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border-bottom-color: #4a5568;
}

/* 网站链接网格布局 - 一行7个 */
.category-links {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 10px 15px; /* 减小内边距，使与分类标题间距为2px */
    background: #FFFFFF !important;
}

body.dark-mode .category-links {
    background: #2d3748 !important;
}

/* 彩色网站链接样式 - 10种颜色 */
.box-link {
    display: block;
    padding: 6px 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 1. 蓝色 */
.box-link-1 {
    color: #3498db;
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.08);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1);
}

.box-link-1:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* 2. 翠绿色 */
.box-link-2 {
    color: #27ae60;
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.08);
    box-shadow: 0 2px 5px rgba(39, 174, 96, 0.1);
}

.box-link-2:hover {
    background-color: #27ae60;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* 3. 橙色 */
.box-link-3 {
    color: #e67e22;
    border-color: #e67e22;
    background-color: rgba(230, 126, 34, 0.08);
    box-shadow: 0 2px 5px rgba(230, 126, 34, 0.1);
}

.box-link-3:hover {
    background-color: #e67e22;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

/* 4. 红色 */
.box-link-4 {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.1);
}

.box-link-4:hover {
    background-color: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* 5. 紫色 */
.box-link-5 {
    color: #9b59b6;
    border-color: #9b59b6;
    background-color: rgba(155, 89, 182, 0.08);
    box-shadow: 0 2px 5px rgba(155, 89, 182, 0.1);
}

.box-link-5:hover {
    background-color: #9b59b6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

/* 6. 青色 */
.box-link-6 {
    color: #1abc9c;
    border-color: #1abc9c;
    background-color: rgba(26, 188, 156, 0.08);
    box-shadow: 0 2px 5px rgba(26, 188, 156, 0.1);
}

.box-link-6:hover {
    background-color: #1abc9c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4);
}

/* 7. 黄色 */
.box-link-7 {
    color: #f1c40f;
    border-color: #f1c40f;
    background-color: rgba(241, 196, 15, 0.08);
    box-shadow: 0 2px 5px rgba(241, 196, 15, 0.1);
}

.box-link-7:hover {
    background-color: #f1c40f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
}

/* 8. 深蓝色 */
.box-link-8 {
    color: #2980b9;
    border-color: #2980b9;
    background-color: rgba(41, 128, 185, 0.08);
    box-shadow: 0 2px 5px rgba(41, 128, 185, 0.1);
}

.box-link-8:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 128, 185, 0.4);
}

/* 9. 粉色 */
.box-link-9 {
    color: #e84393;
    border-color: #e84393;
    background-color: rgba(232, 67, 147, 0.08);
    box-shadow: 0 2px 5px rgba(232, 67, 147, 0.1);
}

.box-link-9:hover {
    background-color: #e84393;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 67, 147, 0.4);
}

/* 10. 深灰色 */
.box-link-10 {
    color: #2c3e50;
    border-color: #2c3e50;
    background-color: rgba(44, 62, 80, 0.08);
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.1);
}

.box-link-10:hover {
    background-color: #2c3e50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.4);
}

/* 友情链接 - 白色背景蓝色边框 */
.friend-links-container {
    width: 970px;
    margin: 10px auto;
}

.friend-links {
    background: #FFFFFF !important;
    border: 2px solid #A1B5D8 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .friend-links {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}

.links-header {
    background: #FFFFFF !important;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #333 !important;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #A1B5D8;
}

body.dark-mode .links-header {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border-bottom-color: #4a5568;
}

.links-container {
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #FFFFFF !important;
}

body.dark-mode .links-container {
    background: #2d3748 !important;
}

.friend-link {
    white-space: nowrap;
    color: #2D4D9E;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(161, 181, 216, 0.1);
    border: 1px solid rgba(58, 95, 205, 0.3);
    transition: all 0.3s;
}

body.dark-mode .friend-link {
    color: #e2e8f0;
    background: rgba(74, 85, 104, 0.2);
    border-color: #4a5568;
}

.friend-link:hover {
    background: rgba(58, 95, 205, 0.15);
    color: #3A5FCD;
    transform: translateY(-1px);
}

/* 页脚 */
.footer {
    width: 970px;
    margin: 10px auto;
    text-align: center;
    padding: 15px;
    color: #FFFFFF;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    border: 2px solid #A1B5D8;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

body.dark-mode .modal-content {
    background: #2d3748;
    border-color: #4a5568;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E2E8F0;
}

body.dark-mode .modal-header {
    border-bottom-color: #4a5568;
}

.modal-title {
    color: #2D4D9E;
    font-size: 16px;
    font-weight: bold;
}

body.dark-mode .modal-title {
    color: #e2e8f0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #718096;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #3A5FCD;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: bold;
    font-size: 13px;
}

body.dark-mode .form-group label {
    color: #e2e8f0;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #A1B5D8;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
    background: white;
}

body.dark-mode .form-control {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.form-control:focus {
    outline: none;
    border-color: #3A5FCD;
    box-shadow: 0 0 0 3px rgba(58, 95, 205, 0.1);
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to bottom, #3A5FCD 0%, #2D4D9E 100%);
    color: white;
    border: 1px solid #2D4D9E;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #2D4D9E 0%, #3A5FCD 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(58, 95, 205, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 消息提示 */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid #48bb78;
    color: #2f855a;
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid #f56565;
    color: #c53030;
}

/* 管理员入口 */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #3A5FCD, #2D4D9E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 100;
}

.admin-link:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(58, 95, 205, 0.4);
}

/* 网站提交表单 */
.add-site-form {
    text-align: center;
    margin: 20px 0;
}

.add-site-btn {
    background: linear-gradient(to bottom, #3A5FCD 0%, #2D4D9E 100%);
    color: white;
    border: 1px solid #2D4D9E;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.add-site-btn:hover {
    background: linear-gradient(to bottom, #2D4D9E 0%, #3A5FCD 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 95, 205, 0.4);
}

/* 响应式设计 */
@media (max-width: 1000px) {
    .container, .friend-links-container, .footer {
        width: 95%;
        max-width: 970px;
    }
    
    .nav-bar, .friend-links {
        width: 100% !important;
    }
    
    .category-links {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        height: auto !important;
        padding: 10px;
        gap: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 5px 0;
    }
    
    .category-links {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-links {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .box-link {
        padding: 6px 3px;
        font-size: 10px;
    }
}

/* 分页样式 */
.category-pagination {
    display: flex;
    justify-content: center;
    padding: 10px;
    border-top: 1px solid #A1B5D8;
    background: #F8FAFC;
}

body.dark-mode .category-pagination {
    background: #1a202c;
    border-top-color: #4a5568;
}

.page-btn {
    padding: 4px 10px;
    margin: 0 3px;
    background: #FFFFFF;
    border: 1px solid #A1B5D8;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: #2D4D9E;
}

body.dark-mode .page-btn {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.page-btn:hover {
    background: #E2E8F0;
}

body.dark-mode .page-btn:hover {
    background: #718096;
}

.page-btn.active {
    background: #2D4D9E;
    color: #FFFFFF;
    border-color: #2D4D9E;
}

body.dark-mode .page-btn.active {
    background: #4299e1;
    border-color: #4299e1;
}

/* 导航栏中的提交网站按钮 */
.nav-add-site-btn {
    background: linear-gradient(to bottom, #3A5FCD 0%, #2D4D9E 100%);
    color: white;
    border: 1px solid #2D4D9E;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-add-site-btn:hover {
    background: linear-gradient(to bottom, #2D4D9E 0%, #3A5FCD 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 95, 205, 0.4);
}
/* 导航栏样式 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex: 1;
    gap: 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}