/* ========== 全局基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
    padding-top: 60px; /* 为固定导航栏预留空间 */
}

:root {
    /* 渐变变量统一管理 */
    --gradient-primary: linear-gradient(135deg, #4a66e0 0%, #452eb5 80%, #6a4cd0 100%);
    --gradient-secondary: linear-gradient(135deg, #3a56d0 0%, #38259c 80%, #5a3cc0 100%);
    --gradient-text: #6a4cd0;
    --gradient-border: linear-gradient(135deg, #4a66e0 0%, #452eb5 80%, #6a4cd0 100%);
}

.container-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航栏样式 ========== */
/* 固定导航外层容器 */
.top-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 导航内容容器 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    height: 60px;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo img {
    height: 24px;
    margin-right: 8px;
}

/* 一级导航菜单 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0 20px;
}

.main-nav-item {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-nav-item:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav-item.active {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

.main-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    opacity: 1;
}

/* 搜索框样式（含易优搜索框兼容） */
.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-box input,
.search-box .text1 {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus,
.search-box .text1:focus {
    border-color: #6a4cd0;
    box-shadow: 0 0 0 2px rgba(106, 76, 208, 0.1);
}

.search-box input::placeholder,
.search-box .text1::placeholder {
    color: #9ca3af;
}

/* 导航右侧区域（登录/注册） */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.nav-right a {
    text-decoration: none;
    color: #666; /* 其他链接默认灰色 */
    font-size: 14px;
}

/* 登录按钮样式（保留原有） */
.login-btn {
    background: var(--gradient-primary);
    color: white !important; /* 登录文字白色 */
    padding: 6px 15px;
    border-radius: 4px;
    border: none;
    transition: all 0.2s ease;
}

.login-btn:hover {
    background: var(--gradient-secondary);
}
/* 新增：注册文字单独设为白色（两种场景适配） */
/* 场景1：注册是class为register-btn的链接/按钮 */
.register-btn {
    
    color: white !important; /* 强制白色，优先级最高 */
}
/* 场景2：如果注册没有单独class，通过文字内容匹配（兜底方案） */
.nav-right a:contains("注册") {
    color: white !important;
}

/* ========== 易优用户中心样式（登录/未登录状态） ========== */
.web-louser {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.web-louser li {
    position: relative;
}

.web-louser .user-name,
.web-louser .logout-btn {
    position: relative;
}

/* 通用链接样式 */
.web-louser li a {
    text-decoration: none !important;
    font-size: 14px !important;
    color: #666 !important;
    transition: color 0.2s ease !important;
}

.web-louser li a:hover {
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* 注册按钮特殊样式 */
.web-louser .login-btn {
    display: inline-block !important;
}

/* 登录后样式 */
.web-louser .user-name {
    position: relative;
    padding: 2px 4px;
    font-weight: 500 !important;
    color: #4a66e0 !important;
}

.web-louser .logout-btn {
    color: #ff6b6b !important;
}

.web-louser .logout-btn:hover {
    color: #ff4444 !important;
    background: none !important;
}

/* 用户名hover提示框 */
.web-louser .user-name::after {
    content: attr(data-name);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.web-louser .user-name::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #333;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.web-louser .user-name:hover::after {
    content: '个人中心';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 999;
}
.web-louser .user-name:hover::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #333;
    z-index: 999;
}

/* 退出按钮hover提示框 */
.web-louser .logout-btn::after {
    content: '退出当前账号';
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff6b6b;
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.web-louser .logout-btn::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #ff6b6b;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.web-louser .logout-btn:hover::after {
    content: '退出登录';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b6b;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 999;
}
.web-louser .logout-btn:hover::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #ff6b6b;
    z-index: 999;
}

/* 用户名/退出li hover背景 */
.web-louser li:has(.user-name):hover {
    background-color: rgba(74, 102, 224, 0.08);
    box-shadow: 0 1px 3px rgba(74, 102, 224, 0.1);
}

.web-louser li:has(.logout-btn):hover {
    background-color: rgba(255, 107, 107, 0.08);
    box-shadow: 0 1px 3px rgba(255, 107, 107, 0.1);
}

/* ========== Banner轮播样式 ========== */
.banner-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    height: 100%;
}

/* 轮播图容器 */
.banner-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 单张轮播图 */
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

/* 轮播图示例背景 */
.slide-1 {
    background-image: url('https://picsum.photos/1920/600?random=1');
}

.slide-2 {
    background-image: url('https://picsum.photos/1920/600?random=2');
}

.slide-3 {
    background-image: url('https://picsum.photos/1920/600?random=3');
}

/* Banner内容层 */
.banner {
    text-align: center;
    padding: 80px 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #222;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner-desc {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.banner-features {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 13px;
    color: #666;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.feature-item i {
    color: #22c55e;
}

/* ========== 分类标签&筛选栏样式 ========== */
.category-tabs {
    display: flex;
    padding: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.tab-item {
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-item.active {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 3px solid;
    border-image: var(--gradient-border) 1;
    font-weight: 500;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 15px;
    font-size: 14px;
    width: 100%;
}

.filter-left {
    color: #666;
}

.filter-right {
    display: flex;
    gap: 15px;
}

.filter-select {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    /* 新增：给下拉框容器加背景，提升对比度 */
    background-color: #f9fafb;
    padding: 2px 8px;
    border-radius: 4px;
}

.filter-select select {
    border: none;
    /* 核心修复：保留渐变文字，但给文字加兜底颜色 */
    color: #666; /* 兜底颜色，确保文字可见 */
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    /* 调整：渐变文字优先级高于兜底色，未选中时是渐变，选中后是兜底色 */
    -webkit-text-fill-color: transparent;
    outline: none;
    cursor: pointer;
    background-color: transparent; /* 保持下拉框背景透明 */
    /* 新增：清除默认样式，统一外观 */
    appearance: none;
    -webkit-appearance: none;
    padding: 2px 0;
    font-size: 14px;
}
/* 关键：优化下拉选项的样式，避免选项文字透明 */
.filter-select select option {
    /* 选项内文字恢复正常颜色，取消渐变和透明 */
    color: #333;
    -webkit-text-fill-color: #333;
    background-color: white; /* 选项背景白色，对比清晰 */
    padding: 4px 8px;
}

/* 选中的选项高亮 */
.filter-select select option:checked {
    background-color: #f0f1ff;
    color: #4a66e0;
}

/* ========== 源码卡片容器样式 ========== */
.source-container {
    padding: 0;
    margin-bottom: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.source-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    display: none;
}

.source-grid.active {
    display: grid;
    justify-items: center;
}

/* 源码卡片样式 */
.source-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
}

.source-card:hover {
    box-shadow: 0 8px 24px rgba(106, 76, 208, 0.1);
    border-color: transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-border) border-box;
    border: 1px solid transparent;
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    transition: transform 0.4s ease;
    transform-origin: center center;
    background-color: #f5f5f5;
    display: block;
}

.source-card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-btn {
    color: #666;
    background-color: #f9fafb;
}

.view-btn:hover {
    background-color: #f3f4f6;
    background: linear-gradient(#f3f4f6, #f3f4f6) padding-box,
                var(--gradient-border) border-box;
    border: 1px solid transparent;
    color: #6a4cd0;
}

.download-btn {
    color: white;
    background: var(--gradient-primary);
    border-color: transparent;
}

.download-btn:hover {
    background: var(--gradient-secondary);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    display: none;
}

.empty-state.active {
    display: block;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

/* ========== 订阅区域样式 ========== */
.subscribe-section {
    background: var(--gradient-primary);
    border-radius: 12px;
    padding: 30px;
    margin: 0 auto 40px;
    color: white;
    text-align: center;
    max-width: 1400px;
}

.subscribe-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.subscribe-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.subscribe-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
}

.subscribe-btn {
    padding: 10px 20px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.subscribe-btn:hover {
    background: var(--gradient-secondary);
}

/* ========== 页脚样式 ========== */
footer {
    padding: 30px 0;
    background-color: #f9fafb;
    font-size: 13px;
    color: #666;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    padding: 20px;
}

/* ========== 响应式适配样式 ========== */
/* 移动端登录hover提示框简化 */
@media (max-width: 768px) {
    .web-louser .user-name::after,
    .web-louser .logout-btn::after {
        font-size: 11px;
        padding: 3px 10px;
        top: calc(100% + 4px);
    }
    
    .web-louser li {
        padding: 2px 4px !important;
    }
}

/* 大屏适配 (1200px以下) */
@media (max-width: 1200px) {
    .source-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .main-nav {
        gap: 15px;
    }
}

/* 中等屏幕适配 (992px以下) */
@media (max-width: 992px) {
    .source-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .banner-wrapper {
        height: 350px;
    }
    .main-nav {
        display: none; /* 隐藏一级导航 */
    }
}

/* 平板适配 (768px以下) */
@media (max-width: 768px) {
    .source-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .banner-title {
        font-size: 24px;
    }
    .banner {
        padding: 40px 20px;
    }
    .top-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }
    .search-box {
        margin: 10px 0;
        width: 100%;
        max-width: none;
        order: 3;
    }
    .filter-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    .filter-left {
        width: 100%;
    }
    .banner-wrapper {
        height: 300px;
    }
    body {
        padding-top: 90px; /* 调整导航预留空间 */
    }
}

/* 手机端适配 (576px以下) */
@media (max-width: 576px) {
    .source-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .subscribe-form {
        flex-direction: column;
    }
    .category-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    .banner {
        padding: 20px 10px;
    }
    .banner-features {
        flex-direction: column;
        gap: 10px;
    }
    .banner-wrapper {
        height: 250px;
    }
}
/*帐号登后*/
#mainmenu{width:50px;height:50px;}
#mainmenu .link{display:block;}
#mainmenu .hy-tx{width:40px;height:40px;border-radius:20px;margin:15px 5px 15px 5px;}
#mainmenu2{display:none;}
#mainmenu .arrow{position:absolute;width:13px;height:8px;top:62px;right:20px;display:none;}
#mainmenu .yey-huiyuan{padding:0 20px !important;}

.nav-login-bd{position:absolute;width:300px;background:#fff;top:70px;right:0;z-index:9999;box-shadow:0 8px 16px 0 rgba(7,17,27,0.2);border-bottom-right-radius:8px;border-bottom-left-radius:8px;}
.nav-login-bd .nav-login-user{background:#fff;overflow:hidden;}
.nav-login-user .img{float:left;padding:10px 14px 10px 27px;}
.nav-login-user .img .homeLink{display:block;}
.nav-login-user .img img{width:50px;height:50px;border:2px solid #fff;border-radius:50%;display:block;}
.title-accProt-span{height:20px;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.title-accProt-span a{color:#333;font-size:14px;}
.title-accProt-span a:hover{color:#ff700a;}
.nav-login-user .title-accProt{width:100px;float:left;padding-top:15px;}
.nav-login-bottom{padding:20px 0 15px 0;background-color:#fff;border-top:1px solid #eee;border-bottom:1px solid #eee;}
ul.userFunList{overflow:hidden;}
.micro-card-vip{height:44px;line-height:44px;margin-left:20px;padding:6px 12px;border-radius:6px;background-color:#ffecdf;margin-bottom:10px;margin-right:20px;}
.micro-card-vip span{color:#ff700a;font-size:14px;}
.micro-card-vip a{color:#ff700a;font-size:14px;}
.nav-login-bottom ul li{width:100px;float:left;}
.nav-login-bottom ul li a{display:block;text-align:center;font-size:14px;}
.nav-login-bottom .userFunImg{display:block;width:55px;height:55px;position:relative;margin:0 auto;border-radius:5px;}
.nav-login-bottom .img-grzx{background:url(../images/person-v1.png) no-repeat;}
.nav-login-bottom .img-mytw{background:url(../images/person-v2.png) no-repeat;}
.nav-login-bottom .img-myhy{background:url(../images/person-v3.png) no-repeat;}
.nav-login-bottom ul li p{margin-top:5px;font-size:14px;line-height:24px;}
.nav-login-profile-Link{float:right;font-size:14px;color:#333;display:inline-block;line-height:42px;}

/*会员下拉*/
.yey-vip-ico-0{float:left;width:21px;height:21px;background:url(../images/person-vip1.png) no-repeat;margin-top:2px;}
.yey-vip-ico-1{float:left;width:21px;height:21px;background:url(../images/person-vip2.png) no-repeat;margin-top:2px;}
.topRight{float:right;height:70px;position:relative;}
.topRight .register{color:#fff;border:1px solid #ff700a;background:#ff700a;}
.topRight .a{width:70px;line-height:32px;height:32px;font-size:14px;text-align:center;border-radius:4px;border:1px solid #ff700a;transition:0.3s;display:inline-block;margin-top:18px;}
.topRight .globalLoginBtn{border:1px solid #ddd;color:#333;margin-right:12px;}
.topRight .globalLoginBtn:hover{border:1px solid #ff700a;background:#ff700a;color:#fff;}

