/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;  /* 隐藏body的滚动条 */
    font-family: Arial, sans-serif;
}

/* 页眉容器 - 悬浮固定 */
header {
    position: fixed;
    top: 2vh;
    left: 0;
    width: 100%;
    z-index: 1000;  /* 确保在最上层 */
}

header .top-option{
    display: flex;
    justify-content: space-between;
    width: 1000px;
    position: fixed;
    right: 15%;
    z-index: 1001;
}
header .top-option ul li{
    float: left;
    text-align: center;
    height: 37px;
    line-height: 37px;
    color:white;
    width: 130px;
    cursor: pointer;
    position: relative; /* 重要：为伪元素定位做准备 */
}

/* 下划线动画效果 - 使用 ::after 伪元素 */
header .top-option ul li::after {
    content: '';              /* 必须有content属性 */
    position: absolute;       /* 绝对定位 */
    bottom: 0;                /* 贴在底部 */
    left: 0;                /* 从中间开始 */
    width: 0;                 /* 初始宽度为0 */
    height: 3px;              /* 下划线高度 */
    background-color: white;  /* 下划线颜色 */
    transition: width 0.3s ease-in-out; /* 宽度变化的过渡动画 */
}

/* 使用 calc() 计算文字大概宽度，或使用固定值 */
header .top-option ul li:hover::after {
    width:100%;
}
header .logo{
    width: 70px;
    height: 70px;
    position: fixed;
    left: 17%;
    top: 0;
    z-index: 1001;
}
header .logo img{
    max-width: 100%;
    max-height: 100%;
}
ul{
    list-style-type: none;
}

/* 页面容器 */
.page {
    display: none;
    padding: 0;
    min-height: 100vh;
    margin: 0;
    color: white;
    border-radius: 0;
    overflow-y: auto;  /* 只在页面内部滚动 */
    height: 100vh;
}

.page.active {
    display: block;
}

/* 导航项样式 */
.top-option li {
    transition: all 0.3s;  /* 添加过渡动画 */

}

.top-option li:hover {
    /* 鼠标悬停效果 */
    background-color: rgba(255, 255, 255, 0.1);
}

.top-option li.active {
    /* 当前选中的导航项 */
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}


/* ==================== 页面切换动画 ==================== */

/* 页面整体仅淡入，消除位移以允许内部元素独立动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 分部专用的飞入动画（更明显的位移） */
@keyframes flyInUp {
    from {
        opacity: 0;
        transform: translateY(100px); /* 加大位移，显得更明显 */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为需要飞入的模块添加动画 */
#teams.active .teams-top-left {
    animation: flyInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

#teams.active .teams-bottom {
    animation: flyInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards; /* 稍微延迟一点，形成层次感 */
    opacity: 0; /* 初始隐藏，等待动画 */
}

/* 右上方展示图片不需要飞入动画，它只会跟着页面一起 fadeIn 淡入 */


/* ==================== TZG电竞分部页面 ==================== */
.teams-container {
    padding: 50px ; /* 顶部100px规避header，底部0 */
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px; /* 减小间距以适应单页 */
    height: 100vh; /* 强制容器高度为100vh */
    overflow: hidden; /* 防止溢出滚动 */
    box-sizing: border-box;
}

.teams-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
    /* 移除了背景、边框圆角、模糊和阴影 */
    flex: 0 0 auto; /* 不允许伸缩 */
}

