/* home.css - 完整版 - 已修复图标显示问题 */
:root {
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --accent-color: #f92672;
    --text-color: #f8f9fa;
    --background-color: #121212;
    --card-bg-color: rgba(30, 30, 30, 0.8);
    --card-hover-color: rgba(40, 40, 40, 0.9);
    --shadow-color: rgba(0, 0, 255, 0.2);
    --gradient-start: #3a7bd5;
    --gradient-end: #00d2ff;
    --border-radius: 12px;
    --button-radius: 24px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0.6;
    transition: opacity 0.8s ease;
}

body.page-loaded {
    opacity: 1;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.shape1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    top: -250px;
    left: -250px;
    animation: float 20s ease-in-out infinite;
}

.shape2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, var(--accent-color), var(--gradient-start));
    bottom: -200px;
    right: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

.shape3 {
    width: 500px;
    height: 500px;
    background: linear-gradient(225deg, var(--secondary-color), #9c27b0);
    bottom: 20%;
    left: 10%;
    animation: float 18s ease-in-out infinite 2s;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(50px, 40px) scale(1.05) rotate(5deg);
    }
    66% {
        transform: translate(-30px, 20px) scale(0.95) rotate(-3deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

/* Logo Styles */
.logo a {
    display: inline-block;
    text-decoration: none;
}

.logo-image {
    height: 80px; /* 根据你的图片比例调整 */
    width: auto; /* 保持图片原始比例 */
    transition: all 0.3s ease;
    /* 添加发光效果 */
    filter: drop-shadow(0 0 10px rgba(58, 123, 213, 0.5));
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(58, 123, 213, 0.7));
    animation: pulse 1.5s infinite;
}

@media (max-width: 780px) {
    .logo-image {
        height: 70px;
    }
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 0 5px rgba(58, 123, 213, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(58, 123, 213, 0.8));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(58, 123, 213, 0.5));
    }
}

/* 移除原来的文字渐变样式 */
.logo a::after {
    display: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
    border-radius: var(--border-radius);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Carousel Styles */
.carousel-wrapper {
    position: relative;
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 20px var(--shadow-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 530px; /* 增加高度，防止图片压缩 */
    overflow: hidden;
    border-radius: 20px; /* 更圆润的边角 */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px var(--shadow-color);
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.05);
}

/* 轮播标题和标签样式 */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 25px 25px;
    background: linear-gradient(to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.6) 60%,
    rgba(0, 0, 0, 0) 100%);
    color: white;
    text-align: left;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    transform: translateY(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.carousel-slide:hover .carousel-caption {
    transform: translateY(-5px);
}

.carousel-caption h3 {
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    position: relative;
    transition: text-shadow 0.3s ease;
}

.carousel-slide:hover .carousel-caption h3 {
    animation: glowText 2s infinite;
}

.carousel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 14px;
    padding: 6px 15px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.carousel-caption .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.post-views, .post-replies {
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-view, .icon-reply {
    font-size: 16px;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-view {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}

.icon-reply {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z'/%3E%3C/svg%3E");
}

/* 轮播控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.carousel-control:hover {
    background-color: rgba(58, 123, 213, 0.8);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(58, 123, 213, 0.5);
}

.carousel-control:focus {
    animation: pulse 1.5s infinite;
    outline: none;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* 轮播指示器 - 圆点 */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 12px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dot.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    width: 40px;
    border-radius: 15px;
}

/* 轮播缩略图导航 */
.carousel-thumbnails {
    display: flex;
    gap: 12px;
    margin: 20px auto 0;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--card-bg-color);
    justify-content: center; /* 居中显示缩略图 */
    max-width: 100%;
    background: rgba(30, 30, 30, 0.4);
    border-radius: 20px; /* 圆润边角 */
    backdrop-filter: blur(10px);
    padding: 15px;
}

.carousel-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
    background: var(--card-bg-color);
    border-radius: 10px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.thumbnail {
    flex: 0 0 100px;
    height: 60px;
    border-radius: 12px; /* 更圆润的缩略图 */
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--gradient-start);
    transform: translateY(-5px) scale(1.05);
}

.thumbnail:hover {
    opacity: 0.9;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播计数器 */
.slide-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 10;
    backdrop-filter: blur(5px);
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 分类导航 - 修复版本 */
.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
}

