/* 全局样式 - 小红书风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 顶部导航 - 小红书风格 */
.header {
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px;
    max-width: 414px;
    margin: 0 auto;
    height: 72px;
    box-sizing: border-box;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #ff2442;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 26px;
}

.nav-menu {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #ff2442;
}

.nav-menu a.active {
    color: #ff2442;
    font-weight: 600;
}

/* 搜索图标按钮 */
.search-icon-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-btn:hover {
    background: #f0f0f0;
    color: #ff2442;
}

/* 平台分类展示 - 小红书风格 */
.platform-categories {
    background: #fff;
    padding: 16px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.platform-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.platform-scroll::-webkit-scrollbar {
    display: none;
}

.platform-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.platform-item span {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    transition: color 0.2s ease;
}

.platform-item:hover {
    background: #fff;
    border-color: #ff2442;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.15);
}

.platform-item.active {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b7a 100%);
    border-color: #ff2442;
    box-shadow: 0 2px 12px rgba(255, 36, 66, 0.3);
}

.platform-item.active span {
    color: white;
    font-weight: 700;
}

.platform-item.active:hover {
    background: linear-gradient(135deg, #e61e3c 0%, #ff5a6b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 36, 66, 0.4);
}

.platform-item::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.5s ease;
}

.platform-item:hover::before {
    left: 100%;
}

/* 主要内容 */
.main {
    padding: 60px 0 20px 0;
}

/* 搜索框 - 小红书风格 */
.search-section {
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #ff2442;
    background: #fff;
}

.search-btn {
    padding: 12px 20px;
    background: #ff2442;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    background: #e61e3c;
}

/* 筛选栏 - 默认隐藏 */
.filter-bar {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.filter-bar.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-weight: 500;
    color: #666;
    font-size: 13px;
}

.filter-select, .sort-select {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    background: #f8f9fa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.filter-select:focus, .sort-select:focus {
    outline: none;
    border-color: #ff2442;
    background: #fff;
}

/* 案例网格 - 小红书两列瀑布流 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; /* 紧缩两列间距 */
    margin-bottom: 20px;
}

.case-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.case-card:hover {
    transform: translateY(-2px);
    border-color: #ff2442;
}

.case-media {
    position: relative;
    overflow: hidden;
}

.case-image {
    width: 100%;
    height: 280px; /* 进一步拉高图片高度 */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-video {
    width: 100%;
    height: 280px; /* 进一步拉高视频高度 */
    object-fit: cover;
    cursor: pointer;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.case-card:hover .video-play-btn {
    background: rgba(255, 36, 66, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.case-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.case-gallery img {
    width: 100%;
    height: 138px; /* 调整多图高度 */
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.case-content {
    padding: 12px;
}

.case-title {
    font-size: 14px;
    font-weight: 400; /* 标题字体不加粗 */
    color: #333;
    margin-bottom: 6px; /* 紧缩图片和文字距离 */
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 优化作者信息显示 - 头像、管理员和日期并排显示 */
.case-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
    justify-content: space-between; /* 分散对齐 */
}

.author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    flex-shrink: 0;
}

.author-name {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.case-date {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: #ff2442;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
    background: #e61e3c;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 20px;
    padding: 0 16px;
}

.load-more-btn {
    padding: 12px 32px;
    background: #ff2442;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.load-more-btn:hover {
    background: #e61e3c;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff2442;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px;
    text-align: center;
    border: 1px solid #fcc;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #666;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 480px) {
    /* 基础布局优化 */
    .container {
        padding: 0 8px;
    }
    
    /* 头部优化 */
    .header-content {
        padding: 12px 12px;
        height: 72px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 20px;
    }
    
    .search-icon-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* 导航菜单优化 */
    .nav-menu {
        gap: 16px;
    }
    
    .nav-menu a {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    /* 搜索框优化 */
    .search-box {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 12px 16px;
        border-radius: 24px;
    }
    
    .search-btn {
        padding: 12px 20px;
        border-radius: 24px;
        font-size: 14px;
    }
    
    /* 筛选栏移动端优化 */
    .filter-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .filter-label {
        font-size: 14px;
        min-width: 60px;
    }
    
    .filter-select, .sort-select {
        flex: 1;
        min-width: auto;
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* 平台分类优化 */
    .platform-categories {
        padding: 12px 0;
        margin-bottom: 6px;
        height: 72px;
    }
    
    .platform-scroll {
        height: 72px;
        padding: 12px 0;
        margin-top: 28px;
        gap: 6px;
        
    }
    
    .platform-item {
        width: 64px;
        height: 40px;
        border-radius: 16px;
        flex-shrink: 0;
    }
    
    .platform-item span {
        font-size: 16px;
    }
    
    /* 案例网格优化 */
    .cases-grid {
        gap: 8px;
        margin-top: 20px;
    }
    
    /* 案例卡片优化 */
    .case-card {
        border-radius: 12px;
        margin-bottom: 8px;
    }
    
    .case-image, .case-video {
        height: 200px; /* 更适合移动端的高度 */
        border-radius: 12px 12px 0 0;
    }
    
    .case-content {
        padding: 8px 10px;
    }
    
    .case-title {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 6px;
        font-weight: 500;
    }
    
    /* 作者信息优化 */
    .case-author {
        margin-bottom: 4px;
    }
    
    .author-info {
        gap: 6px;
    }
    
    .author-avatar {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .author-name {
        font-size: 11px;
    }
    
    .case-date {
        font-size: 11px;
    }
    
    /* 加载更多按钮优化 */
    .load-more-btn {
        padding: 10px 24px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    /* 回到顶部按钮优化 */
    .back-to-top {
        right: 16px;
        bottom: 20px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    /* 空状态优化 */
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state h3 {
        font-size: 16px;
    }
    
    .empty-state p {
        font-size: 13px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 6px;
    }
    
    .header-content {
        padding: 10px 8px;
        height: 72px;
    }
    
    .platform-scroll {
        padding: 0 6px;
        -webkit-overflow-scrolling: touch;
    }
    
    .platform-item {
        width: 64px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .platform-item span {
        font-size: 16px;
    }
    
    .cases-grid {
        gap: 6px;
    }
    
    .case-image, .case-video {
        height: 180px;
    }
    
    .case-content {
        padding: 6px 8px;
    }
    
    .case-title {
        font-size: 13px;
    }
}

/* 横屏模式优化 */
@media (max-width: 480px) and (orientation: landscape) {
    .platform-categories {
        padding: 8px 0;
        height: 72px;
    }
    
    .platform-scroll {
        padding: 0 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .platform-item {
        width: 64px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .cases-grid {
        gap: 6px;
    }
    
    .case-image, .case-video {
        height: 160px;
    }
}

/* 多图文支持 */
.case-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 8px;
}

.case-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.case-gallery img:hover {
    transform: scale(1.05);
}

/* 增强的交互效果 */
.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff2442;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.case-card:hover::before {
    transform: scaleX(1);
}

/* 移动端优化 */
.case-card {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.case-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.load-more-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.load-more-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* 移动端滚动优化 */
.platform-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 移动端按钮优化 */
.platform-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.platform-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* 移动端搜索优化 */
.search-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 移动端字体优化 */
@media (max-width: 480px) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* 防止iOS缩放 */
    input, select, textarea {
        font-size: 16px;
    }
} 