/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#success-message { color: #0ea303; }
#total-count { color: red; }
#today-count { color: red; }
/* CSS变量定义 */
:root {
    /* 颜色变量 */
    --primary: #B90000;
    --secondary: #8B0000;
    --gold: #C9A55C;
    --lightGold: #E6C87A;
    --darkGold: #000000;
    --bgBrown: #ddcfae;
    --white: #FFFFFF;
    --black: #000000;
    --transparentBlack: rgba(0, 0, 0, 0.5);
    --transparentBlack2: rgba(0, 0, 0, 0.8);
    
    /* 旋转图标参数 */
    --rotate-icon-size: 146px;
    --rotate-icon-top-offset: 71px;
    --rotate-icon-left-offset: 71px;
    --rotate-icon-animation-duration: 0.6s;
    --rotate-icon-hover-rotation: 10deg;
    --rotate-icon-hover-translate-x: 5px;
    --rotate-icon-hover-translate-y: -9px;
    
    /* 下载按钮参数 */
    --btn-height-mobile: 5rem;
    /* --btn-height-desktop: 6rem; */
    --btn-animation-duration: 0.8s;
    
    /* Logo参数 */
    --logo-size: clamp(15rem, 37vw, 60rem);
    
    /* 通用间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* 动画时间 */
    --transition-fast: 0.3s;
    --transition-normal: 0.5s;
    --transition-slow: 0.8s;
}

/* 基础样式 */
body {
    font-family: "KaiTi", "楷体", serif;
    background-color: #ddc4ae4d;
    background-image: url("../images/bg-body.png");
    background-position: center top;
    line-height: 1.6;
    color: var(--darkGold);
    min-height: 100vh;
}

/* 主要内容区域上边距 - 避免被固定导航遮挡 */
main {
    /* margin-top: 120px; */ /* 为固定导航栏留出空间 */
}

/* 容器样式 */
.container {
    /* max-width: 1200px; */
    /* margin: 0 auto; */
    /* padding: 0 1rem; */
}

/* 文本样式 */
.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.text-shadow-lg {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

/* 背景纹理 */
.bg-texture {
    background-color: var(--bgBrown);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D9CCB2' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 按钮发光效果 */
.btn-glow {
    box-shadow: 0 0 15px rgba(201, 165, 92, 0.7);
    transition: all var(--transition-normal) ease;
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(201, 165, 92, 0.9);
    transform: translateY(-2px);
}

/* 龙浮动动画 */
.dragon-animation {
    animation: dragonFloat 6s ease-in-out infinite;
}

@keyframes dragonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 隐藏滚动条 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 图片查看器样式 */
#imageViewer {
    z-index: 9999;
}

.image-viewer-container {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(0 0 0 / 77%);
    overflow: visible;
}

.image-viewer-container img {
    object-fit: contain;
    max-height: 90%;
}

/* 使用图片替换文本按钮 */
.image-viewer-prev,
.image-viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgb(0 0 0 / 0%);
    border: none;
    /* border-radius: 50%; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10; /* 确保按钮在所有图片上方 */
    user-select: none;
}

.image-viewer-prev {
    left: 20px;
    background-image: url('../images/01.png');
    background-size: cover;
    background-position: center;
}

.image-viewer-next {
    right: 20px;
    background-image: url('../images/02.png');
    background-size: cover;
    background-position: center;
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
    /* background-color: rgba(0, 0, 0, 0.8); */
    transform: translateY(-50%) scale(1.1);
}

/* 优化右上角关闭按钮样式 */
.md-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 15; /* 确保在所有元素上方 */
}

.md-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 移动设备上关闭按钮居中显示 */
@media (max-width: 768px) {
    .md-close {
        top: auto;
        right: auto;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
    }

    .md-close:hover {
        transform: translateX(-50%) scale(1.1);
    }
}

.tchdp {
         /* width: 85%; */
         /* height: auto; */
} 

/* 图片索引信息 */
.image-viewer-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    user-select: none;
    z-index: 10;
}

