/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navbar styles */
.navbar {
    background-color: #F7F5FF;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 保持这个，它会将 navbar-left 和 navbar-actions 分开 */
    margin: 0 auto;
    padding: 0.5rem 4rem;
}

/* 新增样式 */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 30px; /* 控制 logo 和 menu 之间的间距 */
}

.navbar-logo img {
    height: 30px;
    display: block;
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-links {
    display: flex;
    gap: 25px;
}

.navbar-links li a {
    color: #5c5c5c;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-links li a:hover {
    color: #6d4aff;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #6d4aff;
    color: white;
}

.btn-primary:hover {
    background-color: #5a3fd8;
}

.btn-secondary {
    color: #6d4aff;
}

.btn-secondary:hover {
    background-color: rgba(109, 74, 255, 0.1);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #5c5c5c;
    cursor: pointer;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: white;
    z-index: 1100;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #5c5c5c;
    cursor: pointer;
}

.mobile-menu-links {
    padding: 20px;
}

.mobile-menu-links li {
    margin-bottom: 15px;
}

.mobile-menu-links li a {
    display: block;
    padding: 10px 0;
    color: #5c5c5c;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu-links li a:hover {
    color: #6d4aff;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sticky navbar */
.navbar.sticky {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-links a.active {
    color: #6d4aff;
    font-weight: bold;
}

/* Main content spacing */
main {
    margin-top: 51.5px;
}

.picture {
    background-color: #F7F5FF;
    padding-left: 20rem;
    padding-right: 20rem;
    /* 可选：让图片自适应容器宽度 */
    display: flex;
    justify-content: center;
    align-items: center;
}
.picture img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* 可选美化 */
    object-fit: cover;  /* 可选：让图片填满容器 */
}

/* 国家节点部分样式 */
.countries-section {
    padding: 4rem 4rem;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
}

.ip-type-container {
    margin-bottom: 4rem;
}

.ip-type-title {
    font-size: 2rem;
    color: #6d4aff;
    margin-bottom: 1.5rem;
    border-left: 4px solid #6d4aff;
    padding-left: 1rem;
}

.benefits-container {
    margin-bottom: 2rem;
}

.benefit-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 1000px;
}

.countries-subtitle {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 1.5rem;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: #f8f8f8;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.country-flag {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.flag-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.country-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* Responsive styles */
@media (max-width: 768px) {
    .navbar-menu {
        display: block;
    }
    
    .navbar-links {
        gap: 0; /* 移除间距 */
    }
    
    .navbar-links li {
        display: none; /* 默认隐藏所有链接 */
    }
    
    .navbar-links li:first-child {
        display: block; /* 只显示第一个链接（Why OneVPN） */
    }

    .navbar-actions {
        display: none;
    }

    .navbar-container {
        justify-content: space-between;
        padding: 0.5rem 20px;
    }

    .navbar-toggle {
        display: block;
        margin-left: auto;
    }

    main {
        margin-top: 46px;
    }

    /* 添加移动端图片容器样式 */
    .picture {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .picture img {
        max-width: 100%;
        width: auto;
        height: auto;
    }
    
    /* 移动端国家节点部分样式 */
    .countries-section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .ip-type-title {
        font-size: 1.5rem;
    }
    
    .benefit-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .countries-subtitle {
        font-size: 1.2rem;
    }
    
    .countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    
    .country-card {
        padding: 1rem;
    }
    
    .country-flag {
        font-size: 2rem;
    }
    
    .country-name {
        font-size: 0.9rem;
    }
}

/* 全局滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: #d1cfff;
    border-radius: 6px;
}

::-webkit-scrollbar-track {
    background: #f7f5ff;
    border-radius: 6px;
}

/* Firefox 支持 */
* {
    scrollbar-width: thin;
    scrollbar-color: #d1cfff #f7f5ff;
}