/* 基础重置与全屏设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, Helvetica, sans-serif;
    background-color: #000;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* 页面背景图 */
.page1 { background-image: url('../images/index/smbackground.png'); }
.page2 { background-image: url('../images/tpage/smbackground2.png'); }
.page3 { background-image: url('../images/spage/smbackground3.png'); }
.page4 { background-image: url('../images/fpage/smbackground4.png'); }
.page5 { background-image: url('../images/fipage/smbackground5.png'); }
.page6 { background-image: url('../images/fipage/smbackground5.png'); }

/* 公共元素 */
.logo {
    position: absolute;
    top: 5%;
    width: 55%; /* 增加 LOGO 宽度比例 */
    max-width: 200px; /* 增加最大宽度限制 */
    z-index: 10;
    opacity: 0; /* 初始透明，动画展示 */
}

.arrow {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    width: 10%;
    max-width: 40px;
    z-index: 10;
    animation: bounce 1.5s infinite;
}

/* 主视觉区域统一定位 */
.main-visual {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* 各页面特定元素样式 */
/* Page 1 */
.yaoqing {
    width: 65%;
    max-width: 320px;
    margin-bottom: 20px;
    opacity: 0;
}
.text {
    width: 70%;
    max-width: 350px;
    opacity: 0;
}

/* Page 2 */
.text2 {
    width: 80%;
    max-width: 400px;
    margin-top: 20%;
    opacity: 0;
}

/* Page 3 */
.text3 {
    width: 80%;
    max-width: 400px;
    margin-top: 20%;
    opacity: 0;
}

/* Page 4 */
.text4 {
    width: 80%;
    max-width: 400px;
    margin-top: 30%;
    opacity: 0;
}

/* Page 5 */
.liucheng-wrapper {
    position: relative;
    width: 75%; /* 缩小宽度 */
    max-width: 380px; /* 缩小最大宽度 */
    margin-top: 15%;
    padding: 15px;
    opacity: 0;
}
.semi-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    z-index: 1;
}
.liucheng {
    position: relative;
    width: 100%;
    z-index: 2;
}

/* Page 6 */
.page6 .main-visual {
    justify-content: flex-start;
    padding-top: 35%; /* 增加顶部边距，避开LOGO */
}
.date-img {
    width: 70%;
    max-width: 350px;
    z-index: 6;
    opacity: 0;
    margin-bottom: 20px;
}
.map {
    width: 85%;
    max-width: 450px;
    opacity: 0;
}
.didian-wrapper {
    position: absolute;
    bottom: 12%;
    width: 80%;
    max-width: 400px;
    z-index: 5;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}
.semi-bg-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    z-index: 1;
}
.didian {
    position: relative;
    width: 100%;
    z-index: 2;
}


/* 动画定义 */
/* 箭头跳动 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -15px); }
    60% { transform: translate(-50%, -7px); }
}

/* 飞入与渐隐效果 */
.ani {
    animation-fill-mode: both !important;
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* 激活状态添加动画类 - 改为通过 .show 类控制，避免 Swiper 内部机制冲突 */
.ani.show[data-ani="fade-in-down"] {
    animation: fadeInDown 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.ani.show[data-ani="zoom-in"] {
    animation: zoomIn 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.ani.show[data-ani="fly-in-bottom-left"] {
    animation: flyInBottomLeft 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.ani.show[data-ani="fly-in-right"] {
    animation: flyInRight 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.ani.show[data-ani="fly-in-left"] {
    animation: flyInLeft 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.ani.show[data-ani="fly-in-up"] {
    animation: flyInUp 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.ani.show[data-ani="fade-in"] {
    animation: fadeIn 1.8s ease-out forwards;
}
.ani.show[data-ani="fade-in-up"] {
    animation: fadeInUp 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Keyframes */
@keyframes fadeInDown {
    from { opacity: 0; transform: translate3d(0, -50px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale3d(0.3, 0.3, 1); }
    to { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes flyInBottomLeft {
    from { opacity: 0; transform: translate3d(-100%, 100%, 0) rotate(-10deg) scale3d(0.8, 0.8, 1); }
    to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale3d(1, 1, 1); }
}

@keyframes flyInRight {
    from { opacity: 0; transform: translate3d(150%, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes flyInLeft {
    from { opacity: 0; transform: translate3d(-150%, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes flyInUp {
    from { opacity: 0; transform: translate3d(0, 200%, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 80px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
