/* 导航栏主要样式 */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: rgba(255, 255, 255);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 60px;
}

.main-nav.scrolled {
    background-color: rgba(255, 255, 255);
}

/* Logo样式 */
.nav-logo {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 18px;
    color: #000;
    text-decoration: none;
}

.nav-logo img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

/* 导航容器样式 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

/* 导航链接列表样式 */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-grow: 1;
}

/* 右侧链接样式 */
.nav-right {
    display: flex;
    align-items: center;
}

/* 导航链接项样式 */
.nav-links li {
    margin: 0 12px;
}

/* 导航链接和右侧链接的文本样式 */
.nav-links a, .nav-right a {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.8);
    font-size: 14px;
    font-weight: 400;
    padding: 8px 12px;
    transition: color 0.2s ease-in-out, font-weight 0.2s ease-in-out;
}

.nav-links a:hover, .nav-right a:hover {
    color: #000;
    font-weight: 500;
}

/* 按钮样式 */
.btn-primary {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #2563eb;
    color: #fff;
}

/* 为了补偿固定导航栏的高度 */
body {
    padding-top: 60px;
}

/* 汉堡菜单按钮样式 */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* 汉堡菜单图标样式 */
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 小屏幕导航容器样式 */
    .nav-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 1);
        height: 0;
        overflow: hidden;
        transition: height 0.5s ease, opacity 0.5s ease;
        z-index: 1000;
        flex-direction: column;
        align-items: flex-end;
        opacity: 0;
    }

    /* 小屏幕导航链接列表样式 */
    .nav-links {
        flex-direction: column;
        width: 100%;
        align-items: flex-end;
        margin-bottom: 32px;
    }

    /* 小屏幕导航链接项和右侧链接样式 */
    .nav-links li, .nav-right {
        margin: 0;
        width: 100%;
        text-align: left;
    }

    /* 调整右侧链接和导航链接的样式 */
    .nav-links a, .nav-right a {
        display: inline-block;
        padding: 8px 16px;
        line-height: 2;
        font-size: 26px;
        font-weight: 600;
        margin-left: 48px;
        margin-top: 4px;
    }

    /* 调整右侧链接的样式 */
    .nav-right {
        order: -1;
        align-self: flex-start;
        width: auto;
        margin-top: 16px;
    }

    /* 右侧链接中的所有元素右对齐 */
    .nav-right > * {
        text-align: left;
    }

    /* 移除第一个导航链接的上边距 */
    .nav-links li:first-child {
        margin-top: 0;
    }

    /* 为所有导航链接添加相同的内边距 */
    .nav-links li, .nav-right {
        padding: 0;
    }

    /* 显示汉堡菜单按钮 */
    .hamburger {
        display: block;
    }

    /* 激活状态下的导航容器样式 */
    .main-nav.active .nav-container {
        height: auto;
        opacity: 1;
    }

    /* 激活状态下的导航链接和右侧链接动画 */
    .main-nav.active .nav-links li, .main-nav.active .nav-right {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* 设置不同的过渡延迟，创造级联效果 */
    .main-nav.active .nav-right { transition-delay: 0.1s; }
    .main-nav.active .nav-links li:nth-child(1) { transition-delay: 0.2s; }
    .main-nav.active .nav-links li:nth-child(2) { transition-delay: 0.3s; }
    .main-nav.active .nav-links li:nth-child(3) { transition-delay: 0.4s; }
    .main-nav.active .nav-links li:nth-child(4) { transition-delay: 0.5s; }
    .main-nav.active .nav-links li:nth-child(5) { transition-delay: 0.6s; }

    /* 激活状态下的导航链接和右侧链接最终样式 */
    .main-nav.active .nav-links li, .main-nav.active .nav-right {
        opacity: 1;
        transform: translateY(0);
    }

    /* 汉堡单动画 */
    .main-nav.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .main-nav.active .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .main-nav.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* 移动端链接hover效果 */
    .nav-links a:hover, .nav-right a:hover {
        color: #000;
        font-weight: 600;
    }
}

/* 底部样式 */
.footer {
    background-color: #f5f5f7;
    padding: 32px 0;
    text-align: center;
    font-size: 12px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.social-media {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.social-media a {
    margin: 0 8px;
    display: inline-block;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.social-media a:hover {
    transform: scale(1.1);
}

.icon-bilibili {
    color: #F16C8D;
    font-size: 28px;
}

.icon-youtube { 
    color: #FF0301;
    font-size: 28px;
}

.icon-tiktok {
    color: #666666;
    font-size: 28px;
}

.icon-zhihu {
    color: #2666FF;
    font-size: 28px;
}

.icon-weixin {
    color: #2AAF67;
    font-size: 28px;
}

.copyright {
    color: #7b7b7b;
    font-size: 12px;
}

.copyright-symbol {
    font-size: 16px;
    vertical-align: middle;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* 修改模态框样式以确保在桌面端显示完整 */
.modal-content {
    width: 90%;
    max-width: 600px;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.modal-image {
    width: auto;
    height: auto;
    max-height: 300px;
    max-width: 100%;
    aspect-ratio: 1900 / 2590;
    object-fit: contain;
    border-radius: 10px;
}

/* 模态框文字样式 */
.modal-text {
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}

/* 增加样式覆盖 */
.iconfont.icon-bilibili,
.iconfont.icon-youtube,
.iconfont.icon-tiktok,
.iconfont.icon-zhihu,
.iconfont.icon-weixin {
    font-size: 28px !important;
}
