/* CSS Document */

/* 游戏合集页面样式 */

/* 基础响应式容器 */
.wrap {
    width: 100%;
    max-width: 7.5rem;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 确保图片正确缩放 */
.img_cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.12rem;
}

/* 合并的小屏幕手机响应式规则 - 已移至main.js动态控制 */

/* 取消div和p的垂直间距 */
div, p {
    margin: 0;
    padding: 0;
}

/* 卡片元数据基础样式 */
.card-meta {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.16rem;
    color: #8c8c8c;
    margin-top: 0.05rem;
}

.card-meta > span {
    display: inline-flex;
    align-items: center;
}



/* 控制section之间的间距 */
section {
    margin-bottom: 0.15rem;
}

/* 页面标题样式 */
.page-title {
    padding: 0.3rem 0.3rem 0.2rem;
    background: url('../images/yybg.png') no-repeat center center;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1;
}

.page-title > * {
    position: relative;
    z-index: 2;
}

.page-title h1 {
    font-size: 0.40rem;
    font-weight: 600;
    margin-bottom: 0.08rem;
    color: #ffffff;
    text-shadow: 0 .02rem .04rem rgba(0, 0, 0, .2);
}

.page-title p {
    font-size: 0.20rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 0;
}


/* 合集列表样式 */
.heji_list {
    padding: 0.2rem 0.3rem 0.3rem 0.3rem;
    background-color: #ffffff;
    margin: 0.15rem 0 0.15rem 0;
    border-radius: 0;
    box-shadow: none;
}

.heji_list ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 合集卡片样式 */
.heji-card {
    background: #ffffff;
    border-radius: 0.12rem;
    overflow: hidden;
    box-shadow: 0 .02rem .08rem rgba(0, 0, 0, .08);
    transition: all .3s ease;
    display: flex;
    flex-direction: row;
    height: 2rem;
    border: none;
}

.heji-card:hover {
    transform: translateY(-.02rem);
    box-shadow: 0 .04rem .12rem rgba(0, 0, 0, .12);
}

.card-link {
    display: flex;
    flex-direction: row;
    height: 100%;
    text-decoration: none;
    width: 100%;
}

/* 卡片背景图 */
.card-bg {
    width: 2.8rem;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 0.12rem;
    position: relative;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.38rem;
    background: rgba(0, 0, 0, .7);
    z-index: 10;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.img-overlay .game-count {
    color: #ffffff;
    font-size: 0.18rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

.img-overlay .game-count strong {
    color: #ffd700;
    font-weight: 700;
}

.heji-card:hover .card-bg img {
    transform: scale(1.08);
}

/* 卡片内容 */
.card-content {
    padding: 0.05rem 0.15rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 0.28rem;
    font-weight: 600;
    color: #262626;
    line-height: 1.5;
    margin: 0 0.15rem 0 0;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: none;
    letter-spacing: 0.01rem;
}

.card-badge {
    position: absolute;
    top: 0.1rem;
    left: 0.1rem;
    padding: 0.02rem 0.15rem;
    background-color: #ff6b6b;
    color: white;
    font-size: 0.18rem;
    border-radius: 0.2rem;
    z-index: 1;
    box-shadow: 0 .05rem .1rem rgba(0, 0, 0, .3);
    white-space: nowrap;
}

/* 卡片描述 */
.card-desc {
    font-size: 0.24rem;
    color: #595959;
    line-height: 1.7;
    margin: 0 0 0.15rem 0 !important;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.01rem;
}



.card-meta strong {
    color: #667eea;
    font-weight: 600;
    margin: 0 0.02rem;
    letter-spacing: 0;
}

.card-meta .update-date,
.card-meta .player-count {
    font-size: 0.18rem;
}


/* 合集详情页面(hjxq.html)专用样式 */

/* 合集头部样式 */
.collection-header {
    position: relative;
    height: 3.2rem;
    overflow: hidden;
    margin-bottom: 0;
}

.collection-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.7) 100%);
}

.collection-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.3rem;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.collection-title {
    font-size: 0.36rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    color: white;
    text-shadow: 0 .02rem .04rem rgba(0, 0, 0, .5);
}