.category-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    width: 240px;  /* 原来200px，调大到240px */
    height: 240px; /* 原来200px，调大到240px */
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: none;
    overflow: visible;
    background: transparent;
    padding: 20px 10px;
}

/* 修复图标显示 */
.category-btn i {
    display: block !important;
    width: 100px;  /* 原来80px，调大到100px */
    height: 100px; /* 原来80px，调大到100px */
    margin: 0 auto 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1); /* 将图标变为白色 */
    transition: all 0.3s ease;
}

.category-btn i[class^="icon-"] {
    display: block !important;
}

/* 具体图标样式 */
.category-btn .icon-discussion {
    background-image: url('/static/icon/play-video.png');
}

.category-btn .icon-share {
    background-image: url('/static/icon/making-love.png');
}

.category-btn .icon-experience {
    background-image: url('/static/icon/woman.png');
}

.category-btn .icon-gallery {
    background-image: url('/static/icon/seductive-dance.png');
}

.category-btn .icon-announcement {
    background-image: url('/static/icon/play-video.png');
}

.category-btn .icon-default {
    background-image: url('/static/icon/play-video.png');
}

/* 悬浮时图标发光效果 */
.category-btn:hover i {
    filter: brightness(0) invert(1) drop-shadow(0 0 15px white);
    transform: scale(1.2);
}

/* 顶部渐变条 - 移除 */
.category-btn::before {
    display: none;
}

/* 悬浮效果 */
.category-btn:hover {
    transform: translateY(-8px);
    box-shadow: none;
    background: transparent;
}

.category-btn:hover::before {
    display: none;
}

/* 文字样式 */
.category-btn span {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    padding: 0;
    background: transparent;
    z-index: 2;
    font-weight: 700;
    font-size: 22px;  /* 原来18px，调大到22px */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white;
    margin: 0;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
    border-radius: 0;
    display: block !important;
}

/* 悬浮时文字效果 */
.category-btn:hover span {
    background: transparent;
    padding: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* 分类内容区 */
.category-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.category-section {
    margin-bottom: 40px;
    transition: transform 0.4s ease;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.category-section:hover .category-header::after {
    width: 180px;
}

.category-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.category-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 25px;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    border-radius: 3px;
}

.view-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background-color: rgba(40, 40, 40, 0.6);
    padding: 8px 16px;
    border-radius: 30px;
}

.view-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-more:hover {
    color: white;
    background-color: rgba(58, 123, 213, 0.7);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.view-more:hover::after {
    transform: translateX(5px);
}

/* 帖子列表 */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.post-card {
    background-color: rgba(40, 40, 40, 0.75);
    border-radius: 24px; /* 更圆润的卡片 */
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    position: relative;
    backdrop-filter: blur(10px);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px var(--shadow-color);
    background-color: rgba(50, 50, 50, 0.85);
}

.post-card:hover::before {
    opacity: 1;
}

.post-card a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-image {
    height: 200px; /* 增加图片高度 */
    overflow: hidden;
    position: relative;
}

.post-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(40,40,40,0.5));
    z-index: 1;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    transition: color 0.3s ease;
}

.post-card:hover .post-title {
    color: white;
    text-shadow: 0 0 15px rgba(58, 123, 213, 0.5);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    opacity: 0.8;
    font-size: 14px;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.8);
}

/* 无帖子提示 */
.no-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background-color: rgba(40, 40, 40, 0.7);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.6);
    grid-column: 1 / -1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

/* 页脚 */
.footer {
    margin-top: 60px;
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 搜索框样式 */
.search-container {
    margin: 20px auto 40px;
    max-width: 800px;
    background: rgba(40, 40, 40, 0.75);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}

.search-input-group {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: none;
    background: rgba(60, 60, 60, 0.8);
    color: white;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(70, 70, 70, 0.9);
    box-shadow: 0 0 15px rgba(58, 123, 213, 0.3);
}

.search-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-button:hover {
    background: linear-gradient(135deg, #4a8be6, #00e0ff);
    box-shadow: 0 0 15px rgba(58, 123, 213, 0.5);
}

.icon-search {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* VR按钮样式 */
.vr-btn {
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: white !important;
    border-radius: 20px;
    padding: 5px 15px !important;
    margin-left: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.vr-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #88d3ce, #6e45e2);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.vr-btn:hover:before {
    opacity: 1;
}

.vr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(110, 69, 226, 0.4);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFromRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideExitLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50px);
        opacity: 0;
    }
}

