/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    background-color: #1E90FF; /* 与页脚一致的蓝色 */
    padding: 18px 0; /* 加宽导航栏高度 */
    position: relative;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}


.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    max-width: 200px;  /* 限制宽度，不限制长度 */
    height: auto;
    max-height: 50px;  /* 增加LOGO高度 */
}

/* 主内容区 */
.main-content {
    position: relative;
    overflow: hidden;
}

/* 照片轮播区 */
.photo-gallery {
    position: relative;
    min-height: 100vh;
}

.photo-row {
    position: absolute;
    width: 100%;
    height: 33.33vh;
    overflow: hidden;
}

.row-1 {
    top: 0;
}

.row-2 {
    top: 33.33vh;
}

.row-3 {
    top: 66.66vh;
}

.photo-container {
    display: flex;
    height: 100%;
    animation-duration: 30s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    white-space: nowrap;
}

.row-1 .photo-container {
    animation-name: slideLeft;
}

.row-2 .photo-container {
    animation-name: slideRight;
}

.row-3 .photo-container {
    animation-name: slideLeft;
}

.photo-container img {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    display: block; /* 避免inline元素的间距 */
}

/* 动画关键帧 */
@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* 黑色蒙版 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 50% 透明度 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 20px;
}


.overlay-content h1 {
    font-size: 1.6em;  /* 调小2个字号 */
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
}

.overlay-content p {
    font-size: 1em;
    margin: 8px 0;
    color: #f0f0f0;
}

/* 页脚样式 */
.footer {
    background-color: #1E90FF; /* 深蓝色 */
    color: white;
    padding: 40px 0 20px;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-section {
    text-align: center;
}

.qrcode img {
    width: 150px;          /* 保持宽度设置 */
    height: auto;          /* 高度自适应，保持原图比例 */
    border: 3px solid white;
    border-radius: 10px;
    object-fit: contain;   /* 保持原始比例，不会被拉伸 */
}

.footer-info p {
    margin: 8px 0;
    font-size: 0.95em;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .overlay-content h1 {
        font-size: 1.3em;  /* 相应调小 */
    }
    
    .overlay-content p {
        font-size: 0.9em;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-info p {
        font-size: 0.85em;
    }
}

/* 移动端优化 - 超小屏幕设备 */
@media (max-width: 480px) {
    /* 导航栏适配 */
    .navbar {
        padding: 12px 0;
    }
    
    .logo img {
        max-height: 25px;
        max-width: 120px;
    }
    
    /* 照片轮播行高调整 */
    .photo-row {
        height: 25vh;
    }
    
    .row-2 {
        top: 25vh;
    }
    
    .row-3 {
        top: 50vh;
    }
    
    /* 蒙版内容适配 */
    .overlay-content {
        padding: 15px;
    }
    
    .overlay-content h1 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .overlay-content p {
        font-size: 0.75rem;
        margin: 5px 0;
        line-height: 1.4;
    }
    
    /* 页脚适配 */
    .footer {
        padding: 30px 0 15px;
    }
    
    .qrcode img {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }
    
    .footer-info p {
        font-size: 0.8rem;
        margin: 6px 0;
    }
    
    /* 动画速度优化 */
    .photo-container {
        animation-duration: 20s; /* 移动端动画更快 */
    }
    
    /* 防止移动端点击高亮 */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 移动端滚动优化 */
    html, body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
    }
}

/* 平板设备适配 */
@media (min-width: 481px) and (max-width: 768px) {
    .overlay-content h1 {
        font-size: 1.25em;
    }
    
    .overlay-content p {
        font-size: 0.85em;
    }
    
    .logo img {
        max-height: 35px;
    }
    
    .photo-row {
        height: 30vh;
    }
    
    .row-2 {
        top: 30vh;
    }
    
    .row-3 {
        top: 60vh;
    }
    
    .qrcode img {
        width: 130px;
        height: 130px;
    }
}

/* 横屏模式适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .photo-row {
        height: 20vh;
    }
    
    .row-2 {
        top: 20vh;
    }
    
    .row-3 {
        top: 40vh;
    }
    
    .overlay-content {
        padding: 10px;
    }
    
    .overlay-content h1 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .overlay-content p {
        font-size: 0.7rem;
        margin: 3px 0;
    }
}

/* 防止移动端缩放问题 */
@media (max-width: 768px) {
    .overlay {
        touch-action: manipulation;
    }
    
    .photo-container img {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-user-drag: none;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .photo-container img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 折叠屏设备适配 */
@media (max-width: 768px) and (max-height: 800px) {
    .overlay-content {
        max-width: 90%;
    }
    
    .overlay-content h1 {
        font-size: 1rem;
    }
    
    .overlay-content p {
        font-size: 0.8rem;
    }
}

/* 防止iOS橡皮筋效果 - 使用更安全的方式 */
html {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    position: relative;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}