/* 3D轮播效果样式 */
.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.carousel-items {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

/* 中央图片 (最主要的) */
.carousel-item.active {
    transform: translateZ(0);
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}

/* 右侧第一张图片 */
.carousel-item.next-1 {
    transform: translateX(30%) translateZ(-100px) scale(0.8);
    opacity: 0.6;
    z-index: 4;
}

/* 右侧第二张图片 */
.carousel-item.next-2 {
    transform: translateX(60%) translateZ(-200px) scale(0.6);
    opacity: 0.3;
    z-index: 3;
}

/* 左侧第一张图片 */
.carousel-item.prev-1 {
    transform: translateX(-30%) translateZ(-100px) scale(0.8);
    opacity: 0.6;
    z-index: 4;
}

/* 左侧第二张图片 */
.carousel-item.prev-2 {
    transform: translateX(-60%) translateZ(-200px) scale(0.6);
    opacity: 0.3;
    z-index: 3;
}

/* 头部导航栏样式 */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(247, 243, 233, 0.9);
    border-bottom: 1px solid rgba(201, 165, 92, 0.3);
    backdrop-filter: blur(4px);
    transition: all var(--transition-fast) ease;
    background-image: url(../images/topbg.png);
    background-size: cover;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

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

.logo-image {
    height: 2rem;
    width: auto;
}

.main-nav {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-link {
    color: var(--darkGold);
    font-weight: bold;
    text-decoration: none;
    margin: 0 2rem;
    transition: color var(--transition-fast) ease;
    text-align: center;
    display: inline-block;
    width: auto;
}

.nav-link:hover {
    color: var(--gold);
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--darkGold);
    font-size: 2.1rem;
    cursor: pointer;
    padding: 0.5rem;
}

.utility-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.function-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.function-btn {
    background: none;
    border: none;
    color: var(--darkGold);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color var(--transition-fast) ease;
}

.function-btn:hover {
    color: var(--gold);
}

.game-list-container {
    position: relative;
}

.game-list-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--darkGold);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color var(--transition-fast) ease;
}

.game-list-btn:hover {
    color: var(--gold);
}

.game-list-text {
    display: none;
    margin-left: 0.5rem;
    font-size: 1.125rem;
    font-weight: bold;
}

.game-list-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 16rem;
    background-color: var(--bgBrown);
    border: 1px solid rgba(201, 165, 92, 0.3);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--darkGold);
    text-decoration: none;
    transition: all var(--transition-fast) ease;
}

.dropdown-item:hover {
    background-color: rgba(201, 165, 92, 0.1);
    color: var(--gold);
}

.mobile-menu {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid rgba(201, 165, 92, 0.2);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--darkGold);
    font-weight: bold;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color var(--transition-fast) ease;
}

.mobile-nav-link:hover {
    color: var(--gold);
}

/* 英雄区域样式 */
.hero-section {
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50C50 22.3858 27.6142 0 0 0V100H50C50 72.3858 72.3858 50 100 50V0H50Z' fill='%23EBE3D1' fill-opacity='0.4'/%3E%3C/svg%3E"); */
}

.hero-background {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    /* background-image: url("../images/bg-body.png"); */
    background-size: cover;
    background-position: center;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to bottom, transparent, rgba(247, 243, 233, 0.8)); */
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    margin: 0 auto;
    padding: 0rem 1rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-bottom: 2rem; */
}

.main-logo {
    max-width: 100%;
    height: auto;
    width: var(--logo-size);
    margin-top: 2rem;
}

.subtitle-section {
    margin-bottom: 3.4rem;
    text-align: center;
}

