/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* 确保 html 和 body 占满整个视口高度 */
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    background-color: #ffffff;
    display: flex; /* 使用 flexbox 布局 */
    flex-direction: column; /* 垂直方向排列 */
}

/* 头部样式 */
.header {
    background-color: #f8f8f8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    height: 60px;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-right: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #333;
}

/* CSS 部分 */
.nav-link {
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    display: block;
    padding: 12px 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 0.5rem;
}

.nav-link:focus, .nav-link:hover {
    background-color: #e9ecef;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    color: #007bff;
    transform: translateX(10px);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* 新增 active 样式 */
.nav-link.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 主要内容样式 */
.main {
    margin: auto 4rem;
    padding: 4rem 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    flex: 1;
}

/* 新增的内容容器样式 */
.content-container {
    max-width: 1600px;
    margin: auto auto;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
}

.title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 3rem;
    font-weight: bold;
}

.description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 帮助内容样式 */
.help-content {
    max-width: 1200px;
    margin: auto auto;
    padding: auto auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    flex: 1; /* 主要内容区域占据剩余空间 */
}

.help-title {
    color: #000000;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 按钮样式 */
.buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    position: relative;
    display: inline-block; /* 确保按钮可以作为定位上下文 */
    cursor: pointer; /* 鼠标悬停时显示手型 */
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
    font-weight: bold; /* 加粗 */
    text-align: center; /* 文本水平居中 */
    align-items: center; /* 垂直居中 */
    gap: 4px; /* 图标和文本之间的间距 */
    transition: background-color 0.3s;
}

.btn:hover, .btn:focus {
    outline: none;
}

.btn-buy-taobao {
    background-color: #ff4400;
    color: white;
}

.btn-buy-taobao:hover {
    background-color: #f42b00;
    color: white;
}

.btn-buy-doudian {
    background-color: #161824;
    color: white;
}

.btn-buy-doudian:hover {
    background-color: #272a33;
    color: white;
}

.btn-secondary {
    background-color: #ff0000;
    color: #eeff00;
}

.btn-secondary:hover {
    background-color: #e00000;
    color: #eeff00;
}

/* 联系信息样式 */
.contact-buttons {
    margin-top: 10px;
    display: flex;
}

.contact-item {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-icon {
    width: 20px; /* 图标宽度 */
    height: 20px; /* 图标高度 */
    object-fit: contain; /* 保持图标比例缩放 */
}

.contact-link:hover {
    background-color: #f3f3f3;
}

.qr-code {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    border-radius: 10px;
    background-color: white;
    border: 1px solid #ccc;
    padding: 5px;
    margin: 10px;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.contact-item:hover .qr-code {
    pointer-events: auto; /* 恢复鼠标事件 */
}

.qr-code img {
    width: 150px;
    height: 150px;
    display: block;
}

.image-container {
    position: relative;
    width: 100%; /* 自动扩展宽度 */
    aspect-ratio: 1 / 1; /* 宽高比例为1:1 */
}
.image {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

/* 页脚样式 */
.footer {
    font-size: 12px;
    color: #666;
    padding: 10px 10px;
    background-color: #ffffff;
    text-align: center; /* 文本居中 */
    border-top: 1px solid #e0e0e0; /* 添加顶部边框 */
    margin-top: auto; /* 将 footer 推到页面底部 */
    z-index: 999;
}

.footer a {
    text-decoration: none;
    color: inherit;
}

.footer a:hover {
    text-decoration: underline;
}

/* 语言切换按钮样式 */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto; /* 靠右对齐 */
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px; /* 圆角半径为10px */
    cursor: pointer;
    transition: background-color 0.3s;
}

.language-btn:hover {
    background-color: #f5f5f5;
}

.language-icon {
    width: 24px;
    height: 24px;
    border-radius: 10px; /* 图标圆角半径为10px */
    object-fit: cover; /* 确保图标填充整个区域 */
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.language-options a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    font-weight: bold;
}

.language-options a:hover {
    background-color: #f5f5f5;
}


/* 手机样式 */
@media screen {
    .main {
        margin: auto 1rem;
        padding: 1rem 1rem;
        gap: 2rem; /* 减少元素之间的间隔 */
    }
}