body {
    -webkit-user-select: none; /* Safari 和 Chrome 浏览器 */
    -moz-user-select: none; /* Firefox 浏览器 */
    -ms-user-select: none; /* IE和Edge浏览器 */
    user-select: none; /* 标准语法 */
}
body,
html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #e8e9f5;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 禁止页面滚动 */
}

.navbar {
    width: 100%;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-sizing: border-box;
    /* 确保内边距不影响宽度 */
}

.navbar .menu {
    font-size: 20px;
    margin-right: -10px;
    /* 如果需要，可以调整这个值 */
}

.navbar .logo {
    font-size: 18px;
    font-weight: bold;
}

.navbar .flash-btn {
    font-size: 20px;
    cursor: pointer;
}

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@keyframes shrink-to-line {
    0% {
        width: 50px;
        /* 开始状态为圆形 */
        height: 50px;
        /* 初始高度 */
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    10% {
        width: 10px;
        /* 终点宽度 */
        height: 50px;
        /* 终点高度 */
        border-radius: 10px;
        /* 终点圆角 */
        transform: translate(-50%, -50%);
    }

    20% {
        width: 20px;
        /* 终点宽度 */
        height: 50px;
        /* 终点高度 */
        border-radius: 10px;
        /* 终点圆角 */
        transform: translate(-50%, -50%);
    }

    25% {
        width: 18px;
        /* 终点宽度 */
        height: 50px;
        /* 终点高度 */
        border-radius: 10px;
        /* 终点圆角 */
        transform: translate(-50%, -50%);
    }

    27% {
        width: 20px;
        /* 终点宽度 */
        height: 50px;
        /* 终点高度 */
        border-radius: 10px;
        /* 终点圆角 */
        transform: translate(-50%, -50%);
    }

    100% {
        width: 20px;
        /* 稍微超过终点的宽度，制造回弹效果 */
        height: 50px;
        /* 高度保持不变 */
        border-radius: 25px;
        /* 中间状态的圆角，过渡到线的形状 */
        transform: translate(-50%, -50%);
    }
}

@keyframes line-to-circle {
    0% {
        width: 10px;
        /* 竖线起始宽度 */
        height: 50px;
        /* 竖线高度 */
        border-radius: 10px;
        /* 竖线圆角 */
        transform: translate(-50%, -50%);
    }

    50% {
        width: 15px;
        /* 竖线中间稍宽的状态，制造回弹效果 */
        height: 50px;
        border-radius: 10px;
        transform: translate(-50%, -50%);
    }

    100% {
        width: 50px;
        /* 结束状态为圆形 */
        height: 50px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }
}

@keyframes expand-circle {
    0% {
        width: 0px;
        /* 开始状态更小的宽度 */
        height: 0px;
        /* 开始状态更小的高度 */
        opacity: 1;
        /* 开始时不可见 */
    }

    90% {
        opacity: 1;
        /* 中间变为完全可见 */
    }

    100% {
        width: 20px;
        /* 结束状态的宽度 */
        height: 20px;
        /* 结束状态的高度 */
        opacity: 1;
        /* 保持可见 */
    }
}


.vpn-toggle:before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
    /* 关闭transition，因为我们将使用animation */
    transform-origin: 50% 50%;
    /* 确保变换是围绕中心点进行的 */
}

.vpn-toggle.connected:before {
    /* 应用合并后的动画 */
    animation: shrink-to-line 1s forwards;
    background-color: white;
    /* 确保动画结束后伪元素是白色的 */
}

.vpn-toggle:not(.connected).animate:before {
    animation: line-to-circle 0.5s forwards;
    /* 从线到圆的动画，当 animate 类存在时 */
}

.vpn-toggle:not(.connected).animate:after {
    animation: expand-circle 0.5s forwards;
    /* 小圆从小到大的动画，当 animate 类存在时 */
}

/* 新增的CSS代码 */
.vpn-toggle:after {
    content: '';
    display: block;
    width: 20px;
    /* 红色小圆的直径 */
    height: 20px;
    /* 红色小圆的直径 */
    background-color: #ff4d4d;
    /* 红色背景 */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: none;
    transition: opacity 0.3s, visibility 0s 0.3s;
    /* 增加 visibility 以保证点击穿透 */
}

/* 连接状态下红色小圆消失的CSS代码 */
.vpn-toggle.connected:after {
    opacity: 0;
    visibility: hidden;
    /* 确保伪元素不会影响点击 */
}



.vpn-toggle {
    border: none;
    background-color: #ff4d4d;
    /* 初始红色背景 */
    padding: 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 30px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    line-height: 60px;
    position: relative;
    /* 为伪元素定位提供基准 */
    transition: background-color 0.5s;
    /* 过渡动画效果 */
}

/* 连接后的绿色背景 */
.vpn-toggle.connected {
    background-color: #4CAF50;
    /* 绿色背景 */
}

/* 隐藏文字，只保留背景和伪元素 */
.vpn-toggle.connected,
.vpn-toggle {
    font-size: 0;
}




