* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover,
a:visited,
a:active {
    text-decoration: none;
    color: inherit;
}


/* 加载界面样式 */
.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #E6A23C, #C0392B);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: opacity 1s ease-out;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    max-width: 300px;
}

.loading-animation {
    /* width: 50px; */
    /* height: 50px; */
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
    /* border-radius: 5px; */
    overflow: hidden;
    flex-direction: column;
    align-items: center;
}

#loadingTitle {
    text-align: center;
    font-size: 22px;
    margin-top: 10px;
    color: #fff6da;
    font-weight: bold;
}

.loading-animation img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 5px;
}

.loading-progress-container {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #FFF3CD, #FFC107);
    transition: width 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}
.loading-percentage {
    font-size: 16px;
    /* font-weight: bold; */
    color: white;
}

/* 音乐控制图标样式 */
.music-control {
    position: fixed;
    top: 1.5%;
    right: 15px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 200;
}

.music-control img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 播放状态图标旋转动画 */
@keyframes rotateAntiClockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

.music-rotating {
    animation: rotateAntiClockwise 6s linear infinite;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 加载完成后隐藏加载界面的类 */
.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: fixed;
}

.container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    position: relative;
    background-color: #000;
    margin: 0 auto;
    overflow: hidden;
}

#homePage {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#mapContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    z-index: 100;
    will-change: transform;
}

.con_top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20%;
    max-height: 230px;
    background-image: url('../img/con_top_1.png');
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 110;
    display: none;
    will-change: transform;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    contain: paint;
}

.con_top img:nth-child(1) {
    position: absolute;
    top: 9%;
    width: 60%;
    height: auto;
    margin-bottom: 10px;
}

.con_top img:nth-child(2) {
    position: absolute;
    top: 34%;
    width: 50%;
    /* height: 50px; */
    margin: 0;
}

#mapContainer.show + .con_top,
.con_top.show {
    display: flex;
}

.title-part {
    width: 80%;
    max-width: 300px;
    margin-bottom: 10px;
    z-index: 111;
}

.title-main {
    width: 90%;
    max-width: 350px;
    z-index: 111;
}

.back-button {
    width: 54px;
    height: 54px;
    position: absolute;
    bottom: 254px;
    right: 14px;
    z-index: 120;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(202, 121, 40, 0.6);
    color: #ca7928;
    padding: 8px 14px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.back-button:hover {
    background: rgba(255, 255, 255, 0.85);
}
.back-button:active {
    transform: translateY(1px);
}

.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    animation: fadeIn 2s ease-out forwards;
}

.slide:nth-child(1) { animation-delay: 0s; animation-fill-mode: forwards; }
.slide:nth-child(2) { animation-delay: 2s; animation-fill-mode: forwards; }
.slide:nth-child(3) { animation-delay: 4s; animation-fill-mode: forwards; }
.slide:nth-child(4) { animation-delay: 6s; animation-fill-mode: forwards; }
.slide:nth-child(5) { animation-delay: 8s; animation-fill-mode: forwards; }
.slide:nth-child(6) { animation-delay: 10s; animation-fill-mode: forwards; }

@keyframes fadeIn {
    0% { 
        opacity: 0;
        visibility: hidden;
    }
    100% { 
        opacity: 1;
        visibility: visible;
    }
}

.slide:nth-child(1) { z-index: 1; }
.slide:nth-child(2) { z-index: 2; }
.slide:nth-child(3) { z-index: 3; }
.slide:nth-child(4) { z-index: 4; }
.slide:nth-child(5) { z-index: 5; }
.slide:nth-child(6) { z-index: 6; }

.slide:nth-child(1).fade-in { opacity: 1; }
.slide:nth-child(2).fade-in { opacity: 0.9; }
.slide:nth-child(3).fade-in { opacity: 0.8; }
.slide:nth-child(4).fade-in { opacity: 0.7; }
.slide:nth-child(5).fade-in { opacity: 0.6; }
.slide:nth-child(6).fade-in { opacity: 0.5; }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.title-container {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 500px;
}

.title-container img:nth-child(1) {
    width: 100%;
    height: auto;
}