.collection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    opacity: 0.9;
}

.collection-meta span {
    display: inline-block;
    font-size: 0.26rem;
}

.collection-meta strong {
    color: #ffd700;
}

/* 合集标签样式 - 未使用 */

/* 合集内容样式 */
.collection-content {
    padding: 0.3rem 0.3rem 0.3rem;
    background-color: #f5f5f5;
    min-height: 5rem;
    margin-top: 0;
    margin-bottom: 0.15rem;
}

.collection-detail {
    background-color: #ffffff;
    padding: 0.1rem;
    border-radius: 0.12rem;
    position: relative;
}

/* 区块标题样式 - 未使用已删除 */

/* 文本展开相关样式 */
.intro-text-container {
    position: relative;
    margin-bottom: 0.2rem;
}

.intro-text-container .intro-text {
    color: #666;
    text-align: justify;
    text-indent: 2em;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
    transition: all .3s ease;
    font-size: 0.30rem;
    line-height: 1.8;
    word-break: break-word;
    white-space: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    max-height: 3.24rem; /* 0.30rem * 1.8 * 6 = 3.24rem */
    height: 3.24rem;
}

.intro-text-container .intro-text.expanded {
    display: block;
    max-height: none;
    height: auto;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    box-orient: unset;
}

.expand-btn {
    position: absolute;
    bottom: 0.07rem;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 0 0.1rem;
    height: 0.30rem;
    font-size: 0.26rem;
    line-height: 0.30rem;
    cursor: pointer;
    border-radius: .04rem;
    transition: all 0.3s;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.6rem;
}

.expand-btn::after {
    content: '';
    display: inline-block;
    width: 0.1rem;
    height: 0.1rem;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(45deg);
    margin-left: 0.05rem;
    transition: transform 0.3s;
}

.expand-btn.expanded::after {
    transform: rotate(225deg);
}

/* 游戏列表样式 */
.game-list {
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
}

.game-grid {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: relative;
}

.game-item {
    background-color: #ffffff;
    border-radius: 0.12rem;
    overflow: hidden;
    box-shadow: 0 .02rem .08rem rgba(0, 0, 0, .08);
    transition: all .3s ease;
    display: flex;
    flex-direction: row;
}

.game-item a {
    display: flex;
    flex-direction: row;
    width: 100%;
    text-decoration: none;
}

.game-cover {
    width: 1.3rem;
    height: 1.3rem;
    overflow: hidden;
    flex-shrink: 0;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 0.05rem 0.15rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-title {
    font-weight: 600;
    color: #262626;
    margin-bottom: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.30rem;
}

.game-meta {
    display: flex;
    align-items: center;
    color: #8c8c8c;
    margin-bottom: 0.08rem;
    gap: 0.08rem;
    white-space: nowrap;
    overflow: hidden;
}

.game-meta span {
    font-size: 0.22rem;
    line-height: 1.2;
}

.game-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.06rem;
    margin-top: 0.06rem;
    white-space: nowrap;
    overflow: hidden;
}

.game-tag {
    color: #8c8c8c;
    padding: 0.02rem 0.1rem;
    background-color: #f5f5f5;
    border-radius: 0.1rem;
    font-size: 0.22rem;
    line-height: 1.2;
}

.game-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
}

.view-btn {
    background-color: #667eea;
    color: white;
    padding: 0.05rem 0.2rem;
    border-radius: 0.15rem;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
    transition: all .3s ease;
}

/* 加载指示器样式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.05rem 0.1rem;
    margin-top: 0.05rem;
    margin-bottom: 0.05rem;
    opacity: 0;
    transition: opacity .3s ease;
    min-height: 0.5rem;
    max-height: 0.5rem;
}

.loading-indicator.active {
    opacity: 1;
}

.loading-indicator.error {
    cursor: pointer;
}

.loading-spinner {
    width: 0.3rem;
    height: 0.3rem;
    border: .04rem solid rgba(200, 200, 200, .3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.02rem;
}

.loading-text {
    text-align: center;
    color: #666;
    font-size: 0.20rem;
    line-height: 1;
    margin: 0;
}

.loading-message,
.loading-error {
    margin: 0;
}

/* 动画效果 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