.vpn-status {
    font-family: 'Courier New', Courier, monospace; /* 使用常见的等宽字体 */
    background-color: black;
    color: white;
    padding: 16px 32px;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    margin: 20px 2px;
    cursor: pointer;
    padding: 20px;
    border: none; /* 移除边框 */
    border-radius: 25px; /* 更圆润的边角 */
    box-shadow: 0 4px 6px rgba(107, 0, 150, 0.344); /* 加深阴影 */
    opacity: 0;
    animation: fadeIn 1s forwards; /* 添加淡入效果 */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* 文字阴影效果 */
}



.drawer {
    height: 50vh;
    /* 根据需要调整抽屉的高度 */
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s;
    z-index: 1000;
}

.drawer-content {
    display: flex;
    justify-content: space-between;
    height: 100%;
    /* 允许滑动的区域设置为100%高度 */
    overflow: hidden;
    /* 防止内部元素溢出显示 */
}

.drawer-title {
    text-align: center;  /* 文字居中对齐 */
    width: 100%;  /* 确保它占满容器宽度 */
    padding: 0px 0;  /* 添加上下填充，视视觉效果调整 */
    font-size: 18px;  /* 可以根据需要调整字体大小 */
    font-weight: bold;  /* 加粗字体，突出显示 */
    border-bottom: 2px solid #ccc;
    /* 在国家节点容器底部添加分割线 */
    padding-bottom: 10px;
    padding-top: 10px;
}

.drawer-column {
    width: 50%;
    height: 100%;
    /* 设置高度100%来限制滑动区域 */
    overflow-y: auto;
    /* 允许在Y轴方向上滑动 */
    padding: 10px;
}

.country {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    font-size: 16px;
    /* 调整文字大小以适配国旗表情 */
}

.drawer-column.countries {
    width: 20%;
    /* 可以调整宽度比例来更好地适应内容 */
    font-size: 8px;
    /* 减小字体大小以适应更多内容 */
    padding: 3px;
    box-sizing: border-box;
    overflow: auto;
    /* 如果内容仍然过长，允许滚动 */
    border-right: 1px solid #ddd;
    /* 保留边界线 */
}

/* 国家列表样式 */
.drawer-column.countries .country {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    /* 添加分割线 */
    cursor: pointer;
    /* 显示为可点击 */
}

.drawer-column.nodes {
    width: 100%;
    overflow-y: auto;
}

.country {
    padding: 5px 5px;
    /* 调整内边距 */
    display: block;
    /* 确保每个国家名称独占一行 */
    white-space: nowrap;
    /* 防止名称折行 */
    overflow: hidden;
    /* 隐藏溢出文本 */
    /*text-overflow: ellipsis;  使用省略号表示溢出部分 */
}

.node-section {
    display: none;
    flex-wrap: wrap;
    /* 允许节点换行 */
    width: 100%;
}

.node-section.active {
    display: flex;
    /* 激活时显示为flex布局 */
}

.node-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px; /* 添加一些顶部边距 */
}

  
.node-section {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    /* 确保内容从顶部开始 
    border-bottom: 1px solid #ccc;*/
    /* 在国家节点容器底部添加分割线 */
    padding-bottom: 10px;
    /* 添加一些底部内边距 */
    padding-top: 10px;
    /* 添加一些底部内边距 */
}

.node {
    font-family: 'Courier New', Courier, monospace;
    flex: 0 1 calc(33.33% - 10px);
    /* 设置基础和增长为0，收缩为1 */
    font-size: 12px;
    /* 减小字体大小以避免折行 */
    padding: 8px;
    /* 适当调整内边距 */
    margin: 5px;
    /* 保持适当的外边距 */
    border-radius: 10px;
    background-color: #f0f0f0;
    text-align: center;
    box-sizing: border-box;
    /* 包括padding和border在内的宽度计算 */
    border-bottom: 1px solid #4a4646;
    /* 添加分割线 */
}

/* 如果节点标题需要更加突出，可以特别调整标题字体大小 */
.node span {
    display: block;
    /* 使每个部分都能显示在新的一行 */
    text-align: center;
}


.node:hover {
    background-color: #e0e0e0;
}



.right-drawer {
    position: fixed;
    top: 0;
    right: -100vw;
    /* 设置足够大的值以确保在视窗外 */
    width: 33%;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    transition: right 0.3s;
    padding: 20px;
    z-index: 1000;
}

.menu-item {
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f0f0f0;
}

.navbar .menu {
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

#countdown-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px; /* 增加字体大小 */
    text-align: center;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #6db3f2, #1e69de); /* 添加渐变背景 */
    color: #ffffff; /* 设置文字颜色为白色 */
    border: none; /* 移除边框 */
    border-radius: 25px; /* 更圆润的边角 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* 加深阴影 */
    opacity: 0;
    animation: fadeIn 1s forwards; /* 添加淡入效果 */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* 文字阴影效果 */
}

#countdown-display2 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px; /* 增加字体大小 */
    text-align: center;
    padding: 20px;
    position: fixed;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #6db3f2, #1e69de); /* 添加渐变背景 */
    color: #ffffff; /* 设置文字颜色为白色 */
    border: none; /* 移除边框 */
    border-radius: 25px; /* 更圆润的边角 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* 加深阴影 */
    opacity: 0;
    animation: fadeIn 1s forwards; /* 添加淡入效果 */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* 文字阴影效果 */
    text-align:left;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

  