/* 导航栏样式 */

/* 导航栏 */
.navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-green);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    height: 80px; /* 固定导航栏高度，防止内容加载时高度变化 */
    min-height: 80px; /* 确保最小高度 */
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 15px; /* 减少导航栏容器的左右内边距 */
    height: 100%; /* 使容器占满导航栏高度 */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.logo:hover {
    color: var(--accent-green);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* 分类导航 */
.category-nav {
    flex: 1;
    min-width: 0;
    overflow: visible; /* 不需要滚动 */
    margin: 0 10px; /* 调整边距 */
}

.category-nav .category-container {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    overflow: visible;
}

.category-nav .category-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px; /* 减少按钮之间的间隙 */
    justify-content: flex-start; /* 左对齐 */
    max-width: none;
    margin: 0;
    overflow-x: visible; /* 不需要水平滚动 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0; /* 添加一些垂直内边距 */
}

.category-nav .category-list::-webkit-scrollbar {
    display: none;
}

/* 分类按钮悬停效果 */
.category-nav .category-btn {
    padding: 6px 14px; /* 调整内边距 */
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.15);
    color: var(--white);
    border-radius: 20px; /* 调整圆角 */
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0; /* 防止按钮被压缩 */
}

.category-nav .category-btn:hover,
.category-item.has-subcategory:hover .category-btn {
    background: rgba(0, 200, 83, 0.15);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* 移除选中效果 */
.category-nav .category-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-color: rgba(0, 200, 83, 0.15);
}

/* 子分类菜单 */
.category-item.has-subcategory {
    position: relative;
}

/* 修复后的子分类菜单样式 - 使用相对定位 */
.subcategory-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 250px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 200, 83, 0.3);
    border-radius: 10px;
    padding: 8px 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.category-item.dropdown-open .subcategory-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.subcategory-item {
    display: block;
    padding: 8px 16px;
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 8px;
}

.subcategory-item:hover {
    background: rgba(0, 200, 83, 0.2);
    color: var(--accent-green);
}

/* 移除子分类选中效果 */
.subcategory-item.active {
    background: transparent;
    color: var(--white);
}

/* 导航栏右侧区域 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px; /* 减少间隙 */
    flex: 0 0 auto; /* 不放大也不缩小 */
    min-width: 0;
    overflow: visible; /* 确保子菜单不被裁剪 */
    justify-content: flex-end; /* 将右侧内容推到最右边 */
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 25px;
    padding: 8px 12px; /* 调整内边距 */
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    width: 220px; /* 增加搜索框宽度 */
}

.search-box:hover,
.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--white); /* 统一使用白色文字 */
    font-size: 14px;
    width: 100%; /* 使用剩余空间 */
    outline: none;
    padding: 5px 0;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6); /* 统一使用白色半透明占位文字 */
}

.search-btn {
    background: var(--primary-color); /* 改为实心背景 */
    border: none;
    color: var(--secondary-color); /* 改为黑色文字 */
    cursor: pointer;
    font-size: 16px;
    padding: 8px 15px; /* 调整内边距 */
    margin-left: 8px; /* 与输入框的间距 */
    transition: var(--transition);
    flex-shrink: 0; /* 防止按钮被压缩 */
    border-radius: 20px; /* 圆角矩形 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold; /* 加粗文字 */
    white-space: nowrap; /* 防止文字换行 */
}

.search-btn:hover {
    background: var(--accent-green); /* 悬停时的背景色 */
    color: var(--secondary-color);
    transform: scale(1.05); /* 轻微放大效果 */
}

/* VIP链接 */
.vip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(45deg, var(--accent-green), var(--accent-light-green));
    color: var(--secondary-color) !important;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.vip-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.vip-link i {
    font-size: 14px;
}

/* 用户操作区域 */
.user-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px; /* 减少间隙 */
    justify-content: flex-end; /* 靠右对齐 */
    margin-left: auto; /* 推到最右边 */
}

.navbar-login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(45deg, var(--accent-green), var(--accent-light-green));
    color: var(--black);
    text-decoration: none;
    border-radius: 18px;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.2);
    white-space: nowrap;
    min-width: 100px;
}

.navbar-login-btn:hover {
    background: linear-gradient(45deg, var(--accent-light-green), var(--accent-green));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.navbar-login-btn i {
    font-size: 14px;
}

.navbar-login-btn span {
    font-weight: 600;
}

/* 用户下拉菜单 */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    min-width: 160px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-id {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    margin: 0 auto;
}

.user-id span {
    color: var(--accent-green);
    font-weight: 600;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-green);
}

.dropdown-item i {
    font-size: 16px;
    width: 16px;
    text-align: center;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
}

/* 用户下拉菜单中的VIP信息 */
.user-vip-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vip-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
}

.vip-item:last-child {
    margin-bottom: 0;
}

.vip-type {
    color: #FFD700;
    font-weight: 600;
}

.vip-expiry {
    color: rgba(255, 255, 255, 0.7);
}

/* 今日可下载次数信息 */
.download-count-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

.download-count-label {
    color: rgba(255, 255, 255, 0.7);
}

.download-count-value {
    color: var(--accent-green);
    font-weight: 600;
}

/* 响应式设计 */
/* 已移除移动端样式，确保移动端与PC端显示效果完全一致 */

/* 已移除移动端样式，确保移动端与PC端显示效果完全一致 */

/* 移除移动端分类导航优化 */
/* 移除移动端搜索框优化 */
/* 移除移动端登录按钮优化 */
/* 移除移动端用户按钮优化 */
/* 移除移动端搜索框进一步优化 */
/* 移除超小屏幕优化 */