/* ======================================================
   基础样式
   ====================================================== */
section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.section-1 {
    background: #fcfafb;
}

/* ======================================================
   视频区域
   ====================================================== */
.section-2 {
    width: 100%;
    margin: 0;
    padding: 0;
}

.video-container {
    width: 100%;
}

/* 电脑 ≥1200px：100vh 全屏 */
@media (min-width: 1200px) {
    .video-container {
        height: 100vh;
    }

    .video-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* 手机/平板 ≤1199px：16:9 比例 */
@media (max-width: 1199px) {
    .section-2 {
        height: auto;
    }

    .video-container {
        position: relative;
        width: 100%;
        height: 0;
        padding-top: 56.25%;
    }

    .video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ======================================================
   Card 区域 - 通用
   ====================================================== */
.card-wrapper {
    height: 400vh;
    background: #f5f6f8;
    position: relative;
}

.card-pin {
    height: 100vh;
    position: sticky;
    top: 0;
}

.card-viewport {
    height: 100vh;
    position: relative;
}

.card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    /* GPU 加速 */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-1 {
    z-index: 1;
}

.card-2 {
    z-index: 2;
}

.card-3 {
    z-index: 3;
}

.card-inner {
    width: min(96%, 1200px);
    height: 75vh;
    max-height: 700px;
    color: #131924;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.card-inner .card-tab {
    height: 92px;
    line-height: 50px;
    width: 33%;
    color: #131924;
    text-align: center;
    border-radius: 24px;
    position: absolute;
    top: 0;
    font-weight: 600;
    font-size: 24px;
}

.card-1 .card-inner .card-tab {
    background: #ffdf00;
    left: 0;
}

.card-2 .card-inner .card-tab {
    width: 34%;
    background: #ff945d;
    left: 33%;
}

.card-3 .card-inner .card-tab {
    background: #a57dff;
    right: 0;
}

.card-info {
    width: 100%;
    height: calc(100% - 50px);
    border-radius: 24px;
    position: absolute;
    bottom: 0;
    left: 0;
    overflow: hidden;
}

.card-info h2 {
    font-size: 110px;
    margin: 68px 0 15px;
    text-align: center;
    height: 110px;
    line-height: 110px;
}

.card-info p {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: center;
}

.card-inner .card-info>* {
    position: relative;
    z-index: 1;
}

.card-inner .card-info::before {
    content: '';
    position: absolute;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.card-1 .card-inner .card-info {
    background: #ffdf00;
}

.card-1 .card-inner .card-info::before {
    opacity: 0.3;
    background: url("/template/pc/skin/images/cardbg1.svg") no-repeat center center;
    background-size: 100% 100%;
}

.card-2 .card-inner .card-info {
    background: #ff945d;
}

.card-2 .card-inner .card-info::before {
    opacity: 0.15;
    /* transform: rotate(-8deg); */
    background: url("/template/pc/skin/images/cardbg2.svg") no-repeat center center;
    background-size: 100% 100%;
}

.card-3 .card-inner .card-info {
    background: #a57dff;
}

.card-3 .card-inner .card-info::before {
    opacity: 0.15;
    background: url("/template/pc/skin/images/cardbg3.svg") no-repeat center center;
    background-size: 100% 100%;
}

/* ======================================================
   Card 2 - 图片组
   ====================================================== */
.image-group {
    display: flex;
    width: 90%;
    gap: 16px;
    margin: 60px auto 0 auto;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.image-item {
    width: 360px;
    height: 290px;
    flex-shrink: 0;
}

.image-item>div {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-item:nth-child(odd)>div {
    transform: rotate(8deg);
}

.image-item:nth-child(even)>div {
    transform: rotate(-4deg);
}

/* 
.image-item img:hover {
    transform: scale(1.05);
} */

/* ======================================================
   Card 3 - 图片组2（正方形）
   ====================================================== */
.image-group2 {
    display: flex;
    width: 90%;
    gap: 16px;
    margin: 60px auto 0 auto;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.image-item2 {
    width: 256px;
    height: 256px;
    flex-shrink: 0;
}

.image-item2 div {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.image-item2 div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-item2:nth-child(odd) div {
    transform: rotate(-10deg);
}

.image-item2:nth-child(even) div {
    transform: rotate(7deg);
}

/* .image-item2 div img:hover {
    transform: scale(1.05);
} */

@media (min-width: 1201px) {
    .image-item img:hover {
        transform: scale(1.05);
    }

    .image-item2 div img:hover {
        transform: scale(1.05);
    }
}

/* 图片touch禁止 */
.image-item,
.image-item2 {
    pointer-events: none;
    touch-action: manipulation;
}

.image-item>div,
.image-item2>div {
    pointer-events: none;
}

.image-item img,
.image-item2 img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* ======================================================
   Frame 区域
   ====================================================== */
.frame-wrapper {
    background: var(--bg, #8542ff);
    position: relative;
}

.frame-pin {
    height: 100vh;
    position: sticky;
    top: 0;
}

.frame-viewport {
    height: 100vh;
    position: relative;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1920px;
    overflow: hidden;
}

.frame-viewport::before {
    content: '';
    position: absolute;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
    width: 300%;
    height: 300%;
    top: -113%;
    left: -112%;
    background: url("/template/pc/skin/images/fng-bg.svg") no-repeat center center;
}

.film-mode .frame-viewport::before {
    opacity: 0.3;
}

.frame-wrapper.film-mode .main-title {
    color: #fff;
}

.frame-wrapper.film-mode .main-title .tag:first-child {
    color: #fff;
}

.frame-content {
    width: 40%;
    text-align: center;
}

.frame-disc {
    display: none;
}

.frame-disc.is-active {
    display: block;
}

.frame-disc h2 {
    font-size: 150px;
    padding: 0;
    margin: 0;
    font-weight: 600;
    height: 150px;
    line-height: 150px;
    margin: 24px 0 10px 0;
    letter-spacing: -0.04em;
}

.frame-disc p {
    font-size: 40px;
    padding: 0;
    margin: 0 0 24px;
    font-weight: 600;
}

/* ======================================================
   MediaVideo
   ====================================================== */
.mediaVideo {
    position: absolute;
    width: auto;
    height: 90%;
    aspect-ratio: 16 / 9;
    margin: 0;
    z-index: 1;
    padding: 8px;
    left: 40%;
    top: 50%;
    transform: translateY(-50%);
    max-height: 90%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    box-sizing: content-box;
}

.mediaVideo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("/template/pc/skin/images/tvborder.webp") no-repeat center center;
    background-size: 100% 100%;
    z-index: -1;
}

.mediaVideo video,
.mediaVideo img {
    width: 100%;
}

#gamevideo {
    display: none;
}

.film-mode .frame-viewport .frame-content .mediaVideo #filmvideo {
    display: block;
}

.film-mode .frame-viewport .frame-content .mediaVideo #gamevideo {
    display: none;
}

.game-mode .frame-viewport .frame-content .mediaVideo #gamevideo {
    display: block;
}

.game-mode .frame-viewport .frame-content .mediaVideo #filmvideo {
    display: none;
}

/* ======================================================
   主标题 / Tags
   ====================================================== */
.main-title {
    display: flex;
    justify-content: center;
    font-size: 24px;
    align-items: center;
    color: #131924;
    font-weight: 600;
    gap: 10px;
}

.tag,
.main-title span:last-child {
    position: relative;
    background: transparent;
}

.main-title span,
.main-title .tag-text {
    height: 32px;
    line-height: 32px;
    display: inline-block;
}

.main-title .active {
    padding: 0 11px;
}

.tag-bg {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    z-index: 0;
    transform: scale(1);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.4s ease;
}

.tag-text {
    position: relative;
    z-index: 1;
}

.film-mode .main-title .tag.active .tag-bg {
    background: #ffdf00;
}

.game-mode .main-title .tag.active .tag-bg {
    background: #9767ff;
}

.film-mode .main-title .tag.active .tag-text {
    color: #131924;
}

.game-mode .main-title .tag.active .tag-text {
    color: #fff;
}

.film-mode .frame-discs {
    color: #fff;
}

.game-mode .frame-discs {
    color: #131924;
}

/* ======================================================
   图片序列
   ====================================================== */
.image-sequence {
    position: relative;
    width: 440px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
}

.frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
}

.frame.active {
    opacity: 1;
}

/* ======================================================
   Overlay
   ====================================================== */
.overlay-wrapper {
    position: relative;
    top: auto;
    margin-top: 0;
}

.overlay-viewport {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    width: 100%;
    will-change: transform;
}

.overlay-white {
    background-color: #f7f8fa;
}

/* ======================================================
   响应式 - 统一管理
   ====================================================== */

/* ---------- 超大屏 ---------- */
@media (min-width: 1921px) {
    .frame-viewport {
        max-width: 100%;
    }

    .mediaVideo video,
    .mediaVideo img {
        width: 100%;
    }
}

/* ---------- 1499px 及以下 ---------- */
@media (max-width: 1499px) {
    .frame-disc h2 {
        font-size: 120px;
        height: 120px;
        line-height: 120px;
    }

    .main-title span,
    .main-title .tag-text {
        height: 33px;
        line-height: 36px;
        display: inline-block;
    }
}

/* ---------- 1199px 及以下（平板/手机） ---------- */
@media (max-width: 1199px) {
    .card-inner .card-tab {
        font-size: 16px;
    }

    .card-info h2 {
        font-size: 58px;
        height: 58px;
        line-height: 58px;
        margin: 68px 0 15px;
    }

    .card-info p {
        font-size: 16px;
    }

    .game-carousel-box {
        margin: 0 auto;
    }

    .game-wheel {
        top: 0;
    }

    .frame-content {
        width: 100%;
        height: 100vh;
        display: flex;
        padding-top: 80px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .frame-viewport {
        flex-direction: column;
        align-items: center;
    }

    .main-title {
        gap: 5px;
    }

    .main-title span,
    .main-title .tag-text {
        height: 24px;
        line-height: 25px;
    }

    .main-title .active {
        padding: 0px 7px;
    }

    .image-item {
        width: 220px;
        height: 260px;
    }

    .image-item2 {
        width: 222px;
        height: 222px;
    }
}

/* ---------- 810px - 1199px（iPad 竖屏/小平板） ---------- */
@media (min-width: 810px) and (max-width: 1199px) {

    .image-item {
        width: 220px;
        height: 260px;
    }

    .image-item2 {
        width: 222px;
        height: 222px;
    }

    .image-group2 {
        gap: 0 !important;
    }

    .image-item2 {
        margin: 0 -22px;
    }

    .main-title {
        font-size: 16px;
    }

    .frame-disc h2 {
        font-size: 100px;
        height: 100px;
        line-height: 100px;
    }

    .frame-disc p {
        font-size: 16px;
    }

    .image-sequence {
        width: 450px;
    }

    .mediaVideo {
        position: static;
        width: 656px;
        margin: 0 auto;
        transform: translateY(0%);
        padding: 5px;
        height: auto;
    }
}

/* ---------- 809px 及以下（手机） ---------- */
@media (max-width: 809px) {
    .card-inner .card-tab {
        font-size: 14px;
    }

    .card-info h2 {
        font-size: 26px;
        height: 26px;
        line-height: 26px;
        margin: 32px 0 10px;
    }

    .card-info p {
        font-size: 12px;
        font-weight: 500;
    }

    .game-carousel-box {
        margin: -20px auto 0 auto !important;
    }

    .game-wheel {
        top: 0;
    }

    .image-group {
        display: block;
        width: 180px;
        margin: 0 auto 0;
    }

    .image-item {
        width: 180px;
        height: 140px;
    }

    .image-item div {
        transform: rotate(7deg) !important;
    }

    .image-item:first-child div {
        transform: rotate(-7deg) !important;
        top: 18px;
        left: -50px;
    }

    .image-item:nth-child(2) div {
        top: -18px;
        left: 50px;
    }

    .image-item:nth-child(3) div {
        top: -45px;
        left: -40px;
    }

    .image-item2 {
        width: 170px;
        height: 170px;
        flex-shrink: 0;
        margin: 0 -10px;
    }

    .image-group2 {
        display: grid !important;
        grid-template-columns: repeat(2, auto) !important;
        justify-content: center !important;
        gap: 9px !important;
        width: 100% !important;
        padding: 0 10px;
        margin: 36px auto 0 auto;
    }

    .main-title {
        font-size: 14px;
    }

    .frame-disc h2 {
        font-size: 68px;
        height: 68px;
        line-height: 68px;
    }

    .frame-disc p {
        font-size: 15px;
    }

    .image-sequence {
        width: 330px;
    }

    .mediaVideo {
        position: static;
        width: 356px;
        margin: 0 auto;
        transform: translateY(0%);
        padding: 3px;
        height: auto;
    }

    .main-title span,
    .main-title .tag-text {
        height: 22px;
        line-height: 23px;
    }

    .main-title .active {
        padding: 0px 9px;
    }
}

/* ---------- 768px 竖屏（iPad mini 竖屏专用） ---------- */
@media only screen and (max-width: 768px) and (orientation: portrait) {
    .card-inner {
        height: 60vh;
        min-height: 560px;
        max-height: 560px;
    }
}

@media only screen and (max-width: 1600px) and (min-aspect-ratio: 1/1) and (max-height: 900px) {
    .card-info h2 {
        font-size: 90px;
        height: 90px;
        line-height: 90px;
        margin: 50px 0 15px;
    }

    .image-item {
        width: 220px;
        height: 260px;
    }

    .image-item2 {
        width: 222px;
        height: 222px;
    }
}

@media only screen and (max-width: 1023px) and (min-aspect-ratio: 1/1) and (max-height: 500px) {
    .card-inner {
        height: 90vh;
    }

    .card-info h2 {
        font-size: 32px;
        height: 32px;
        line-height: 32px;
        margin: 20px 0 10px;
    }

    .image-item {
        width: 180px;
        height: 160px;
    }

    .image-item2 {
        width: 160px;
        height: 160px;
    }

    .game-wheel {
        top: -70px;
    }

    .mediaVideo {
        position: absolute;
        width: auto;
        height: 90%;
        margin: 0;
        z-index: 1;
        padding: 8px;
        transform: translateY(-50%);
    }

    .frame-viewport {
        align-items: flex-start;
    }

    .frame-content {
        width: 40%;
        text-align: center;
    }

    .frame-disc h2 {
        font-size: 5vw;
        height: 5vw;
        line-height: 5vw;
        margin: 10px 0 5px 0;
    }

    .image-sequence {
        width: 80%;
    }
}