/* ========================================
   导航栏样式 - ilovepdf 风格
   ======================================== */

.navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    transition: all 0.3s ease;
}

.logo a:hover {
    opacity: 0.85;
}

.logo-image {
    height: 48px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

.logo-icon {
    font-size: 36px;
}

.logo-text {
    font-size: 30px;
    font-weight: 400;
}

.logo-text strong {
    font-weight: 700;
    color: #a31e22;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 导航链接容器 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 导航链接 */
.nav-link {
    color: #374151;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #a31e22;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

/* 语言切换器 */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: #a31e22;
    color: #a31e22;
    background: #fef2f2;
}

.lang-btn .dropdown-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.lang-btn:hover .dropdown-icon {
    transform: translateY(2px);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: #fef2f2;
    color: #a31e22;
}

.lang-option .flag {
    font-size: 20px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover span {
    background: #a31e22;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* ========================================
   响应式设计
   ======================================== */

/* 移动端菜单遮罩层 - 极简风格 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* 轻盈的遮罩 */
    backdrop-filter: blur(1px); /* 轻微模糊 */
    -webkit-backdrop-filter: blur(1px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 12px 16px;
    }
    
    .logo a {
        font-size: 26px;
    }
    
    .logo-image {
        height: 44px;
    }
    
    .logo-icon {
        font-size: 30px;
    }
    
    .logo-text {
        font-size: 26px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -50%; /* 宽度的一半 */
        width: 50%; /* 屏幕宽度的一半 */
        max-width: 280px; /* 最大宽度限制 */
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 64px 16px 20px; /* 精简内边距 */
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08); /* 轻盈的阴影 */
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
        position: relative;
        padding: 4px; /* 缩小按钮 */
    }
    
    .mobile-menu-btn span {
        width: 22px; /* 缩小线条宽度 */
        height: 2px; /* 缩小线条高度 */
    }
    
    /* 汉堡菜单按钮激活状态优化 */
    .mobile-menu-btn.active {
        position: fixed;
        right: 12px;
        top: 12px;
    }
    
    .mobile-menu-btn.active span {
        background: #a31e22;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translateY(8px); /* 调整 X 形状 */
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-8px);
    }
    
    /* 导航链接在移动端 */
    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px 0;
        font-size: 15px;
    }
    
    .nav-link::after {
        display: none; /* 移动端不显示下划线效果 */
    }
    
    /* 认证区域在移动端的样式优化 - 极简风格 */
    .nav-menu .auth-section {
        width: 100%;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid #f3f4f6; /* 更淡的分隔线 */
    }
    
    .lang-switcher {
        width: 100%;
    }
    
    .lang-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 12px; /* 精简内边距 */
        font-size: 14px;
        border: 1px solid #f3f4f6; /* 更淡的边框 */
        background: #fafafa; /* 更淡的背景 */
    }
    
    .lang-btn:hover {
        background: #f5f5f5;
        border-color: #e5e7eb;
    }
    
    .lang-btn .dropdown-icon {
        font-size: 9px; /* 缩小箭头 */
    }
    
    .lang-dropdown {
        position: static;
        box-shadow: none;
        border: none; /* 去掉边框 */
        border-radius: 6px; /* 更小的圆角 */
        margin-top: 8px;
        background: transparent; /* 透明背景 */
        padding: 0;
    }
    
    .lang-option {
        padding: 10px 12px; /* 精简内边距 */
        font-size: 14px;
        border-radius: 6px; /* 每个选项独立圆角 */
        margin-bottom: 2px; /* 轻微间隔 */
        background: #fafafa;
    }
    
    .lang-option:hover {
        background: #fef2f2;
    }
    
    .lang-option .flag {
        font-size: 16px; /* 缩小 emoji */
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 38px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .nav-menu {
        width: 65%; /* 小屏幕上占 65% */
        max-width: none;
        right: -65%;
        padding: 60px 14px 16px; /* 进一步精简 */
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        padding: 3px;
    }
    
    .mobile-menu-btn span {
        width: 20px;
        height: 2px;
    }
    
    .mobile-menu-btn.active {
        right: 10px;
        top: 10px;
    }
    
    .lang-btn {
        padding: 9px 10px;
        font-size: 13px;
    }
    
    .lang-btn .dropdown-icon {
        font-size: 8px;
    }
    
    .lang-option {
        padding: 9px 10px;
        font-size: 13px;
    }
    
    .lang-option .flag {
        font-size: 15px;
    }
}

