/* 全局样式 */
body {
    font-family: "华文楷体", "KaiTi", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* 默认左侧导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

nav ul {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

nav ul li {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    margin-bottom: 10px;
}

nav ul li:nth-child(1) {
    border-bottom: 2px solid #ddd;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    display: block;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), -2px -2px 4px rgba(255, 255, 255, 0.6);
}

nav ul li a:hover {
    text-decoration: underline;
    font-weight: bold;
}

/* 主页内容适配 */
.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 50px;
    max-width: 1200px; /* 设置最大宽度 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
}

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 50px;
    margin-left: 120px;
    padding-left: 20px;
}

/* 个人资料 */
.profile {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* 游戏页面内容布局 */
.game-sections {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48%;
}

.game-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    width: 400px;
    height: 220px;
    border-radius: 20px;
}

.game-item p {
    font-size: 1.2rem;  /* 使用 rem 让字体随屏幕变化 */
    font-weight: bold;
    color: black;
    text-align: center;
    white-space: nowrap;
}


.game-image {
    width: 170px;
    height: 170px;
    border-radius: 20px;
    object-fit: cover;
    margin-right: 40px;
}

/* 适配小屏幕设备（手机端） */
@media screen and (max-width: 768px) {
    /* 确保导航栏不遮挡内容 */
    body {
        font-family: "华文楷体", "KaiTi", sans-serif;
        margin: 0;
        padding: 0;
        font-size: 12px;  /* 修改全局字体大小 */
        background-color: #f5f5f5;
    }

    p, span, a {
        font-size: 12px;  /* 调整文本、超链接和 span 的字体 */
    }

    header {
        display: none;
    }

    .home-content {
        margin-left: -10px; /* 负值表示向左移动，调整数值以适配你的需求 */
    }

        
    /* 创建按钮并设置它们的位置和样式 */
    .fixed-buttons {
        position: fixed;  /* 固定在页面上 */
        top: 0;           /* 贴紧页面顶部 */
        left: 50%;        /* 让整个按钮组居中 */
        transform: translateX(-50%); /* 向左偏移自身 50% 宽度，确保真正居中 */
        display: flex;    /* 让两个按钮横向排列 */
        gap: 10px;        /* 按钮之间的间距 */
        padding: 10px;
        background: transparent; /* 背景透明 */
        z-index: 1000;    /* 确保按钮层级在最上方 */
    }

    .fixed-buttons a {
        text-decoration: none; /* 取消下划线 */
        color: black; /* 文字颜色为黑色 */
        font-weight: bold; /* 字体加粗 */
        font-size: 14px; /* 字体大小 */
        padding: 6px 12px; /* 按钮内边距 */
        border: 2px solid rgba(255, 255, 255, 0.6); /* 按钮边框，白色淡出 */
        border-radius: 5px; /* 按钮圆角 */
        background: transparent; /* 背景透明 */
        transition: all 0.3s ease-in-out;
    }

    .fixed-buttons a:hover {
        background: rgba(255, 255, 255, 0.2); /* 悬停时轻微变亮 */
    }


    nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        padding: 0;
        margin: 0;
    }

    /* 导航项的样式 */
    nav ul li a {
        font-size: 14px; /* 调整字体大小 */
        padding: 10px;
    }

    /* 给主内容留出顶部空间 */
    main {
        padding-top: 80px; /* 给主内容添加顶部间距，避免被导航栏遮挡 */
    }

    /* 游戏页面：保持原有布局，确保图标和文字居中 */
    .game-sections {
        display: flex;
        flex-direction: column; /* 让所有内容纵向排列 */
        align-items: center; /* 居中对齐 */
    }

    .game-section {
        width: 100%; /* 让内容占满整个宽度 */
        display: flex;
        flex-direction: column; /* 让单个游戏项也纵向排列 */
        align-items: center; /* 图片和文字居中 */
    }

    .game-item {
        display: flex;
        flex-direction: column; /* 让图片和文字竖着排列 */
        align-items: center; /* 居中对齐 */
        text-align: center; /* 文字居中 */
        margin-bottom: 20px; /* 增加间距 */
    }

    .game-image {
        width: 50%; /* 控制图片宽度 */
        max-width: 500px;
        display: block; /* 避免 inline 元素导致的额外间距 */
        margin: 0 auto; /* 确保图片完全居中 */
    }

    .game-item p {
        margin-top: 10px; /* 给文字与图片间增加一点间距 */
        font-size: 14px; /* 调整字体大小 */
        width: 100%; /* 让文字占满整个宽度 */
        text-align: center; /* 文字水平居中 */
    }
    
    .game-content {
        margin-left: -20px; /* 负值表示向左移动，调整数值以适配你的需求 */
    }
}



/* 🟠 超小屏幕适配 */
@media (max-width: 480px) {
    .nickname {
        font-size: 20px;
    }

    .link-item a {
        font-size: 16px;
    }

    nav ul li a {
        font-size: 16px;
    }

    /* 修复额外内容对齐 */
    .extra-content {
        width: 100%; /* 确保小屏幕下占满 100% 宽度 */
        padding-left: 0; /* 取消左边的 padding */
    }
}


/* 圆形 Logo 样式 */
.logo-img {
    width: 8vw; /* 使用视口宽度的 8% */
    height: 8vw; /* 高度保持 8% */
    max-width: 50px;  /* 最大宽度 50px */
    max-height: 50px; /* 最大高度 50px */
    border-radius: 50%; /* 圆形 */
    object-fit: cover; /* 保证图片充满圆形 */
    margin-right: 20px;
}

/* 别名样式 */
.nickname {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

/* 链接区域样式 */
.links {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 链接区域样式 */
.links-horizontal {
    display: flex; /* 横向排列 */
    justify-content: center; /* 居中对齐 */
    align-items: center; /* 垂直居中 */
    gap: 8px; /* 控制链接和分隔符之间的间距 */
}

/* 分隔符样式 */
.separator {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}



.link-item {
    display: flex;
    align-items: center;
}

.link-item img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* 链接文本样式美化 */
.link-item a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; /* 更现代的字体 */
    font-size: 20px; /* 字号稍大 */
    font-weight: bold; /* 加粗 */
    color: #000305;
    text-decoration: none;
    transition: color 0.3s ease-in-out; /* 添加颜色变化效果 */
}

/* 鼠标悬停时的文字效果 */
.link-item a:hover {
    color: #ffffff; /* 文字变白 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), -2px -2px 4px rgba(0, 0, 0, 0.8); /* 字体边缘淡出黑色 */
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* 居中对齐 */
    gap: 30px; /* 元素之间的间距 */
    width: 100%;
}

.extra-content { 
    display: flex; 
    flex-direction: column; /* 让内容垂直排列 */
    align-items: flex-start; /* 让内部文本左对齐 */
    text-align: left; /* 让文本靠左 */
}


/* 默认样式 - 适用于桌面端 */
.desktop-nav {
    display: block; /* 默认显示桌面端导航栏 */
}

.desktop-nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.desktop-nav ul li a {
    padding: 15px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
}

