@font-face {
    font-family: "Ping";
    src: url("./PF频凡胡涂体.ttf");
}

:root {
    --canvas-w: 1440px;
    --canvas-h: 731px;
    --panel-count: 7;
    /* 画布等比缩放：宽或高任一超出上限就缩小；从不放大超过 1 */
    --scale: min(1, calc(100vw / var(--canvas-w)), calc(100vh / var(--canvas-h)));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Ping';
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* max-width: 1440px;
    max-height: 731px; */
    /* max-height: ; */
    background-color: #000;
}

html {
    overflow-x: hidden;
}

#viewport-stage {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#canvas-clip {
    /* 裁切窗口：只显示“一屏画布”（缩放后的1440x731），避免右侧露出下一屏 */
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--canvas-w) * var(--scale));
    height: calc(var(--canvas-h) * var(--scale));
    transform: translate(-50%, -50%);
    overflow: hidden;
}

/* 页脚备案信息：固定在浏览器视口底部，避免横向缩放/裁切影响定位 */
.record-footer {
    position: fixed;
    left: 0;
    bottom: 10px;
    width: 100%;
    z-index: 20000;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0.2px;
    pointer-events: none;
    padding: 0 12px;
}

@media (max-width: 480px) {
    .record-footer {
        bottom: 6px;
        font-size: 11px;
    }
}


/* 视频和背景图 */

.bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#bg-image {
    opacity: 0;
    /* 初始隐藏 */
    transition: opacity 1s ease;
}


/* 文字样式 */

.text-container {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 10px;
    padding-top: 12%;
}

.char {
    display: inline-block;
    font-size: 4rem;
    color: #884d4d;
    text-shadow: 0 0 20px rgba(15, 82, 149, 0.5);
    opacity: 0;
    /* 初始隐藏 */
}


/* 强制容器横向排布 */

.horizontal-scroll-wrapper {
    display: flex;
    width: calc(var(--panel-count) * var(--canvas-w));
    height: var(--canvas-h);
    overflow: hidden;
    /* 隐藏默认滚动条，由 JS 控制 */
    position: absolute;
    top: 0;
    left: 0;
    /* 仅做缩放，居中交给外层 #canvas-clip 完成 */
    transform: scale(var(--scale));
    transform-origin: top left;
}

.panel {
    width: var(--canvas-w);
    height: var(--canvas-h);
    flex-shrink: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}


/* 第一屏特殊布局 */

.intro-section {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.content-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 12%;
}


/* 解锁区域样式 */

.unlock-container {
    margin-top: 0px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.unlock-text {
    font-size: 1.2rem;
    color: #460909;
    letter-spacing: 2px;
    opacity: 0.8;
}

.unlock-arrow {
    width: 80px;
    /* 根据你图片大小调整 */
    height: auto;
    animation: nudge 2s infinite;
    transform: rotate(45deg);
}


/* 箭头左右晃动的微动画 */

@keyframes nudge {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(10px);
    }
}


/* 赋予各页面背景色方便区分 */

.page-2 {
    background: url('../images/section-bg.jpg') no-repeat center center;
    background-size: contain;
    position: relative;
    background-color: #fff;
}


/* 左上角标题 */

.page-title {
    position: absolute;
    top: 40px;
    left: 240px;
    color: black;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.page-title h2 {
    margin: 0;
    font-size: 1.8rem;
    /* background-color: #884d4d; */
    padding: 20px;
}

.page-title p {
    margin: 0px 0;
    font-size: 1rem;
    opacity: 0.8;
    /* background-color: #884d4d; */
}


/* 竖排名字标签 */

.char-name-item {
    position: absolute;
    writing-mode: vertical-rl;
    text-orientation: upright;
    background-color: #ffd900;
    border: 1px solid rgba(0, 0, 0, 0.5);
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    /* 核心设置：初始高度为 0，隐藏溢出内容 */
    height: 0;
    width: 40px;
    padding: 0 4px;
    /* 初始时上下 padding 也要为 0，否则会有色块 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    padding: 10px;
}

.char-name-item:hover {
    background-color: #1a0e0e;
    color: #fff;
    /* 悬停变白增加交互感 */
}

.page-3 {
    background-color: #fff;
}


/* style.css 追加 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    /* 磨砂效果 */
    display: none;
    /* 初始隐藏 */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    /* 必须有白色或其他背景 */
    padding: 20px;
    border-radius: 15px;
    position: relative;
    /* 让里面的叉叉能绝对定位 */
    z-index: 10001;
    width: 80%;
    max-width: 500px;
}