.divider {
    width: 8rem;
    height: 1px;
    background-color: var(--gold);
    margin: 0 auto 1rem;
}
.divider1 {color: #000000;font-weight: bold; font-family: 'KaiTi', '楷体';font-size: clamp(1rem, 3vw, 1.5rem);margin-bottom: clamp(5px, 1vw, 10px);background-image: url('../images/adimg.png');background-size: 100% 100%;background-position: calc(50% + 20px) center;background-repeat: no-repeat;padding: 0;padding-top: 30px;padding-left: 15px;width: 100%;max-width: 600px;height: 100px;display: flex;align-items: center;justify-content: center;overflow: visible;margin: -28px auto 0 auto;}

.subtitle {
    color: var(--darkGold);
    font-size: 1.125rem;
    /* font-weight: bold; */
}

.download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.download-button-container {
    position: relative;
    margin-left: 0rem;
}

.download-link {
    display: block;
    position: relative;
}

.rotate-icon-container {
    position: absolute;
    width: var(--rotate-icon-size);
    height: var(--rotate-icon-size);
    top: calc(-1 * var(--rotate-icon-top-offset));
    left: calc(-1 * var(--rotate-icon-left-offset));
    transition: transform var(--rotate-icon-animation-duration) ease;
}

.rotate-icon {
    width: 100%;
    height: 100%;
}

.download-link:hover .rotate-icon-container {
    transform: rotate(var(--rotate-icon-hover-rotation)) 
               translate(var(--rotate-icon-hover-translate-x), var(--rotate-icon-hover-translate-y));
}

.game-download-btn {
    position: relative;
}

.download-btn-default,
.download-btn-hover {
    height: var(--btn-height-mobile);
    transition: opacity var(--btn-animation-duration) ease;
}

.download-btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.download-link:hover .download-btn-default {
    opacity: 0;
}

.download-link:hover .download-btn-hover {
    opacity: 1;
}

.download-info {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
}

.info-text {
    color: #141313;
    margin-bottom: 0rem;
    font-weight: 900;
    font-size: x-large;
    font-family: "KaiTi", "楷体", serif;
}

.info-text-bold {
    color: #141313;
    font-weight: 900;
    font-size: x-large;
    font-family: "KaiTi", "楷体", serif;
}

.age-warning {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    justify-content: center;
}

.age-image {
    height: 2.5rem;
}

/* 公益足迹样式 */
.charity-section {
    width: 100%;
    max-width: 1288px;
    margin: 0 auto;
}

.charity-title {
    font-size: 1.5rem;
    color: var(--darkGold);
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
}

.charity-content {
    width: 100%;
    max-width: 1288px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(201, 165, 92, 0.3);
}

.charity-wrapper {
    display: flex;
}

.timeline-navigation {
    display: block;
    width: 15%;
    min-width: 150px;
    max-height: 424px; /* 精确设置高度，确保只显示5个时间点 */
    overflow-y: auto; /* 允许垂直滚动 */
    padding: 1rem;
    /* 隐藏滚动条但保持功能 */
    -ms-overflow-style: none; /* IE和Edge */
    scrollbar-width: none; /* Firefox */
}

/* 隐藏Chrome滚动条 */
.timeline-navigation::-webkit-scrollbar {
    display: none;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 2px solid rgba(201, 165, 92, 0.5);
}

.timeline-item {
    position: relative;
    margin: 0rem 0rem 1.5rem 0rem;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
}

.timeline-item:hover {
    transform: translateX(0.5rem);
}

.timeline-dot {
    position: absolute;
    left: -2.55rem;
    top: 9px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid rgba(201, 165, 92, 0.5);
    transition: all var(--transition-fast) ease;
}

.timeline-dot.active {
    background-color: var(--gold);
    border-color: var(--white);
}

.timeline-date {
    color: var(--darkGold);
    font-weight: 500;
    transition: all var(--transition-fast) ease;
    min-width: 100px;
}

.timeline-item:hover .timeline-date {
    transform: scale(1.25);
    color: var(--primary);
}

.timeline-label {
    color: rgba(158, 122, 44, 0.7);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.charity-images {
    padding: 0.5rem;
    flex: 1;
}





/* 页脚样式 */
.footer {
    background-color: rgba(158, 122, 44, 0.1);
    padding: 2.5rem 0;
    border-top: 1px solid rgba(201, 165, 92, 0.2);
}

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

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo-image {
    /* height: 6rem; */
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--darkGold);
    text-decoration: none;
    transition: color var(--transition-fast) ease;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-divider {
    color: var(--darkGold);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-link {
    width: 6.5rem;
    height: 2.5rem;
    /* background-color: rgba(185, 0, 0, 0.1); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--darkGold);
    transition: background-color var(--transition-fast) ease;
}

.social-link:hover {
    background-color: rgba(185, 0, 0, 0.2);
}

.footer-text {
    color: var(--darkGold);
    font-size: 0.875rem;
}

.footer-info {
    margin-bottom: 0.5rem;
}

.footer-copyright {
    margin-top: 1.5rem;
}

/* 响应式设计 */

/* 小屏幕设备 (767px以下) */
@media (max-width: 767px) {
    /* 显示手机端导航，隐藏桌面端导航 */
    .mobile-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    
    .header-content {
        display: none !important;
    }
    
    .timeline-date {
        font-size: 0.575rem;
        /* 添加最小宽度确保日期文字不换行 */
        min-width: 4rem;
        white-space: nowrap;
    }
    
    /* 时间线消失时，走马灯宽度占100% */
    .tchdp {
        width: 100%;
    }
    
    /* 手机端导航链接悬停效果 */
    .nav-link-mobile:hover {
        color: var(--gold);
    }
    
    /* 移动端菜单按钮样式 */
    .mobile-menu-btn {
        /* font-size: 1.5rem; */
        padding: 0.5rem 1rem;
    }
}

/* 平板设备 (768px以上) */
@media (min-width: 768px) {
    .logo-image {
        height: 2.5rem;
    }
    
    .main-nav {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .game-list-text {
        display: inline;
    }
    
    .download-btn-default,
    .download-btn-hover {
        height: var(--btn-height-desktop);
    }
    
    .charity-title {
        font-size: 2rem;
    }
    
    .timeline-navigation {
        display: block;
    }
    
    .age-image {
        height: 3rem;
    }
}

/* 桌面设备 (1024px以上) */
@media (min-width: 1024px) {
    .charity-title {
        font-size: 2rem;
    }
}

/* 平板设备 (768px以上) - 隐藏手机端导航 */
@media (min-width: 768px) {
    .mobile-header {
        display: none !important;
    }
}

/* 手机端导航链接样式 */
.nav-link-mobile {
    color: var(--darkGold);
    font-weight: bold;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color var(--transition-fast) ease;
    flex: 1;
    text-align: center;
}

/* 大型桌面设备 (1200px以上) */
@media (min-width: 1200px) {
    .container {
        padding: 0 3rem;
    }
}

/* 手机端导航容器基础样式 */
.mobile-header {
    background-color: #ddcfaea8;
    /* padding: 0.5rem 1rem; */
    border-bottom: 1px solid var(--gold);
    position: relative;
    z-index: 1000;
    background-image: url(images/topbg.png);
    background-size: cover;
}

/* 手机端Logo区域样式 */
.mobile-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    
}

/* 手机端Logo图片样式 */
.mobile-logo {
    height: 40px;
    margin-right: 10px;
}

/* 手机端Logo文字样式 */
.mobile-logo-text {
    color: #000000;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: var(--font-main);
}

/* 手机端导航行样式 */
.mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 32px; /* 进一步降低导航栏高度 */
}

/* 手机端导航链接容器样式 */
.mobile-nav-links {
    display: flex;
    flex: 1;
    justify-content: space-around;
}

/* 手机端下拉菜单样式 */
.mobile-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bgBrown);
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    padding: 1rem 0;
    z-index: 1000;
    display: none;
}

/* 显示下拉菜单的样式 */
.mobile-dropdown-menu.active {
    display: block;
}

/* 下拉菜单链接样式 */
.mobile-dropdown-link {
    display: block;
    color: var(--darkGold);
    font-weight: bold;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
    transition: background-color var(--transition-fast) ease, color var(--transition-fast) ease;
}

/* 下拉菜单链接悬停效果 */
.mobile-dropdown-link:hover {
    background-color: rgba(218, 165, 32, 0.1);
    color: var(--gold);
}

/* 最后一个下拉菜单链接没有底边框 */
.mobile-dropdown-link:last-child {
    border-bottom: none;
}

/* 确保导航链接行在手机上的紧凑布局 */
@media (max-width: 480px) {
    .nav-link-mobile {
        font-size: 0.9rem;
        padding: 0.75rem 0;
    }
    
    .mobile-menu-btn {
        /* font-size: 1.3rem; */
        padding: 0.05rem 0.75rem;
        margin-bottom: 0.3rem;
    }
}
