/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fb;
    color: #1a1a2e;
    line-height: 1.5;
}

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

/* ========== 头部导航 ========== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 12px;
    opacity: 0.85;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.user-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

/* ========== 手机端导航 ========== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }
    nav.show {
        display: flex;
    }
    nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    header .container {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ========== 纯图片轮播图样式 ========== */
.hero-swiper {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}
.hero-swiper .swiper-slide {
    position: relative;
}
.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.6;
}
.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #f5576c;
}
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s;
}
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.6);
}
@media (max-width: 768px) {
    .hero-swiper { height: 320px; }
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev { display: none; }
}
@media (max-width: 480px) {
    .hero-swiper { height: 250px; }
}

/* ========== 搜索框 ========== */
.search-section {
    margin: 30px 0 20px;
}
.search-form {
    max-width: 600px;
    margin: 0 auto;
}
.search-box {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
}
.search-box button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}
@media (max-width: 768px) {
    .search-box input {
        padding: 12px 18px;
        font-size: 14px;
    }
    .search-box button {
        padding: 0 20px;
        font-size: 14px;
    }
}

/* ========== 资源网格 ========== */
.resources-header {
    text-align: center;
    margin: 40px 0 30px;
}
.resources-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #1a1a2e;
}
.resources-header p {
    color: #666;
    font-size: 16px;
}

/* PC端：一行4个 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.resource-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.resource-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.resource-card:hover .resource-cover img {
    transform: scale(1.05);
}
.sales-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.resource-info {
    padding: 20px;
}
.resource-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1a2e;
}
.resource-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price {
    font-size: 20px;
    font-weight: bold;
    color: #f5576c;
}
.buy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}
.buy-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 平板端：一行2个 */
@media (max-width: 992px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 手机端：一行2个（横排） */
@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .resource-cover {
        height: 110px;
    }
    .resource-info {
        padding: 10px;
    }
    .resource-info h3 {
        font-size: 13px;
    }
    .resource-desc {
        font-size: 11px;
        height: 30px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }
    .price {
        font-size: 15px;
    }
    .buy-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
    .resources-header h2 {
        font-size: 22px;
    }
    .resources-header p {
        font-size: 13px;
    }
}

/* 小屏手机：一行1个 */
/*@media (max-width: 480px) {*/
/*    .resources-grid {*/
/*        grid-template-columns: 1fr;*/
/*        gap: 15px;*/
/*    }*/
    .resource-cover {
        height: 160px;
    }
    .resource-info h3 {
        font-size: 15px;
    }
    .price {
        font-size: 18px;
    }
    .buy-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* ========== 等级说明 ========== */
.level-section {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.level-section h3 {
    margin-bottom: 25px;
    font-size: 24px;
    color: #1a1a2e;
}
.level-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.level-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    text-align: center;
    font-weight: bold;
    min-width: 100px;
}
.level-item small {
    font-size: 11px;
    font-weight: normal;
    opacity: 0.9;
    display: block;
    margin-top: 4px;
}
.level-note {
    color: #666;
    font-size: 14px;
    background: #f8f9fa;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
}
@media (max-width: 768px) {
    .level-item {
        padding: 8px 16px;
        min-width: 70px;
        font-size: 12px;
    }
}

/* ========== 页脚 ========== */
footer {
    background: #1a1a2e;
    color: #888;
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
}
footer p {
    margin: 8px 0;
    font-size: 14px;
}
footer a {
    color: #888;
    text-decoration: none;
}

/* ========== 辅助类 ========== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
/* ========== 在线客服浮窗 ========== */
.customer-service {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
}

.service-btn {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all 0.3s;
    color: white;
    font-size: 28px;
}

.service-btn:hover {
    transform: scale(1.1);
}

.service-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.service-panel.show {
    opacity: 1;
    visibility: visible;
    bottom: 80px;
}

.service-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.service-header h4 {
    margin: 0;
    font-size: 16px;
}

.service-header p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.service-list {
    padding: 10px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-radius: 10px;
    transition: background 0.3s;
}

.service-item:hover {
    background: #f5f7fb;
}

.service-icon {
    width: 40px;
    height: 40px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.service-info h5 {
    margin: 0;
    font-size: 14px;
}

.service-info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #888;
}

.close-service {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 12px;
    cursor: pointer;
}

.close-service:hover {
    color: #666;
}

/* 手机端客服浮窗调整 */
@media (max-width: 768px) {
    .customer-service {
        right: 15px;
        bottom: 80px;
    }
    .service-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    .service-panel {
        width: 260px;
    }
    /* ========== 手机端登录/注册页面优化 ========== */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }
    .auth-box {
        padding: 25px 20px;
        border-radius: 20px;
    }
    .auth-box h2 {
        font-size: 24px;
    }
    .auth-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
    }
    .btn-block {
        padding: 12px;
        font-size: 16px;
    }
    .auth-footer {
        font-size: 13px;
    }
    /* ========== 邀请横幅样式 ========== */
.invite-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    padding: 18px 24px;
    margin: 30px 0;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.invite-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.invite-icon {
    font-size: 28px;
}
.invite-link {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-family: monospace;
    word-break: break-all;
    flex: 1;
    text-align: center;
}
.invite-content button {
    background: white;
    border: none;
    padding: 8px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    color: #f5576c;
    transition: all 0.3s;
}
.invite-content button:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ========== 下载按钮样式（绿泡泡效果） ========== */
.download-box .btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.download-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39,174,96,0.4);
}
/* ========== 卖家中心头部布局 ========== */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    flex: 1;
}

.header-earnings {
    display: flex;
    gap: 20px;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 40px;
    backdrop-filter: blur(4px);
}

.header-earnings .earning-item {
    text-align: center;
    padding: 4px 12px;
}

.header-earnings .earning-label {
    font-size: 11px;
    opacity: 0.8;
}

.header-earnings .earning-value {
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* 手机端适配 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    .header-left {
        width: 100%;
        text-align: center;
    }
    .header-earnings {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 15px;
        padding: 6px 12px;
    }
    .header-earnings .earning-value {
        font-size: 13px;
    }
    .header-right {
        width: 100%;
        justify-content: center;
    }
    .menu-toggle {
        display: block;
    }
    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }
    nav.show {
        display: flex;
    }
}
}
}
}