#modal-char-img {
    width: 100%;
    /* 图片撑开容器 */
    display: block;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10002;
    cursor: pointer;
    /* 确保叉叉够大够显眼 */
    font-size: 2rem;
    color: #333;
}

.close-btn:hover {
    color: #ff4757;
}

.modal-body img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.page-3 {
    position: relative;
    overflow: hidden;
    background: url(../images/1.png) no-repeat;
    background-size: cover;
    background-position: center;
    border: 5px solid rgb(0, 0, 0);
}


/* 视频全屏背景 */

.p3-media {
    position: absolute;
    top: 138px;
    left: 332px;
    width: 46%;
    height: 65%;
    object-fit: cover;
    z-index: 1;
}

.mybg-background {
    position: absolute;
    top: 59px;
    left: 195px;
    width: 74%;
    height: 83%;
    object-fit: cover;
    z-index: 2;
    background-image: url(../images/mybackground.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/* 右侧开关拉绳样式 */

.switch-wrapper {
    position: absolute;
    top: -30px;
    right: 50px;
    /* 距离右侧距离 */
    z-index: 100;
    cursor: pointer;
    /* transition: transform 0.1s; */
    /* animation: pull 1s; */
}

.switch-img {
    height: 300px;
    /* 设定一个较长的高度 */
    width: auto;
    display: block;
    transform-origin: 50% 30px;
    animation: swipe 2s infinite ease-in-out;
}

.switch-img:hover {
    animation-play-state: paused;
}

@keyframes swipe {
    0% {
        transform: rotate(-6deg);
    }

    50% {
        transform: rotate(6deg);
    }

    100% {
        transform: rotate(-6deg);
    }
}


/* 拉动时的位移效果 */

@keyframes pull {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

.p3-content {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    /* 让文字不遮挡点击事件 */
    left: 15%;
}

#p3-title {
    color: #000000;
    /* 关键属性：垂直排版，文字从右向左排列（传统竖排） */
    writing-mode: vertical-rl;
    /* 可选：如果需要文字从左向右竖排，用这个 */
    /* writing-mode: vertical-lr; */
    /* 可选样式：让排版更美观 */
    font-size: 26px;
    line-height: 1.8;
    /* 调整行间距，避免文字太挤 */
    letter-spacing: 2px;
    /* 调整字间距 */
}

.page-4 {
    background: url(../images/ba.png) center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #FFF866;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    border: 5px solid rgb(0, 0, 0);
}

.page-4 #welcome_write {
    color: #000000;
    position: absolute;
    left: 20%;
    top: 31%;
    transform: rotate(-12deg);
    font-size: 22px;
}

.page-4 #user_write {
    color: #000000;
    position: absolute;
    left: 21%;
    top: 33%;
    transform: rotate(-12deg);
    font-size: 28px;
    line-height: 42px;
    /* background: #ff4757; */
    width: 21%;
    height: 46%;
    outline: none;
}


/* style.css 追加 */


/* 隐藏所有浏览器自带的视频控件 */

video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}

video::-webkit-media-controls-panel {
    display: none !important;
}

video::-webkit-media-controls-play-button {
    display: none !important;
}

video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.my-imges-pic {
    height: 80%;
    width: auto;
    z-index: 1;
}

.my-title {
    font-size: 1.5rem;
    position: absolute;
    right: 25%;
    top: 40%;
    color: #000000;
    /* 关键属性：垂直排版，文字从右向左排列（传统竖排） */
    writing-mode: vertical-rl;
    /* 可选：如果需要文字从左向右竖排，用这个 */
    /* writing-mode: vertical-lr; */
    /* 可选样式：让排版更美观 */
    /* font-size: 26px; */
    line-height: 1.8;
    /* 调整行间距，避免文字太挤 */
    letter-spacing: 2px;
    /* 调整字间距 */
    background-color: #FCF790;
    padding: 10px;
    border-radius: 10px;
}

.page-5 {
    background: url(../images/section-3.png) no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    position: relative;
}


/* .mysection-arrow-1 {
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 180px;
    height: auto;
    cursor: pointer;
}

.mysection-arrow-2 {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: auto;
    cursor: pointer;
} */


/* Page 5 容器布局 */

.page-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: url(../images/section-3.png) no-repeat;
    background-size: cover;
    background-position: center;
    border: 5px solid rgb(0, 0, 0);
}

