/**
 * 115导航主题 - 主要样式表
 * 完全仿制 nav.iowen.cn 设计
 * 最终修复版v3 - 根据实际对比结果修正
 */

/* ========== 全局重置 ========== */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #484b4f;
    background-color: #f2f4f7;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

a:hover {
    color: #2997f7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== 顶部导航栏 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    background-color: transparent;
    z-index: 109;
    padding: 10px;
    transition: all 0.3s;
}

.header-container {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    border-radius: 0;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu li a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-search-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    padding: 0;
}

.header-search-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ========== Hero搜索区域（紫色渐变）========== */
.hero-section {
    position: relative;
    width: 100%;
    height: 604px;
    margin-top: -80px;
    padding: 80px 0 0;
    background: linear-gradient(45deg, rgb(134, 24, 219) 0%, rgb(215, 17, 255) 50%, rgb(70, 15, 221) 100%);
    background-size: 400%;
    background-position: 15.6993% 84.3007%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-content {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-search {
    max-width: 800px;
    width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 0px solid transparent;
}

.search-input {
    flex: 1;
    height: 50px;
    padding: 9px 20px;
    font-size: 16px;
    color: #777;
    border: none;
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

.search-submit {
    width: 60px;
    height: 50px;
    min-width: 60px;
    background: rgba(41, 151, 247, 0.1);
    border: none;
    color: #2997f7;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-submit:hover {
    background: rgba(41, 151, 247, 0.2);
}

/* ========== 主内容区布局 ========== */
.home-layout {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* ========== 左侧分类导航 ========== */
.home-sidebar {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
}

.home-sidebar::-webkit-scrollbar {
    width: 4px;
}

.home-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
}

.home-category-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.home-category-item {
    margin-bottom: 2px;
    list-style: none;
}

.home-category-link {
    display: flex;
    align-items: center;
    padding: 8px 9px;
    color: #484b4f;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.home-category-link:hover {
    background-color: rgba(41, 151, 247, 0.1);
    color: #2997f7;
    text-decoration: none;
}

.category-icon-circle {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 18px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 右侧内容区 ========== */
.home-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ========== 分类区块 ========== */
.category-block {
    margin-bottom: 24px;
    clear: both;
}

.category-block-header {
    margin-bottom: 12px;
    padding: 10px 0;
}

.category-block-title {
    font-size: 16px;
    font-weight: 500;
    color: #484b4f;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.title-dot {
    width: 6px;
    height: 6px;
    background: #2997f7;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ========== 网站卡片网格布局 ========== */
.sites-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
    position: relative;
}

/* 响应式网格 */
.site-card {
    width: calc(16.666% - 10px);
    margin: 0 5px 10px;
    float: none;
}

/* 超大屏幕 */
@media (max-width: 1600px) {
    .site-card {
        width: calc(20% - 10px);
    }
}

/* 大屏幕 */
@media (max-width: 1400px) {
    .site-card {
        width: calc(25% - 10px);
    }
}

/* 中屏幕 */
@media (max-width: 1200px) {
    .site-card {
        width: calc(33.333% - 10px);
    }
}

/* 小屏幕 */
@media (max-width: 992px) {
    .site-card {
        width: calc(50% - 10px);
    }
}

/* 超小屏幕 */
@media (max-width: 576px) {
    .site-card {
        width: calc(100% - 10px);
    }
}

/* ========== 网站卡片样式 ========== */
.site-card {
    background-color: rgba(245, 245, 245, 0.75);
    border-radius: 12px;
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: background-color 0.3s;
    height: 178px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 10px;
}

.site-card:hover {
    background-color: #fff;
}

.site-card-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.site-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.site-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.site-card-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #484b4f;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.site-card-title a {
    color: inherit;
    text-decoration: none;
}

.site-card-title a:hover {
    color: #2997f7;
}

.site-card-body {
    padding: 8px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.site-card-desc {
    font-size: 13px;
    color: #93959a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.site-tag {
    padding: 2px 8px;
    background: rgba(41, 151, 247, 0.1);
    color: #2997f7;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
}

.site-card-footer {
    padding: 6px 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.site-date {
    font-size: 12px;
    color: #999;
}

.site-actions {
    display: flex;
    gap: 8px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.like-btn:hover {
    background: rgba(241, 64, 75, 0.1);
    color: #f1404b;
}

/* ========== 底部区域 ========== */
.site-footer {
    background-color: transparent;
    padding: 10px;
    margin-top: 10px;
    border-top: none;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: center;
}

.footer-copyright {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-copyright a {
    color: #2997f7;
}

.footer-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

.footer-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .home-layout {
        flex-direction: column;
    }
    
    .home-sidebar {
        width: 100%;
        min-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
    }
    
    .home-category-nav {
        display: flex;
        gap: 8px;
        padding: 10px 0;
        flex-wrap: nowrap;
    }
    
    .home-category-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .hero-section {
        height: 400px;
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-search {
        width: 90%;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 350px;
        padding-top: 80px;
        padding-bottom: 50px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .site-header {
        height: 60px;
    }
    
    .site-logo-text {
        font-size: 18px;
    }
}

/* ========== 空状态 ========== */
.empty-state,
.no-content {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    clear: both;
}

.empty-state svg,
.no-content svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.empty-state h3,
.no-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
    font-weight: 500;
}

.empty-state p,
.no-content p {
    font-size: 14px;
    line-height: 1.6;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* ========== 工具类 ========== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
