/*
 * 导航网站统一样式文件
 * 应用于index.php和category.php模板
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a:link, a:visited, a:hover, a:active {
    text-decoration: none;
    color: #666;
}
/* 导航网站特有的样式 */
.header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-right: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 3px solid white;
}
.header-content {
    text-align: left;
}
.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}
.line {
    background-color: white;
    border-radius: 8px;
    padding: 10px 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}
.line a {
    display: inline-block;
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}
.line a:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}
.line a.active {
    background-color: #3498db;
    color: white;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.search-box {
    text-align: center;
    margin-bottom: 30px;
}
.search-input {
    width: 500px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #3498db;
    border-radius: 4px;
    outline: none;
}
.search-btn {
    padding: 12px 20px;
    font-size: 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.search-btn:hover {
    background-color: #2980b9;
}
/* 首页分类标题样式 */
.category-title {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
}
.category-title {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 3px solid #eee;
    text-align: left;
}
/* 分类页大标题样式 */
.category-page-title {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 3px solid #eee;
    text-align: left;
}
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.site-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.site-icon,.more-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 10px;
}
.site-name,.more-name {
    font-weight: bold;
    margin-bottom: 5px;
}
.site-desc,.more-text {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 网站链接样式 */
.site-link {
    text-decoration: none;
    color: #3498db;
    color: #666;
}

/* 确保所有内部文本链接也没有下划线 */
.site-link *, .site-link .site-name, .site-link .site-desc {
    text-decoration: none;
}

/* 确保浏览器默认样式不会添加下划线 */
.site-link:link, .site-link:visited, .site-link:hover, .site-link:active {
    text-decoration: none;
}

.footer {
    text-align: center;
    padding: 20px 0px;
    margin-top: 50px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}
/* 响应式调整 */
@media screen and (max-width: 768px) {
    .line a {
        padding: 10px 10px;
    }
    .search-input {
        width: 70%;
    }
    .site-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: none;
}
.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* 分类导航样式 */
.category-nav {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.category-nav a {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.category-nav a:hover {
    background-color: #3498db;
    color: white;
}
.category-nav a.active {
    background-color: #3498db;
    color: white;
}