* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #1a1a1a;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 导航标签 */
.nav-tabs {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-tabs .container {
    display: flex;
    justify-content: flex-start;
    gap: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
}

.nav-tabs::-webkit-scrollbar {
    height: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #fff;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #00ff88;
    border-radius: 3px 3px 0 0;
}

/* 主内容区 */
.main-content {
    padding: 0;
    min-height: calc(100vh - 100px);
    background: #1a1a1a;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
    padding: 8px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 板块 */
.section {
    margin-bottom: 0px;
}

.section-title {
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 10px;
    padding-left: 0;
    border-left: none;
    font-weight: 600;
}

/* 顶部横幅 */
.top-banner {
    margin: 8px 0 10px 0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-y; /* 允许垂直滚动，阻止水平滚动冲突 */
}

.top-banner img {
    display: none; /* 隐藏加载失败的图片 */
}

.top-banner::before {
    content: '';
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: bold;
}

/* Banner 指示点 */
.banner-dots {
    pointer-events: auto;
}

.banner-dot {
    transition: all 0.3s ease;
}

.banner-dot:hover {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.9) !important;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); /* 使用minmax确保列宽完全一致 */
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* 确保所有卡片宽度一致 */
.card-grid > * {
    min-width: 0; /* 防止内容撑开 */
    max-width: 100%; /* 防止溢出 */
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }
}

/* 导航卡片 */
.nav-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
    display: block; /* 改为block布局，更简单稳定 */
    position: relative;
    width: 100%;
    min-width: 0; /* 防止内容撑开 */
    overflow: hidden; /* 防止子元素溢出 */
}

.nav-card:hover {
    transform: translateY(-2px);
}

.nav-card:active {
    transform: scale(0.98);
}

/* 卡片图片区域 */
.card-image {
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 使用padding-bottom创建严格的1:1宽高比 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin: 0;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* 隐藏加载失败的图片 */
}

/* 占位图文字 */
.card-image::before {
    content: '';
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

/* 角标 */
.card-badge {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.card-icon {
    font-size: 40px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.card-title {
    display: block;
    font-size: 13px;
    font-weight: 400;
    padding: 8px 6px;
    width: 100%;
    background: transparent;
    line-height: 1.2;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.card-desc {
    font-size: 11px;
    color: var(--text-light);
    padding: 0 6px 8px 6px;
    margin-top: -4px;
}


/* 同城交友板块 */
.dating-section {
    margin-top: 0px;
    padding: 8px 0;
    background: #1a1a1a;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
}

.dating-title {
    font-size: 18px;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 8px;
}

.dating-title span {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
    font-weight: 400;
    letter-spacing: 1px;
}

.dating-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.dating-card {
    background: #2d2d2d;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s;
}

.dating-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.dating-image {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.dating-image::before {
    content: '';
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}

.dating-likes {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.dating-likes::before {
    content: '🤍';
    margin-right: 4px;
}

.dating-info {
    padding: 15px;
    background: #2d2d2d;
}

.dating-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.dating-detail {
    font-size: 13px;
    color: #999;
    margin: 6px 0;
    line-height: 1.6;
}

.dating-detail:first-of-type {
    color: #4ade80;
}

.dating-like {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 50px;
    cursor: pointer;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.5));
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.dating-like:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 16px rgba(255, 107, 157, 0.6));
}

.dating-like:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .dating-image {
        height: 240px;
    }
    
    .dating-info {
        padding: 12px;
    }
    
    .dating-name {
        font-size: 16px;
    }
    
    .dating-detail {
        font-size: 12px;
    }
    
    .dating-like {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 15px;
        right: 15px;
    }
}

/* 直播专区 */
.live-section {
    margin-top: 8px;
    padding: 8px 0;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 8px;
}

.section-header span {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
    font-weight: 400;
    letter-spacing: 1px;
}

.live-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.live-card {
    background: #2d2d2d;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px;
    gap: 10px;
}

.live-image {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}


.live-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-title {
    font-size: 14px;
    color: #fff;
    margin: 0;
    font-weight: 500;
}

.live-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4ade80;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
    transition: all 0.3s;
    flex-shrink: 0;
}

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

/* 情趣商城 */
.mall-section {
    margin-top: 8px;
    padding: 8px 0;
}

.mall-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mall-card {
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mall-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.mall-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
}

.mall-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4ade80;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.mall-title {
    font-size: 15px;
    color: #fff;
    padding: 10px 12px 5px;
    margin: 0;
    font-weight: 500;
}

.mall-price {
    font-size: 18px;
    color: #4ade80;
    font-weight: bold;
    padding: 0 12px;
}

.mall-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
}

.stars {
    color: #fbbf24;
    font-size: 12px;
}

.sold {
    font-size: 11px;
    color: #999;
}

.mall-reviews {
    font-size: 11px;
    color: #999;
    padding: 0 12px 12px;
}

/* 底部 */
.footer {
    display: none;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-tabs .container {
        gap: 25px;
        padding-left: 15px;
    }

    .tab-btn {
        padding: 12px 0;
        font-size: 14px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .top-banner {
        margin: 8px 0 12px 0;
    }

    .top-banner img {
        max-height: 150px;
    }

    .card-icon {
        font-size: 36px;
    }

    .card-title {
        font-size: 12px;
        padding: 6px 4px;
    }

    .card-badge {
        font-size: 9px;
        padding: 2px 6px;
        top: 4px;
        right: 4px;
    }
}

@media (max-width: 480px) {
    .top-banner img {
        max-height: 120px;
    }

    .card-icon {
        font-size: 32px;
    }

    .card-title {
        font-size: 11px;
        padding: 5px 3px;
    }

    .section-title {
        font-size: 13px;
    }

    .card-badge {
        font-size: 8px;
        padding: 2px 5px;
    }
}

