/* ======================================
   全局重置 & 基础样式
   ====================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}
a:hover {
    color: #ff4d4f;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    height: auto;
}

/* ======================================
   顶部导航栏
   ====================================== */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo img {
    height: 36px;
}
.main-nav {
    display: flex;
    gap: 25px;
}
.main-nav a {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    position: relative;
}
.main-nav a:hover,
.main-nav a.active {
    color: #ff4d4f;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    transition: all 0.2s;
}
.icon-btn:hover {
    background-color: #f5f5f5;
    color: #ff4d4f;
}
.login-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    background-color: #1890ff;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}
.login-btn:hover {
    background-color: #40a9ff;
    color: #fff;
}

/* ======================================
   搜索横幅区
   ====================================== */
.search-banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 80px 0;
    color: #fff;
    text-align: center;
}
.search-content h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}
.search-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}
.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.search-select {
    width: 100px;
    border-right: 1px solid #eee;
}
.search-select select {
    width: 100%;
    height: 50px;
    border: none;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
}
.search-input {
    flex: 1;
    height: 50px;
    border: none;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}
.search-btn {
    width: 60px;
    height: 50px;
    background-color: #ff4d4f;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}
.search-btn:hover {
    background-color: #ff7875;
}
.hot-search {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.hot-search .label {
    background-color: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.hot-search a {
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.hot-search a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* ======================================
   最新动态滚动条
   ====================================== */
.news-bar {
    background-color: #fff;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.news-bar .container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.news-title {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 15px;
    background-color: #e6f7ff;
    color: #1890ff;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
}
.news-scroll {
    flex: 1;
    height: 30px;
    overflow: hidden;
}
.news-scroll ul {
    animation: scroll 20s linear infinite;
}
.news-scroll li {
    height: 30px;
    line-height: 30px;
    color: #666;
}
.news-arrow {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}
.news-arrow a {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 4px;
}
.news-arrow a:hover {
    background-color: #f5f5f5;
    color: #ff4d4f;
}
@keyframes scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-300px); }
}

/* ======================================
   通用区块标题
   ====================================== */
.section-title {
    text-align: center;
    margin-bottom: 30px;
}
.section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.section-title p {
    color: #999;
    font-size: 14px;
}

/* ======================================
   分类标签
   ====================================== */
.cate-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.tab-item {
    padding: 8px 20px;
    background-color: #fff;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.tab-item:hover,
.tab-item.active {
    background-color: #ff4d4f;
    color: #fff;
}

/* ======================================
   资源网格布局
   ====================================== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.resource-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.card-cover {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}
.resource-card:hover .card-cover img {
    transform: scale(1.1);
}
.cover-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}
.resource-card:hover .cover-mask {
    opacity: 1;
}
.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
    color: #ff4d4f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.card-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}
.tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.tag.vip {
    background-color: #ff4d4f;
    color: #fff;
}
.tag.test {
    background-color: #52c41a;
    color: #fff;
}
.card-info {
    padding: 15px;
}
.card-cate {
    margin-bottom: 8px;
}
.card-cate .cate {
    font-size: 12px;
    color: #1890ff;
    margin-right: 8px;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-title a {
    color: #333;
}
.card-title a:hover {
    color: #ff4d4f;
}
.card-desc {
    color: #999;
    font-size: 13px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ======================================
   文章网格布局
   ====================================== */
.article-section {
    margin-top: 50px;
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    transition: all 0.3s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.article-card .card-cover {
    width: 180px;
    height: 140px;
    flex-shrink: 0;
}
.article-card .card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-card .card-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}
.article-card .card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    flex: 1;
}

/* ======================================
   分页
   ====================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.page-item {
    padding: 8px 16px;
    background-color: #fff;
    border-radius: 4px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.page-item:hover,
.page-item.active {
    background-color: #ff4d4f;
    color: #fff;
}
.page-item.disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

/* ======================================
   空提示
   ====================================== */
.empty-tips {
    text-align: center;
    padding: 50px 0;
    color: #999;
    font-size: 14px;
}

/* ======================================
   页脚
   ====================================== */
.site-footer {
    background-color: #fff;
    margin-top: 50px;
    padding-top: 50px;
    border-top: 1px solid #eee;
}
.footer-content {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 3fr;
    gap: 30px;
    margin-bottom: 30px;
}
.footer-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}
.footer-info p {
    color: #666;
    line-height: 1.8;
    margin-top: 15px;
}
.footer-nav ul li,
.footer-about ul li {
    margin-bottom: 10px;
}
.footer-nav ul li a,
.footer-about ul li a {
    color: #666;
}
.footer-nav ul li a:hover,
.footer-about ul li a:hover {
    color: #ff4d4f;
}
.qrcode-box {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.qrcode-box img {
    width: 100px;
    height: 100px;
}
.footer-contact p {
    color: #666;
    line-height: 1.8;
}
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
}
.footer-bottom p {
    margin-bottom: 8px;
}
.footer-bottom a {
    color: #999;
    margin: 0 10px;
}
.performance {
    color: #1890ff;
    font-family: Consolas, monospace;
}

/* ======================================
   右侧悬浮按钮
   ====================================== */
.float-sidebar {
    position: fixed;
    right: 20px;
    bottom: 50px;
    z-index: 998;
}
.float-item {
    width: 45px;
    height: 45px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.float-item:hover {
    background-color: #ff4d4f;
    color: #fff;
}
.back-top {
    display: none;
}
/* 新增标签样式 */
.tag.member { background: #722ed1; color: #fff; }
.tag.balance { background: #13c2c2; color: #fff; }
.tag.clear { background: #faad14; color: #fff; }
/* 用户下拉菜单样式 */
.user-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    min-width: 130px;
    overflow: hidden;
}
.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.dropdown-menu a:hover {
    background-color: #f3f4f6;
}
.user-dropdown:hover .dropdown-menu {
    display: block;
}

/* 网站 Logo 样式 */
.site-logo-img {
    height: 40px; /* 适配导航栏高度，可根据实际调整 */
    width: auto;
    object-fit: contain; /* 保持图片比例不变形 */
    display: block;
}
.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}