/* 公测活动合集页 */

html {
    min-height: 100%;
    height: auto;
    background-color: #e6e1d8;
}

body.index-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 0.22rem;
    line-height: 1.45;
    color: #693105;
    -webkit-font-smoothing: antialiased;
    background: #e6e1d8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.index-body a:hover {
    opacity: 1;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ---------- Header ---------- */

.index-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    width: 100%;
    padding: 0.16rem 0.36rem 0;
    box-sizing: border-box;
    pointer-events: none;
}

.index-header > * {
    pointer-events: auto;
}

.index-logo {
    width: 2.1rem;
    height: auto;
    max-height: 1.4rem;
    object-fit: contain;
    margin-top: -0.12rem;
    flex-shrink: 0;
}

.index-slogan--pc {
    grid-column: 2;
    justify-self: center;
    max-height: 1.5rem;
    margin-top: -0.1rem;
    margin-left: -7rem;
    object-fit: contain;
    pointer-events: none;
}

.index-slogan--mobile {
    display: none;
}

.index-header-actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 0.14rem;
    flex-shrink: 0;
}

.index-invite-btn {
    display: inline-block;
    line-height: 0;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.index-invite-btn img {
    height: 0.52rem;
    width: auto;
}

.index-invite-btn__hover {
    display: none;
}

.index-invite-btn:hover,
.index-invite-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.index-invite-btn:hover .index-invite-btn__default,
.index-invite-btn:focus-visible .index-invite-btn__default {
    display: none;
}

.index-invite-btn:hover .index-invite-btn__hover,
.index-invite-btn:focus-visible .index-invite-btn__hover {
    display: block;
}

.index-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-width: 1.56rem;
    height: 0.52rem;
    padding: 0 0.2rem 0 0.16rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    white-space: nowrap;
}

.index-action-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.28rem;
    height: 0.28rem;
    flex-shrink: 0;
}

