* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    /* 适配全屏模式 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 适配刘海屏和底部安全区域 */
body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    height: 100vh;
    width: 100vw;
}

/* 全屏模式下的样式调整 */
:-webkit-full-screen {
    width: 100% !important;
    height: 100% !important;
}

:-moz-full-screen {
    width: 100% !important;
    height: 100% !important;
}

:-ms-fullscreen {
    width: 100% !important;
    height: 100% !important;
}

:fullscreen {
    width: 100% !important;
    height: 100% !important;
}

/* 加载中提示样式 */
.loading-tip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

/* 竖屏提示样式 */
.portrait-tip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.portrait-content {
    text-align: center;
}

.portrait-content h1 {
    font-size: 24px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
    margin-bottom: 20px;
}

/* 强行体验按钮样式 */
.force-experience-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.force-experience-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.force-experience-btn:active {
    background-color: #3e8e41;
    transform: scale(0.95);
}

/* 旋转样式 */
.rotate-90 {
    transform: rotate(90deg) translateY(-100%);
    transform-origin: bottom left;
    width: 100vh;
    height: 100vw;
}

/* 旋转状态下的主页面容器 */
.main-page.rotate-90 {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 主页面样式 */
.main-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    transition: opacity 0.5s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 背景图片 */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* 图片容器 */
.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* 主图片样式 */
#main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease;
}

/* 屏幕分半 */
.screen-half {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

.left-half {
    left: 0;
    width: 50%;
}

.right-half {
    right: 0;
    width: 50%;
}

/* 横屏检测 */
@media screen and (orientation: landscape) {
    .portrait-tip {
        opacity: 0;
        pointer-events: none;
    }
    
    .main-page {
        opacity: 1;
        pointer-events: auto;
    }
}

@media screen and (orientation: portrait) {
    .portrait-tip {
        opacity: 1;
        pointer-events: auto;
    }
    
    .main-page {
        opacity: 0;
        pointer-events: none;
    }
}