/*
 * 基本全局样式
 * -----------------------------------------------------------------
 */
:root {
    --primary-color: #07c160;
    --primary-hover-color: #05a04f;
    --secondary-color: #0a66c2;
    --secondary-hover-color: #08529e;
    --qq-color: #008cd6;
    --qq-hover-color: #0076bb;
    --bg-light: #f5f7fa;
    --bg-dark: #2d3748;
    --text-color: #333;
    --text-muted: #666;
    --text-red: #dc3545;
    --border-color: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Arial", sans-serif, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

section {
    padding: 64px 0;
    text-align: center;
}

h1, h2, h3 {
    margin-top: 0;
}

/*
 * 吸顶导航栏 (Sticky Nav)
 * -----------------------------------------------------------------
 */
.sticky-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
}

.sticky-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-brand-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
}

.nav-brand-link i {
    color: var(--primary-color);
    margin-right: 8px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link-external {
    color: var(--text-muted);
}

/*
 * 公告栏 (Announcement Bar)
 * -----------------------------------------------------------------
 */
.announcement-bar {
    background-color: #fff3cd;
    color: #664d03;
    padding: 12px 0;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.announcement-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/*
 * 页面头部 (Header)
 * -----------------------------------------------------------------
 */
.header-bg {
    background: linear-gradient(to bottom, #f5f7fa, #eef1f6);
    padding-top: 64px;
    padding-bottom: 64px;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/*
 * 卡片和按钮 (Card & Buttons)
 * -----------------------------------------------------------------
 */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 32px;
    transition: transform 0.3s, box-shadow 0.3s;
    /* 开启硬件加速 */
    transform: translate3d(0, 0, 0);
}

.card:hover {
    transform: translateY(-5px) translate3d(0, 0, 0);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.btn-nav-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: nowrap;
    gap: 8px;
}

.btn {
    display: inline-flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
}

.btn-qq {
    background-color: var(--qq-color);
    color: white;
}

.btn-qq:hover {
    background-color: var(--qq-hover-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover-color);
    transform: translateY(-2px);
}

.text-red {
    color: var(--text-red);
}

/*
 * 联系方式布局 (Contact Layout)
 * -----------------------------------------------------------------
 */
.contact-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
}

.qr-card {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 24px;
    max-width: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.copy-container {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 6px;
    padding: 6px 12px;
    gap: 8px;
    margin-top: 10px;
}

.copy-container span {
    flex-shrink: 0;
    color: #dc3545;
    font-weight: 500;
}

.copy-btn {
    background-color: var(--secondary-color);
    color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    font-size: 14px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.copy-btn i {
    margin-right: 4px;
}

.copy-btn:hover {
    background-color: var(--secondary-hover-color);
    transform: translateY(-2px);
}

.refresh-btn-container {
    margin-top: 24px;
}

/*
 * 快捷菜单 (Quick Links)
 * -----------------------------------------------------------------
 */
.quick-links {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #333;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, color 0.2s, opacity 0.3s ease, visibility 0.3s ease;
    /* 开启硬件加速 */
    transform: translate3d(0, 0, 0);
}

.link-item.hidden {
    opacity: 0;
    visibility: hidden;
}

.link-item.visible {
    opacity: 1;
    visibility: visible;
}

.link-item:hover {
    transform: translateY(-4px) translate3d(0, 0, 0);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.link-item span {
    font-size: 12px;
    font-weight: 500;
}

.link-item i {
    color: var(--secondary-color);
}

.link-item.wechat-link i {
    color: var(--primary-color);
}

.link-item.qq-link i {
    color: var(--qq-color);
}

.link-item.back-to-top i {
    color: var(--text-muted);
}

/*
 * 提示框样式
 * -----------------------------------------------------------------
 */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-red);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
    z-index: 1000;
    visibility: hidden;
    white-space: nowrap;
}

.toast-message.show {
    opacity: 1;
    visibility: visible;
}

/*
 * 页脚样式
 * -----------------------------------------------------------------
 */
footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 12px 0;
    text-align: center;
    margin-top: auto;
}

footer .container {
    border-top: 1px solid #4a5568;
    padding-top: 12px;
    color: #a0aec0;
}

/*
 * 媒体查询 (Responsive Design)
 * -----------------------------------------------------------------
 */
@media (min-width: 1025px) {
    .contact-info {
        text-align: left;
    }
    .contact-layout {
        flex-direction: row;
    }
}

@media (max-width: 1024px) {
    .contact-layout {
        flex-direction: column;
        gap: 24px;
    }
    .qr-card {
        max-width: 250px;
    }
    .contact-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .refresh-btn-container {
        order: -1;
        margin-top: 0;
    }
    .copy-container {
        justify-content: center;
        flex-direction: row;
        gap: 8px;
        max-width: 250px;
        width: 100%;
    }
    .copy-btn {
        padding: 4px 8px;
    }
    .btn-nav-container {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .quick-links {
        display: none;
    }
    .header-bg {
        padding-top: 32px;
        padding-bottom: 32px;
    }
    .sticky-nav {
        padding: 12px 0;
    }
    /* 调整导航栏布局，让菜单按钮和品牌名称在同一行 */
    .sticky-nav-inner {
        flex-direction: row;
    }

    /* 新增: 菜单按钮样式，只在小屏幕显示 */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-color);
        cursor: pointer;
        padding: 0;
    }
    /* 移除导航链接的横向滚动，改为垂直堆叠 */
    .nav-links {
        /* 默认隐藏菜单 */
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 16px 0;
        gap: 12px;
        animation: fadeIn 0.3s ease-in-out;
    }
    /* 点击后显示菜单 */
    .nav-links.active {
        display: flex;
    }
    /* 调整菜单项的样式 */
    .nav-link {
        font-size: 16px;
        font-weight: 500;
        color: var(--text-color);
    }
    .announcement-bar {
        font-size: 12px;
    }
}
/* 新增：桌面端隐藏菜单按钮 */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}