/* 基本重置和全局样式 */

:root {
    --primary-color: #6a11cb; /* 恢复为紫色 */
    --secondary-color: #2575fc; /* 恢复为蓝色 */
    --background-color: #f0f2f5;
    --surface-color: rgba(255, 255, 255, 0.85);
    --text-color: #333;
    --heading-color: #1a1a1a;
    --border-color: rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-md: 0 8px 15px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 3rem; font-weight: 600;}

#nodes h2 {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

.ip-count {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 400;
    margin-left: 12px;
}

section {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 10px 20px; /* 减小内边距 */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: none; /* 确保没有边框 */
    font-size: 1rem; /* 调整字体大小 */
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); /* 恢复默认按钮样式 */
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 为 hero 区域的按钮定义独立的清新颜色 */
.hero-buttons .btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease; /* 更新过渡效果 */
    color: #fff;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(92%); /* 鼠标悬停时轻微变暗 */
}

.btn-login {
    background-color: #0084ff; /* 清新蓝色 */
}

.btn-forum {
    background-color: #38f9d7; /* 清新绿色 */
}

.btn-misc {
    background-color: #ffc837; /* 清新橙色 */
}

/* 导航栏 */
.navbar {
    background-color: var(--surface-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero区域 */
#hero {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

#hero .container {
    position: relative;
    z-index: 1;
}

#hero h1 {
    color: #fff;
    font-weight: 700;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px; /* 按钮之间的间距 */
    flex-wrap: wrap; /* 在小屏幕上换行 */
    margin-top: 1.5rem; /* 与上方段落的间距 */
}

/* 用户IP信息 */
#user-ip {
    text-align: center;
    padding-bottom: 40px; /* 调整与下方元素的间距 */
}

#ip-info {
    display: inline-block; /* 让容器根据内容调整宽度 */
    background-color: #ffffff;
    padding: 15px 25px; /* 进一步减小内边距 */
    border-radius: 10px; /* 减小圆角 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.07); /* 调整阴影 */
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#ip-info:hover {
    transform: translateY(-3px); /* 减小悬浮效果 */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.09); /* 调整悬浮阴影 */
}

#ip-info p {
    font-size: 0.85rem; /* 再次缩小字体 */
    font-weight: 500; /* 调整字重 */
    color: #555; /* 调整字体颜色 */
    line-height: 1.7; /* 调整行高 */
}

#ip-info .ip-label {
    color: #999; /* 为标签设置一个较浅的颜色 */
    font-weight: 400; /* 让标签的字重变细 */
}

#ip-info p:first-child {
    margin-bottom: 3px; /* 进一步减小IP之间的间距 */
}

/* 特性区域 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.feature-item {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-item .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item .icon svg {
    width: 32px;
    height: 32px;
    stroke: url(#icon-gradient);
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-item h3 {
    margin-top: 0.5rem;
    font-weight: 600;
}

/* 地图区域 */
#map-section {
    text-align: center;
}

#world-map svg {
    width: 100%;
    height: 100%;
}

.datamaps-bubble:hover {
    cursor: pointer;
}

.datamaps-hoverover {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
    font-family: var(--font-family) !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    pointer-events: none; /* 避免提示框自身干扰鼠标事件 */
}

/* 节点列表 */
#nodes {
    background-color: transparent;
}
#node-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    max-width: 400px; /* 缩小容器宽度 */
    margin: 0 auto; /* 让容器自身居中 */
    text-align: center; /* 让内部文本（IP）居中 */
}
.node-ip-list {
    list-style: none;
    padding: 0;
}
.node-ip-list li {
    padding: 8px 5px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    white-space: nowrap; /* 确保内容不换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 显示省略号 */
}

.node-ip-list li:hover {
    background-color: #f8f9fa;
}

/* 价格和联系区域 */
#pricing, #contact {
    text-align: center;
}

#jiagebiao-container, #qq-group-container {
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 页脚 */
.footer {
    background-color: #ffffff; /* 白色背景 */
    color: #6c757d; /* 深灰色文字 */
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef; /* 添加一个顶部边框作为分隔 */
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* 在小屏幕上允许换行 */
    gap: 15px; /* 元素之间的间距 */
}

.footer-toggle-btn {
    display: none; /* 默认在桌面上隐藏 */
}

.footer-link {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #007bff; /* 鼠标悬停时变色 */
}

.footer-icon {
    width: 16px; /* 统一图标大小 */
    height: 16px;
    margin-right: 8px; /* 图标和文字之间的间距 */
}

.footer-separator {
    color: #dee2e6; /* 分隔符颜色 */
}

/* 响应式调整，让手机上分隔符和版权信息上下排列 */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0 5px; /* 减小手机端页脚的上下内边距 */
        margin-top: 20px;
    }

    .footer .container {
        position: relative;
        padding-bottom: 25px; /*为展开按钮留出空间，防止遮挡*/
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px; /* 减小链接之间的垂直间距 */
    }

    .hero-buttons {
        gap: 10px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .footer-link {
        font-size: 0.8rem; /* 减小链接字体大小 */
    }

    .footer-icon {
        width: 14px; /* 同步减小图标大小 */
        height: 14px;
        margin-right: 6px; /* 减小图标与文字的间距 */
    }

    .footer-separator {
        display: none; /* 在手机上隐藏竖线分隔符 */
    }
    
    .footer-links-collapsible {
        display: none; /* 默认隐藏可折叠的链接 */
        flex-direction: column;
        gap: 8px; /* 统一间距 */
        align-items: center;
    }

    .footer-links-collapsible.expanded {
        display: flex; /* 点击后显示 */
    }

    .footer-toggle-btn {
        display: block;
        position: absolute;
        bottom: -5px; /* 调整按钮位置 */
        left: 50%;
        transform: translateX(-50%);
        background-color: transparent; /* 去除背景色 */
        color: #888; /* 设置为灰色 */
        border: none;
        border-radius: 0; /* 去除圆形 */
        width: auto;
        height: auto;
        font-size: 24px; /* 适当调整字体大小以便点击 */
        line-height: 1;
        cursor: pointer;
        box-shadow: none; /* 去除阴影 */
        padding: 5px 10px; /* 增加点击区域 */
    }
}

/* 返回顶部按钮 */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    width: 50px;
    height: 50px;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s, transform 0.3s;
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

/* 定义SVG渐变 */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
}