@keyframes slideExitRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(50px);
        opacity: 0;
    }
}

@keyframes glowText {
    0% {
        text-shadow: 0 0 10px rgba(58, 123, 213, 0.5), 0 0 20px rgba(0, 210, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(58, 123, 213, 0.8), 0 0 30px rgba(0, 210, 255, 0.6);
    }
    100% {
        text-shadow: 0 0 10px rgba(58, 123, 213, 0.5), 0 0 20px rgba(0, 210, 255, 0.3);
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.loaded .carousel-slide.active {
    animation: fadeIn 0.8s ease-out;
}

.carousel-slide.slide-from-right {
    animation: slideFromRight 0.7s ease-out;
}

.carousel-slide.slide-from-left {
    animation: slideFromLeft 0.7s ease-out;
}

.carousel-slide.slide-exit-left {
    animation: slideExitLeft 0.7s ease-out;
}

.carousel-slide.slide-exit-right {
    animation: slideExitRight 0.7s ease-out;
}

.carousel-slide.animated-entry .carousel-caption {
    animation: slideFromRight 0.8s ease-out 0.2s both;
}

/* 淡入效果 */
.fade-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-element.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 打字机效果 */
.carousel-caption.typing-effect h3 {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1s steps(40, end);
}

/* 强调轮播标题 */
.carousel-caption.enhanced-caption {
    transform: translateY(-8px);
}

.carousel-caption.enhanced-caption h3 {
    text-shadow: 0 0 15px rgba(58, 123, 213, 0.8), 0 0 30px rgba(0, 210, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel-container {
        height: 420px;
    }

    .carousel-caption h3 {
        font-size: 22px;
    }

    .category-nav {
        gap: 15px;
    }

    .category-btn {
        width: 180px;  /* 原来160px，调大到180px */
        height: 180px; /* 原来160px，调大到180px */
        padding: 15px 10px 0;
    }

    .category-btn i {
        width: 80px;   /* 原来60px，调大到80px */
        height: 80px;  /* 原来60px，调大到80px */
        margin-bottom: 15px;
    }

    .category-btn span {
        font-size: 18px;  /* 原来16px，调大到18px */
        padding: 0;
    }

    .post-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .carousel-control {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .search-container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 320px;
    }

    .carousel-caption h3 {
        font-size: 18px;
        -webkit-line-clamp: 1;
    }

    .carousel-tags {
        gap: 5px;
    }

    .tag {
        font-size: 11px;
        padding: 4px 10px;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .post-list {
        grid-template-columns: 1fr;
    }

    .category-btn {
        width: 160px;  /* 原来145px，调大到160px */
        height: 160px; /* 原来145px，调大到160px */
        padding: 12px 8px;
    }

    .category-btn i {
        width: 60px;   /* 原来50px，调大到60px */
        height: 60px;  /* 原来50px，调大到60px */
        margin-bottom: 12px;
    }

    .category-btn span {
        font-size: 16px;  /* 原来15px，调大到16px */
        padding: 0;
    }

    .category-header h2 {
        font-size: 22px;
    }

    /* 修复通知弹窗偏右问题，让它往中间靠一点 */
    .notification-dropdown {
        position: absolute;
        top: calc(100% + 8px); /* 挨着按钮下方一点 */
        left: 50%;
        transform: translateX(-50%);
        width: 220px; /* 真·小巧 */
        max-width: 220px; /* 防止超出 */
        z-index: 999;
        border-radius: 10px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
        background: #1f1f1f; /* 确保背景色统一 */
        overflow: hidden;
    }
}

@media (max-width: 360px) {
    .category-btn {
        width: 150px;  /* 原来135px，调大到150px */
        height: 150px; /* 原来135px，调大到150px */
    }

    .category-btn i {
        width: 50px;   /* 原来40px，调大到50px */
        height: 50px;  /* 原来40px，调大到50px */
    }

    .category-btn span {
        font-size: 15px;  /* 原来14px，调大到15px */
        padding: 0;
    }
}