.index-action-btn__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.index-action-btn__text {
    font-size: 0.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.index-action-btn--download {
    background: linear-gradient(180deg, #5eb8ff 0%, #2d78e8 55%, #1f5fd0 100%);
    box-shadow: 0 0.04rem 0.12rem rgba(31, 95, 208, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 40, 120, 0.35);
}

.index-action-btn--site {
    background: rgba(8, 28, 72, 0.42);
    box-shadow: 0 0.04rem 0.12rem rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.index-action-btn:hover,
.index-action-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* ---------- Main layout ---------- */

.index-main {
    position: relative;
    min-height: 100vh;
    max-height: 100vh;
}

.index-hero {
    position: relative;
    height: 100vh;
    background: url("../images/bg-top.jpg") no-repeat center bottom;
    background-size: cover;
}

.index-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 100vh;
    padding: 1rem 0.12rem 0.72rem;
    box-sizing: border-box;
}

.index-center {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 6.9rem;
    max-width: 39vw;
    margin: 0 -1.5rem 0 -2rem;
    z-index: 5;
    pointer-events: none;
}

.index-characters {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.index-start-btn {
    position: relative;
    z-index: 3;
    display: block;
    width: 3.8rem;
    max-width: 90%;
    margin-top: -2.62rem;
    line-height: 0;
    pointer-events: auto;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.index-start-btn img {
    width: 100%;
    height: auto;
}

.index-start-btn:hover,
.index-start-btn:focus-visible {
    transform: scale(1.04);
    filter: brightness(1.08) drop-shadow(0 0 0.18rem rgba(255, 210, 80, 0.65));
}

/* ---------- PC activity cards ---------- */

.index-cards-column {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    max-width: 5.8rem;
    z-index: 3;
}

.index-cards-column--left {
    margin-right: -0.52rem;
}

.index-cards-column--right {
    margin-left: -0.1rem;
}

.index-cards {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.16rem;
    min-width: 0;
    pointer-events: none;
}

.index-cards--left {
    align-items: flex-end;
}

.index-cards--right {
    align-items: flex-start;
}

.index-cards-hit {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.16rem;
    z-index: 2;
    pointer-events: none;
}

.index-cards-hit--left {
    align-items: flex-end;
}

.index-cards-hit--right {
    align-items: flex-start;
}

.index-card-hit {
    display: block;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
}

.index-card {
    display: flex;
    align-items: center;
    max-width: 100%;
    transition: transform 0.28s ease, filter 0.28s ease;
    filter: drop-shadow(0 0.04rem 0.12rem rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

.index-card__body {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
    line-height: 0;
}

.index-card__side {
    position: absolute;
    top: 50%;
    width: 0.22rem;
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.index-card__side--to-right {
    /* right: -0.1rem; */
    animation: index-side-nudge-right 1.4s ease-in-out infinite;
}

.index-card__side--to-left {
    right: 0;
    animation: index-side-nudge-left 1.4s ease-in-out infinite;
}

@keyframes index-side-nudge-right {
    0%,
    100% {
        transform: translateY(-50%) translateX(0);
        opacity: 0.82;
    }

    50% {
        transform: translateY(-50%) translateX(0.08rem);
        opacity: 1;
    }
}

@keyframes index-side-nudge-left {
    0%,
    100% {
        transform: translateY(-50%) translateX(0);
        opacity: 0.82;
    }

    50% {
        transform: translateY(-50%) translateX(-0.08rem);
        opacity: 1;
    }
}

.index-card__tag {
    display: block;
    width: 5.1rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.index-cards--left .index-card:nth-child(2) {
    transform: translateX(0.22rem);
}

.index-cards--right .index-card:nth-child(2) {
    transform: translateX(-0.22rem);
}

.index-cards--right .index-card:nth-child(3),
.index-cards-hit--right .index-card-hit:nth-child(3) {
    transform: translateX(0.38rem);
}

.index-card__detail {
    position: absolute;
    z-index: 3;
    width: 0.96rem;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.28s ease, filter 0.28s ease;
    top: 0.16rem;
}

/* 左列：查看详情按钮 */
.index-card--left[data-tag="1"] .index-card__detail {
    left: 0.52rem;
    /* top: 0.16rem; */
}

.index-card--left[data-tag="3"] .index-card__detail {
    left: 0.60rem;
    /* top: 0.19rem; */
}

.index-card--left[data-tag="5"] .index-card__detail {
    left: 0.72rem;
    /* top: 0.19rem; */
}

/* 右列：查看详情按钮 */
.index-card--right[data-tag="2"] .index-card__detail {
    right: 1.1rem;
    /* top: 0.21rem; */
}

.index-card--right[data-tag="4"] .index-card__detail {
    right: 0.9rem;
    /* top: 0.21rem; */
}

.index-card--right[data-tag="6"] .index-card__detail {
    right: 1.1rem;
    /* top: 0.21rem; */
}

.index-card.is-hover {
    transform: translateY(-0.04rem) scale(1.02);
    filter: drop-shadow(0 0.08rem 0.22rem rgba(255, 140, 40, 0.45)) brightness(1.06);
}

.index-card.is-hover .index-card__detail {
    transform: scale(1.06);
    filter: brightness(1.1);
}

.index-card--left.is-hover {
    transform: translateX(-0.04rem) scale(1.02);
}

.index-cards--left .index-card:nth-child(2).is-hover {
    transform: translateX(0.18rem) translateY(-0.04rem) scale(1.02);
}

.index-card.is-hover .index-card__side--to-right {
    animation-duration: 0.9s;
}

.index-card.is-hover .index-card__side--to-left {
    animation-duration: 0.9s;
}

.index-card--right.is-hover {
    transform: translateX(0.04rem) scale(1.02);
}

.index-cards--right .index-card:nth-child(2).is-hover {
    transform: translateX(-0.18rem) translateY(-0.04rem) scale(1.02);
}

.index-cards--right .index-card:nth-child(3).is-hover {
    transform: translateX(0.42rem) translateY(-0.04rem) scale(1.02);
}

/* ---------- Sidebar ---------- */

.index-sidebar {
    position: fixed;
    right: 0.08rem;
    top: 65%;
    transform: translateY(-42%);
    z-index: 30;
}

.index-sidebar__inner {
    position: relative;
    display: flex;
    align-items: stretch;
}

.index-sidebar__social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.12rem 0.08rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    box-shadow: 0 0.04rem 0.16rem rgba(0, 0, 0, 0.14);
}

.index-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.33rem;
    height: 0.33rem;
    line-height: 0;
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.index-social-item img {
    width: 0.25rem;
    height: 0.25rem;
    object-fit: contain;
}

.index-social-item:hover,
.index-social-item:focus-visible,
.index-social-item.is-active {
    transform: scale(1.08);
    /* background: rgba(255, 240, 210, 0.85); */
}

.index-sidebar__qq {
    position: absolute;
    right: calc(100% + 0.1rem);
    top: 80%;
    /* transform: translateY(-50%); */
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    width: 1.52rem;
    padding: 0.08rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.08rem;
    box-shadow: 0 0.06rem 0.18rem rgba(0, 0, 0, 0.16);
}

.index-sidebar__qq[hidden] {
    display: none !important;
}

.index-qq-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0.36rem;
    padding: 0.06rem 0.36rem 0.06rem 0.08rem;
    border: none;
    border-radius: 0.04rem;
    background: linear-gradient(180deg, #2a5299 0%, #18356d 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.index-qq-btn__text {
    white-space: nowrap;
    font-size: 0.11rem;
    line-height: 1.2;
    color: #fff;
    text-align: center;
}

.index-qq-btn__badge {
    position: absolute;
    top: -0.05rem;
    right: -0.04rem;
    min-width: 0.28rem;
    padding: 0.02rem 0.04rem;
    border-radius: 0.03rem;
    font-size: 0.1rem;
    line-height: 1.2;
    color: #fff;
    text-align: center;
}

.index-qq-btn__badge--full,
.index-qq-btn__badge--hot {
    background: #e53935;
}

.index-qq-btn:hover,
.index-qq-btn:focus-visible {
    filter: brightness(1.08);
}

/* ---------- QR popup ---------- */

.index-qr-popup {
    position: fixed;
    right: 0.72rem;
    top: 60%;
    transform: translateY(-50%);
    z-index: 40;
    pointer-events: auto;
}

.index-qr-popup__panel {
    padding: 0.1rem;
    background: #fff;
    border-radius: 0.08rem;
    box-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.22);
    text-align: center;
}

.index-qr-popup__img {
    width: 1.4rem;
    height: 1.4rem;
    object-fit: contain;
    margin: 0 auto;
}

.index-qr-popup__label {
    margin: 0.06rem 0 0;
    font-size: 0.14rem;
    color: #333;
}

/* ---------- Mobile-only blocks (hidden on PC) ---------- */

.index-mobile-list,
.index-mobile-actions {
    display: none;
}

.index-mobile-card__text {
    display: none;
}

/* ---------- Mobile ---------- */

@media screen and (max-width: 768px) {
    body.index-body {
        font-size: 0.26rem;
        background: #e6e1d8;
    }

    .index-header {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0.16rem 0.2rem 0;
        display: none;
    }

    .index-logo {
        width: min(2rem, 42vw);
        margin-top: 0;
    }

    .index-slogan--pc {
        display: none;
    }

    .index-slogan--mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.02rem;
        margin-left: auto;
        margin-right: 0.08rem;
        pointer-events: none;
    }

    .index-slogan__line {
        font-size: 0.34rem;
        font-weight: 700;
        line-height: 1.15;
        color: #fff;
        text-shadow:
            0 0 0.12rem rgba(120, 190, 255, 0.85),
            0 0.02rem 0.08rem rgba(0, 40, 100, 0.45);
        white-space: nowrap;
    }

    .index-header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.08rem;
    }

    .index-invite-btn {
        display: none;
    }

    .index-action-btn {
        min-width: 1.35rem;
        height: 0.42rem;
        padding: 0 0.14rem 0 0.12rem;
    }

    .index-action-btn__text {
        font-size: 0.18rem;
    }

    .index-header-actions .index-action-btn--download,
    .index-header-actions .index-action-btn--site {
        display: none;
    }

    .index-hero {
        min-height: auto;
        background: url("../images/bg-top-mini-v1.jpg") no-repeat center top;
        background-size: 100% auto;
        background-color: #e6e1d8;
    }

    .index-stage {
        display: none;
    }

    .index-sidebar,
    .index-qr-popup {
        display: none !important;
    }

    .index-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 0.14rem;
        padding: 38vh 0.16rem 0.28rem;
        margin-top: 0;
    }

    .index-mobile-card {
        position: relative;
        display: block;
        overflow: hidden;
        border-radius: 0.04rem;
        transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
        box-shadow: 0 0.04rem 0.14rem rgba(0, 0, 0, 0.12);
    }

    .index-mobile-card__tag {
        width: 100%;
        height: auto;
    }

    .index-mobile-card__text {
        display: none;
    }

    .index-mobile-card:hover,
    .index-mobile-card:focus-visible,
    .index-mobile-card:active {
        transform: scale(1.015);
        filter: brightness(1.08);
        box-shadow: 0 0.06rem 0.2rem rgba(255, 130, 30, 0.35);
    }

    .index-mobile-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.2rem;
        padding: 0.28rem 0.2rem 0.48rem;
        background: #e6e1d8;
    }

    .index-action-btn--lg {
        min-width: 2.4rem;
        height: 0.56rem;
        padding: 0 0.24rem;
    }

    .index-action-btn--lg .index-action-btn__text {
        font-size: 0.22rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1200px) {
    .index-card__tag {
        width: 4rem;
    }

    .index-center {
        width: 6rem;
        max-width: 34vw;
    }

    .index-cards-column {
        max-width: 4.6rem;
    }

    .index-cards-column--left {
        margin-right: -0.28rem;
    }

    .index-cards-column--right {
        margin-left: -0.28rem;
    }

    .index-slogan--pc {
        width: 4rem;
        margin-top: 0.36rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 960px) {
    .index-stage {
        flex-wrap: wrap;
        align-content: center;
        padding-top: 1.5rem;
    }

    .index-cards-column {
        max-width: 100%;
        flex: 1 1 45%;
    }

    .index-center {
        order: -1;
        width: 100%;
        max-width: 5rem;
        margin-bottom: 0.2rem;
    }

    .index-card__tag {
        width: 3.2rem;
    }
}
