/* 首页样式 */

/* 防止子菜单导致页面滚动 */
body {
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 确保主内容区域不会因为子菜单而产生滚动 */
.main-content {
    position: relative;
    z-index: 1;
    background-color: var(--white);
}

/* 导航栏布局调整 */
.navbar {
    overflow: visible !important; /* 确保子菜单可以显示 */
    height: 80px; /* 固定导航栏高度 */
    min-height: 80px; /* 确保最小高度 */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    position: relative; /* 重要：为子菜单提供定位基准 */
    overflow: visible; /* 确保子菜单不被裁剪 */
    height: 100%; /* 使容器占满导航栏高度 */
}

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

/* 搜索框 */
.search-box {
    flex-shrink: 0;
    width: 220px; /* 增加搜索框宽度 */
    margin-left: 20px; /* 向右移动搜索框 */
}

.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); /* 修改占位文字颜色 */
}

/* 分类导航 */
.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;
}

/* 壁纸展示区域 */
.wallpaper-section {
    margin-bottom: 50px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
}

.current-category {
    color: var(--secondary-color);
}

/* 壁纸容器 */
.wallpaper-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

/* 骨架屏网格 */
.image-grid.skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    justify-content: center;
}

/* 为图片容器添加骨架屏效果 */
.image-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

/* 骨架屏图片项 */
.image-item.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: none;
    min-height: 200px;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    opacity: 0;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.7);
    height: 40px;
}

/* 图片样式 */
.image-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    min-height: 150px;
}

/* 为纵向图片容器添加特殊处理 */
.image-wrapper.portrait {
    aspect-ratio: 9/16;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto; /* 高度自适应 */
}

.image-wrapper.portrait img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer; /* 添加指针样式表示可点击 */
}

/* 手机标识 */
.portrait-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
}

.portrait-badge i {
    font-size: 14px;
}

/* 悬停效果 */
.image-item:hover .image-wrapper img {
    transform: scale(1.05); /* 悬停放大效果 */
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-info {
    margin-top: auto;
    padding: 5px;
    border-radius: 8px;
}

.image-info h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 隐藏尺寸信息 */
.image-info p {
    display: none;
}

.image-stats {
    display: none;
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 16px;
    min-height: 60vh; /* 确保无数据状态也在视口垂直居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.no-data i {
    font-size: 48px;
    color: rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    display: block;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-green);
    color: var(--black);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-light-green);
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 200, 83, 0.4);
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 25px 0 15px; /* 减少页脚内边距 */
    margin-top: 40px; /* 减少页脚上边距 */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; /* 减少网格间隙 */
    margin-bottom: 20px; /* 减少页脚内容下边距 */
}

.footer-section h3,
.footer-section h4 {
    color: var(--accent-green);
    margin-bottom: 15px;
}

.footer-section h3 {
    font-size: 20px;
}

.footer-section h4 {
    font-size: 16px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

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

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

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

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

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