.teams-top-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.team-badge {
    width: 80px; /* 缩小队徽以节省高度 */
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.teams-top-left h2 {
    font-size: 2rem; /* 缩小标题 */
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.team-desc {
    width: 100%; /* 确保容器占满父级宽度 */
}

.page .team-desc p {
    font-size: 1rem; /* 缩小文字 */
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.teams-top-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-display-img {
    width: 100%;
    max-width: 400px; /* 缩小展示图 */
    max-height: 55vh; /* 限制最大高度，防止图片过高 */
    object-fit: contain; /* 保证图片不变形且完整显示 */
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.main-display-img:hover {
    transform: scale(1.02);
}

.teams-bottom {
    padding: 0 20px;
    /* 移除了背景、边框圆角、模糊 */
    flex: 1; /* 占据剩余高度 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中荣誉内容 */
}

.honors-title {
    font-size: 1.5rem; /* 缩小标题 */
    margin-bottom: 15px;
    text-align: center;
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    display: inline-block;
    width: 100%;
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* 减小间距 */
}

.honor-card {
    display: flex;
    flex-direction: column;
    /* 去除了深色背景和圆角，让它看起来更干净 */
    overflow: hidden;
    transition: transform 0.3s ease;
}

.honor-card:hover {
    transform: translateY(-5px); /* 减小上浮距离 */
}

.honor-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px; /* 给图片单独加圆角 */
}

.honor-caption {
    padding: 8px 0; /* 减小内边距 */
    text-align: center;
    font-size: 0.9rem; /* 缩小字号 */
    font-weight: bold;
    color: #fff;
}

/* ==================== 汉堡菜单 ==================== */
.hamburger {
    display: none;
    position: fixed;
    right: 20px;
    top: 15px;
    z-index: 1002;
    cursor: pointer;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== 响应式设计 ==================== */

/* 手机端 (≤768px) */
@media (max-width: 768px) {

    /* --- 汉堡菜单显示 --- */
    .hamburger {
        display: flex;
    }

    /* --- header导航改为竖向侧边栏 --- */
    header .logo {
        width: 50px;
        height: 50px;
        left: 15px;
        top: 10px;
    }

    header .top-option {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding-top: 80px;
        transition: right 0.3s ease;
    }

    header .top-option.open {
        right: 0;
    }

    header .top-option ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    header .top-option ul li {
        float: none;
        width: 100%;
        height: 50px;
        line-height: 50px;
        text-align: left;
        padding-left: 30px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* --- 页面通用 --- */
    .page {
        margin-top: 0;
        padding: 0;
    }

    .page h1 {
        font-size: 1.5rem;
        padding-top: 70px;
    }

    .page p {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* --- teams分部页面 --- */
    .teams-container {
        padding: 70px 15px 15px 15px;
        gap: 15px;
        height: 100vh;
        overflow-y: auto;
    }

    .teams-top {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }

    .teams-top-left {
        align-items: center;
        text-align: center;
    }

    .team-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 5px;
    }

    .teams-top-left h2 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .page .team-desc p {
        font-size: 0.85rem;
        line-height: 1.5;
        text-align: center;
        padding: 0;
    }

    .teams-top-right {
        display: none; /* 手机端隐藏右侧大图节省空间 */
    }

    .teams-bottom {
        padding: 0;
    }

    .honors-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .honors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .honor-caption {
        font-size: 0.75rem;
        padding: 5px 0;
    }

    .honor-card:hover {
        transform: none; /* 手机端取消hover效果 */
    }

    /* --- 飞入动画缩小位移 --- */
    @keyframes flyInUp {
        from {
            opacity: 0;
            transform: translateY(40px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}


/* ==================== 各页面独立背景 ==================== */

/* 首页 - 使用渐变背景 */
body.bg-home {
    background-image: url("../res/homeBg.png");
    background-size: cover;
}

/* TZG电竞分部 - 红色主题 */
body.bg-teams {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

/* 媒体矩阵 - 蓝色主题 */
body.bg-media {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

/* 商务联系 - 绿色主题 */
body.bg-contact {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

/* 合作伙伴 - 橙黄色主题 */
body.bg-partners {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

/* TZG+社区 - 深蓝紫色主题 */
body.bg-community {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

/* 电商周边 - 粉色主题 */
body.bg-shop {
    background-image: url("../res/starPlayerBg.jpg");
    background-size: cover;
}

