/* 导航栏 */
.navbar {
    /* 将单一背景色改为黑色渐变为蓝色的效果 */
    background: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    gap: 15px;
}

.logo .title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.logo .subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    display: block;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #cccccc;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.first {
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.first::after {
    width: 100%;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ccff, #0066ff);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 二维码悬停效果 */
.nav-links li {
    position: relative;
    display: inline-block;
}

.qrcode-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin: 0;
    display: none;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 204, 255, 0.2);
    z-index: 1000;
    border: 1px solid rgba(0, 204, 255, 0.4);
    padding: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.qrcode-popup::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0, 204, 255, 0.4);
}

.qrcode-popup span {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #fff;
    margin: 5px 0;
    font-weight: 500;
}

.contact-link:hover + .qrcode-popup,
.qrcode-popup:hover {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

.qrcode-image {
    width: 180px;
    height: 180px;
    display: block;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.qrcode-image:last-child {
    margin-bottom: 0;
}

/* 联系我们链接样式增强 */
.contact-link {
    position: relative;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: rgba(0, 204, 255, 0.1);
    transform: translateY(-2px);
}

/* 浮窗样式 */
.floating-widget {
    position: fixed;
    right: 20px;
    top: 60%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 204, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 移除clip-path，避免影响弹窗 */
}

.widget-item-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 使用clip-path限制显示区域，仅作用于图标 */
    clip-path: circle(50% at 50% 50%);
    overflow: hidden;
}

.widget-item:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 204, 255, 0.8);
}

.widget-icon {
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.widget-popup {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 204, 255, 0.5);
    border-radius: 8px;
    padding: 15px;
    display: none;
    min-width: 200px;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

.widget-popup::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid rgba(0, 204, 255, 0.5);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.widget-popup::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid rgba(0, 0, 0, 0.9);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.widget-item.active .widget-popup {
    display: block;
}

.widget-item.active {
    background: rgba(0, 204, 255, 0.3);
    border-color: rgba(0, 204, 255, 1);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
}

/* QQ群弹窗样式 */
.qq-popup {
    width: 210px;
}

.qq-group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qq-group-list p {
    color: white;
    margin: 0;
    font-size: 14px;
    text-align: center;
}

.popup-qrcode {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.popup-qrcode:hover {
    transform: scale(1.05);
}

.popup-qrcode-ios {
    margin-bottom: 15px;
}

/* 微信公众号弹窗样式 */
.wechat-popup {
    width: 250px;
}

.wechat-popup p {
    color: white;
    margin: 10px 0 0 0;
    font-size: 14px;
    text-align: center;
}

/* 图片放大预览样式 */
.image-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview.active {
    display: flex;
    opacity: 1;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.preview-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-preview.active .preview-image {
    transform: scale(1);
}

/* 专门放大QQ悬浮窗的容器和图标 */

.qq-group .widget-icon {
    width: 30px;
    height: 30px; /* 图标放大，但容器大小不变 */
}

/* 适配移动设备 */
@media (max-width: 768px) {
    .floating-widget {
        right: 10px;
        gap: 5px;
    }
    
    .widget-item {
        width: 45px;
        height: 45px;
    }
    
    .widget-icon {
        width: 25px;
        height: 25px;
    }
    
    .widget-popup {
        right: 60px;
        min-width: 180px;
        padding: 10px;
    }
}

/* 返回顶部按钮样式 - 与index.html保持一致 */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}