* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #141428;
    color: #ffffff;
    padding-top: 60px;
    padding-bottom: 60px;
    line-height: 1.5;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center; /* 修改为居中（原为 space-between） */
    padding: 15px;
    background: #141428;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid #202033;
    height: 60px;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.search-container {
    flex: 1;
    margin: 0 10px;
}

.search-input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #9370db;
    border-radius: 20px;
    outline: none;
    background-color: #232453;  /* 使用纯色背景 */
    color: #ffffff;
    box-shadow: 0 0 10px rgba(147, 112, 219, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.45);
    border-color: #40ffff;
    background-color: rgba(35, 36, 83, 0.9);
}

.category-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #888893;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.category-btn:hover {
    color: #ffffff;
}

.category-modal {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: #141428;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

.category-modal.active {
    left: 0;
}

.category-content {
    padding: 20px;
    padding-top: 60px;  /* 为顶部留出空间 */
}

.category-content h3 {
    font-size: 18px;
    color: #40ffff;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(147, 112, 219, 0.3);
}

.category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 两列布局 */
    gap: 15px;
}

.category-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    color: #ffffff;
    text-decoration: none;
    background: #202033;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid #202033;
}

.category-links a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* 添加关闭按钮 */
.category-content::before {
    content: '×';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #40ffff;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-content::before:hover {
    background: rgba(64, 255, 255, 0.1);
}

/* 添加横向滑动分类导航样式 */
.scroll-nav {
    background: #141428;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    z-index: 99;
    padding: 15px 15px;
    padding-top: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-nav::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

.scroll-nav-wrapper {
    display: inline-flex;
    gap: 15px;
}

.scroll-nav-item {
    display: inline-block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: #202033;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #202033;
}

.scroll-nav-item:hover {
    color: #ffffff;
    opacity: 0.9;
}

.scroll-nav-item.active {
    color: #40ffff;
    background: #2a2b5e;  /* 活动状态使用稍亮的背景色 */
    border-color: #40ffff;
    box-shadow: 0 0 10px rgba(64, 255, 255, 0.2);
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin-top: 0;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}

.carousel-wrapper {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    position: relative;
    width: 33.333%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, 
        rgba(20, 20, 40, 0.9), 
        rgba(20, 20, 40, 0));
    color: #fff;
}

.slide-content h2 {
    font-size: 1em;
    margin-bottom: 5px;
    color: #40ffff;  /* 直接使用纯色 */
    text-shadow: 0 0 10px rgba(64, 255, 255, 0.3);  /* 减少发光效果 */
}

.slide-content p {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(147, 112, 219, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(147, 112, 219, 0.4);
    box-shadow: 0 0 15px rgba(64, 255, 255, 0.3);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #40ffff;
    box-shadow: 0 0 10px rgba(64, 255, 255, 0.5);
}

/* 轮播图按钮样式 */
.carousel-container {
    position: relative;
}

.prev-btn,
.next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 确保轮播图容器溢出隐藏 */
.carousel-container {
    overflow: hidden;
}

/* 轮播图过渡效果 */
.carousel-wrapper {
    transition: transform 0.5s ease-in-out;
}

/* 图文列表样式 */
.post-container {
    padding: 15px 15px 30px;
    background: #141428;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.post-item {
    background: #202033;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.3s ease;
    border: 1px solid #202033;
}

.post-item:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

.post-image {
    position: relative;
    width: 100%;
    padding-top: 140% !important; /* 4:3 比例 */
    overflow: hidden;
}

.post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-image img {
    transform: scale(1.05);
}

.post-title {
    font-size: 14px;
    color: #ffffff;
    font-weight: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.post-date, .post-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-date i, .post-views i {
    color: #40ffff;
    text-shadow: none;  /* 移除文字阴影 */
    font-size: 12px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .carousel-container {
        height: 250px;
        border-radius: 8px;
        margin: 15px 15px 0;
        width: calc(100% - 30px);
    }
    
    .post-title {
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .carousel-container {
        height: 300px;
    }
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #1a1a2e;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    padding: 8px 0;
    width: 20%;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: #40ffff;
}

.nav-item.active i {
    text-shadow: 0 0 10px rgba(64, 255, 255, 0.3);
}

/* 加载更多样式 */
.load-more {
    grid-column: 1 / -1;
    text-align: center;
   
}

.loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #40ffff;
}

.loading-spinner i {
    font-size: 20px;
}

.loading-spinner span {
    font-size: 14px;
}