.title-container img:nth-child(2) {
    width: 100%;
    height: auto;
}

.title-container img:nth-child(3) {
    width: 74%;
    height: auto;
}
@media screen and (max-height: 830px) {
    .title-container img:nth-child(3) {
        display: none;
    }
}

.title-part {
    width: 100%;
    height: auto;
}

.title-main {
    width: 90%;
    height: auto;
    margin: 30% 0 8% 0;
}

.logo-container {
    position: absolute;
    bottom: 5%;
    left: 25%;
    z-index: 20;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo {
    width: 100%;
    max-width: 240px;
    display: block;
}

.language-buttons {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 20;
}

.language-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.language-label {
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.language-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.language-btn.active,
.language-btn:hover {
    opacity: 1;
}

.language-btn img {
    width: 80%;
    min-width: 150px;
    height: auto;
}

@media screen and (orientation: portrait) {
    .container {
        width: 100vw;
        height: 100vh;
    }
    
    .title-container {
        top: 5%;
    }
}

/* 底部背景容器样式 */
.con_bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    /* min-height: 250px; */
    z-index: 110;
    display: none;
    flex-direction: column;
    /* background: linear-gradient(to bottom, rgb(255 255 255 / 28%) 0%, rgba(255, 255, 255, 1) 26%); */
    will-change: transform;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    contain: paint;
}

.con_bottom_img {
    width: 68%;
    height: auto;
    display: block;
}

.con_bottom_con {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 10px 27px 20px 27px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(to bottom, rgb(255 255 255 / 61%) 0%, rgba(255, 255, 255, 1) 24%);
    justify-content: flex-start;
}

.con_bottom_con h1 {
    font-family: 黑体;
    min-height: 44px;
    color: #ca7928;
    /* font-size: 19px; */
    /* margin-bottom: 8px; */
    text-shadow: 2px 2px 4px rgb(220 123 141 / 37%);
    order: 1;
    z-index: 10;
    /* max-width: 80%; */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: flex;
    align-items: center;
}

.con_bottom_text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0 auto;
    order: 2;
    background-image: url('../img/con_con.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px 36px 15px 36px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    width: 100%;
    height: 130px;
    /* max-height: 133px; */
    /* min-height: 126px; */
}

.con_bottom_text p {
    font-size: 14px;
    /* text-indent: 2em; */
    line-height: 25px;
    text-align: left;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* --- Modal overlay & modal --- */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    width: 100%;
}
.modal-overlay.show { display: flex; }

.modal {
    position: relative;
    width: 90%;
    height: 90vh;
    /* background: #fff; */
    border-radius: 8px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); */
    overflow: hidden;
}
.modal-iframe {
    width: 100%;
    height: 92%;
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.modal-close {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #333;
    background: #ffffffbf;
    color: #333;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
/* --- end modal --- */
.language-btn {
    -webkit-tap-highlight-color: transparent;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .slide {
        background-size: 100% 100%;
    }
}
/* --- breathing indicator --- */
.breathing-indicator {
    position: absolute;
    right: 12px;
    bottom: 2px;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 20;
}
.breathing-indicator .outer {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 23px;
    height: 23px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 1.8s ease-out infinite;
    opacity: 0.85;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.55);
}
.breathing-indicator .inner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-dot 1.8s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 59, 48, 0.65);
}
/* click.png 顶边中点与指示器中心对齐 */
.breathing-indicator .click-tip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 0);
    width: 37px;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    z-index: 21;
    will-change: transform;
    animation: tip-bounce 2s infinite both;
}
@keyframes tip-bounce {
    0% {
        transform: translate(-50%, 30%);
        animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
    }
    50% {
        transform: translate(-50%, 0);
        animation-timing-function: linear;
    }
    100% {
        transform: translate(-50%, 30%);
    }
}
@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.95; }
    70% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; }
}
@keyframes pulse-dot {
    0%, 100% { transform: translate(-50%, -50%) scale(1.0); }
    50% { transform: translate(-50%, -50%) scale(0.85); }
}
/* --- end breathing indicator --- */