.carousel-container {
    position: relative;
    width: 600px;
    /* 根据你的图片宽度调整 */
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item {
    position: absolute;
    width: 300px;
    height: 300px;
    transition: all 0.5s ease;
    /* 让切换变丝滑 */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 定义五个状态的样式 (虽然你有4张图，但页面显示3张，逻辑上需要位置分配) */


/* 中间的大图 */

.active {
    z-index: 10;
    transform: scale(1.2);
    opacity: 1;
}


/* 左侧图片 */

.prev-item {
    transform: translateX(-150px) scale(0.8);
    z-index: 5;
    opacity: 0.6;
}


/* 右侧图片 */

.next-item {
    transform: translateX(150px) scale(0.8);
    z-index: 5;
    opacity: 0.6;
}


/* 隐藏的图片（第4张） */

.hidden-item {
    transform: scale(0.5);
    opacity: 0;
    z-index: 1;
}


/* 箭头定位（确保你的箭头在最上层） */

.mysection-arrow-1,
.mysection-arrow-2 {
    position: absolute;
    z-index: 100;
    cursor: pointer;
    width: 180px;
    height: auto;
    /* 调整箭头大小 */
}

.mysection-arrow-1 {
    left: 20%;
}

.mysection-arrow-2 {
    right: 15%;
}

.page-6 {
    background: url(../images/image.png) no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Page 6 整体布局调整 */

.page-6 {
    flex-direction: column;
    /* 让标题和视频区域上下排列 */
    justify-content: center;
    align-items: center;
    border: 5px solid rgb(0, 0, 0);
}

.p6-main-title {
    margin-bottom: 20px;
    z-index: 10;
    color: #000000;
    font-size: 50px;
    background-color: #fcf790b9;
    padding: 20px;
}


/* 四个视频的网格容器 */


/* 修改网格容器：让它们排成一行 */

.video-grid-container {
    display: flex;
    /* 改用 flex 布局，方便控制单个位置 */
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直方向基础对齐 */
    gap: 10px;
    /* 视频之间的间距 */
    width: 100%;
    height: 500px;
    /* 给容器一个固定高度，方便看出一高一低 */
}


/* 调整单个视频单元的基础大小 */

.video-item {
    position: relative;
    width: 350px;
    /* 固定的宽度 */
    aspect-ratio: 16 / 9;
    /* 保持比例 */
    z-index: 1;
    transition: transform 0.3s ease;
    /* 增加一个平滑过渡效果 */
}


/* 视频的基础样式 */

.item-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 70%;
    transform: translate(-50%, -40%);
    object-fit: cover;
    /* 铺满容器 */
    z-index: 1;
    /* 视频层级在下 */
}


/* 覆盖在视频上的边框层 */

.video-overlay-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* 层级高于视频 */
    pointer-events: none;
    /* 让鼠标点击能穿透边框点到视频（如果需要的话） */
    background-size: 100% 100%;
    /* 确保背景图完美覆盖 */
    background-repeat: no-repeat;
}


/* 分别设置四个不同的边框图片 */

.frame-1 {
    background-image: url('../images/border1.png');
}

.frame-2 {
    background-image: url('../images/border2.png');
}

.frame-3 {
    background-image: url('../images/border3.png');
}

.frame-4 {
    background-image: url('../images/border4.png');
}


/* 第 1 和 第 3 个：向上移动（高） */

.video-item:nth-child(1) {
    transform: translateY(-40px);
}

.video-item:nth-child(3) {
    transform: translateY(-120px);
}


/* 第 2 和 第 4 个：向下移动（矮） */

.video-item:nth-child(2) {
    transform: translateY(40px);
}

.video-item:nth-child(4) {
    transform: translateY(0px);
}


/* 如果你还想要“一大一小”的效果，可以加上这个 */

.video-item:nth-child(odd) {
    width: 392px;
    /* 奇数个稍微大一点 */
}

.video-item:nth-child(even) {
    width: 300px;
    /* 偶数个稍微小一点 */
}

.page-7 {
    background: url(../images/gou.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 5px solid rgb(0, 0, 0);
}

.page-7-title {
    color: #000000;
    font-size: 50px;
    background-color: #fcf790b9;
    padding: 20px;
    margin-bottom: 20px;
}


/* 导航箭头基础样式 */

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    /* 箭头大小，可根据你的图片调整 */
    height: auto;
    cursor: pointer;
    z-index: 9999;
    /* 确保在最前面 */
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}

.nav-arrow:hover {
    opacity: 1;
}


/* 左箭头：靠左，翻转 180 度 */

.left-nav {
    left: 30px;
    transform: translateY(-50%) rotate(180deg);
}

.left-nav:hover {
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}


/* 右箭头：靠右 */

.right-nav {
    right: 30px;
}

.right-nav:hover {
    transform: translateY(-50%) scale(1.1);
}