/* 发现页面样式 */
.discover-section {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: visible;
}

/* 标签导航区域 */
.discover-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6vw;
    padding: 0.2vw 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 0.6vw;
}

.discover-nav::-webkit-scrollbar {
    display: none;
}

.discover-btn {
    padding: 0.55vw 1.1vw;
    border: none;
    border-radius: 0.55vw;
    background: #f5f5f5;
    color: #666;
    font-size: 0.97vw;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.discover-btn:hover {
    background: #eee;
    color: #333;
}

.discover-btn.active {
    background: #ff1e3c;
    color: #fff;
}

/* 游戏卡片网格 */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1.2vw;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

/* 游戏卡片样式 */
.discover-card {
    display: flex;
    flex-direction: column;
    background: var(--card-background);
    border-radius: 0.5vw;
    box-shadow: 0 0.125vw 0.25vw rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    row-gap: 0.3125vw;
    cursor: pointer;
    position: relative;
}

.discover-card:hover {
    transform: translateY(-0.25vw);
    box-shadow: 0 0.5vw 1vw rgba(0, 0, 0, 0.1);
}

.discover-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%;  /* 16:9 比例 */
    background: var(--btn-background);
    overflow: hidden;
    margin: 0;
}

.discover-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
    display: block;
}

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

.discover-info {
    position: relative;
    display: flex;
    flex-direction: row;
    padding: 0;
    gap: 0.625vw;
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    align-items: center;
    overflow: hidden;
}

.discover-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    flex: 1;
    min-width: 0;
    max-width: 70%;
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
}

.discover-icon {
    width: 1.8vw;
    aspect-ratio: 1/1;
    border-radius: 0.4vw;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    position: relative;
}

.discover-icon img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-title-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25vw;
    overflow: visible;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
}

.discover-title {
    font-size: 0.7vw;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    width: 100%;
    display: flex;
    align-items: center;
    height: 50%;
    box-sizing: border-box;
    font-family: -apple-system;
}

.discover-tags {
    display: flex;
    gap: 0.25vw;
    width: 100%;
    min-width: 0;
    overflow: visible;
    flex-wrap: nowrap;
    position: relative;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    line-height: 1;
    box-sizing: border-box;
    height: 50%;
    align-items: center;
}

.discover-tag {
    font-size: 0.6vw;
    color: var(--text-secondary);
    background: var(--btn-background);
    padding: 0.1vw 0;
    border-radius: 0.2vw;
    white-space: nowrap;
    font-family: -apple-system;
}

/* 推荐统计样式 */
.discover-stats {
    position: absolute;
    bottom: 0.5vw;
    left: 0.5vw;
    display: flex;
    flex-direction: row;
    gap: 0.5vw;
    align-items: center;
    z-index: 1;
}

.discover-count {
    display: flex;
    align-items: center;
    gap: 0.2vw;
    color: #fff;
    font-size: 0.6vw;
    line-height: 1;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(0.2vw);
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
}

.discover-want,
.discover-played {
    display: flex;
    align-items: center;
    gap: 0.2vw;
    color: #fff;
    font-size: 0.6vw;
    line-height: 1;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(0.2vw);
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
}

.discover-want i,
.discover-played i {
    font-size: 0.6vw;
    color: #ff4d4f;
    line-height: 1;
}

.discover-want i.bi-heart,
.discover-played i.bi-controller {
    color: #ff4d4f;
}

/* 标签样式 */
.discover-hot {
    font-size: 0.6vw;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
    white-space: nowrap;
    font-family: -apple-system;
    line-height: 1;
}

/* 新游戏角标样式 */
.discover-hot.new-game {
    position: absolute;
    top: 0.4vw;
    right: 0.4vw;
    color: #fff;
    background: #4caf50;
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
    font-size: 0.6vw;
    font-weight: 500;
    z-index: 2;
    box-shadow: 0 0.1vw 0.2vw rgba(0, 0, 0, 0.1);
}

.discover-hot.tag-rank {
    color: #338aff;
    background: rgba(51, 138, 255, 0.2);
}

/* 加载更多按钮 */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 1.25vw;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    padding: 0.75vw 1.5vw;
    background: var(--card-bg);
    color: var(--text-color);
    border: 0.0625vw solid var(--border-color);
    border-radius: 0.375vw;
    font-size: 0.875vw;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system;
}

.load-more-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-0.125vw);
}

.load-more-btn i {
    font-size: 1vw;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .discover-card {
        background: var(--card-bg);
    }

    .discover-btn {
        background: var(--card-bg);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .discover-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .discover-tag {
        background: rgba(255, 255, 255, 0.1);
    }

    .load-more-btn {
        background: var(--card-bg);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .load-more-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .discover-want,
    .discover-played {
        color: #fff;
    }
}

/* 下载按钮样式 */
.discover-download {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5vw;
    height: 1.4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    padding: 0;
    flex-shrink: 0;
}

.discover-download .record-download-btn {
    width: 3.5vw;
    height: 1.4vw;
    padding: 0 0.3vw;
    background: var(--error-color, #ff4d4f);
    color: white;
    border: none;
    border-radius: 0.15vw;
    font-size: 0.55vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15vw;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
    font-family: -apple-system;
}

.discover-download .record-download-btn:hover {
    background: #ff3748;
    transform: translateY(-0.125vw);
}

.discover-download .record-download-btn i {
    font-size: 0.55vw;
}

.discover-card:hover .discover-download {
    opacity: 1;
}

/* 删除旧的下载按钮样式 */
.discover-stats .record-download-btn,
.discover-card:hover .discover-stats .record-download-btn {
    display: none !important;
} 