/* 产品分类导航条样式优化 */
.systemproduct-categories {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 40px auto !important;
    padding: 6px !important;
    background: linear-gradient(to right, #f6f8fb, #ffffff, #f6f8fb) !important;
    border-radius: 50px !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
    max-width: fit-content !important;
}

/* 单个分类按钮 */
.systemproduct-category {
    position: relative !important;
    cursor: pointer !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

/* 分类名称文字 - 重点确保文字显示 */
.systemproduct-category-name {
    display: block !important;
    padding: 12px 28px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    /* 确保文字可见 */
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

/* 悬停效果 */
.systemproduct-category:hover .systemproduct-category-name {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    transform: scale(1.05) !important;
}

/* 激活状态 - 蓝色背景白色文字 */
.systemproduct-category.active .systemproduct-category-name {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

/* 添加分隔线效果 */
.systemproduct-category:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1px !important;
    height: 20px !important;
    background: #e5e7eb !important;
    opacity: 0.5 !important;
}

/* 激活项和悬停项不显示分隔线 */
.systemproduct-category.active::after,
.systemproduct-category:hover::after,
.systemproduct-category:hover + .systemproduct-category::after {
    opacity: 0 !important;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .systemproduct-categories {
        flex-wrap: wrap !important;
        border-radius: 12px !important;
        max-width: 90% !important;
    }
    
    .systemproduct-category-name {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    .systemproduct-category::after {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .systemproduct-categories {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .systemproduct-category {
        width: 100% !important;
    }
    
    .systemproduct-category-name {
        width: 100% !important;
        text-align: center !important;
        border-radius: 8px !important;
        background: #f9fafb !important;
        color: #4b5563 !important;
    }
    
    .systemproduct-category.active .systemproduct-category-name {
        background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
        color: #ffffff !important;
    }
}

/* 添加简单的进入动画 */
.systemproduct-categories {
    animation: fadeInUp 0.5s ease !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 确保容器内的所有元素都可见 */
.systemproduct-categories * {
    visibility: visible !important;
    opacity: 1 !important;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #f5f5f5;
}

/* 弹幕容器 - 固定在右下角 */
.danmu-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    height: auto;
    max-width: 450px;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    padding: 15px;
    padding-top: 50px;
    background: transparent;
}

/* 弹幕标题 */
.danmu-title {
    position: absolute;
    top: -35px;
    right: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    padding: 6px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.danmu-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #52c41a;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* 单条弹幕 - 胶囊样式 */
.danmu-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: #333;
    pointer-events: auto;
    animation: danmuSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    width: auto;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    align-self: flex-end;
}

/* 随机淡色背景 */
.danmu-item.bg-1 {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.85) 0%, rgba(255, 218, 185, 0.85) 100%);
}

.danmu-item.bg-2 {
    background: linear-gradient(135deg, rgba(173, 216, 230, 0.85) 0%, rgba(221, 160, 221, 0.85) 100%);
}

.danmu-item.bg-3 {
    background: linear-gradient(135deg, rgba(152, 251, 152, 0.85) 0%, rgba(175, 238, 238, 0.85) 100%);
}

.danmu-item.bg-4 {
    background: linear-gradient(135deg, rgba(255, 218, 185, 0.85) 0%, rgba(255, 192, 203, 0.85) 100%);
}

.danmu-item.bg-5 {
    background: linear-gradient(135deg, rgba(230, 230, 250, 0.85) 0%, rgba(221, 160, 221, 0.85) 100%);
}

.danmu-item.bg-6 {
    background: linear-gradient(135deg, rgba(255, 250, 205, 0.85) 0%, rgba(255, 218, 185, 0.85) 100%);
}

/* 悬停效果 */
.danmu-item:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05);
}

/* 淡出动画类 */
.danmu-item.fading {
    animation: danmuFadeOut 0.5s ease-out forwards;
}

/* 从下往上滑入动画 */
@keyframes danmuSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 淡出消失动画 */
@keyframes danmuFadeOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-30px);
        opacity: 0;
    }
}

/* 用户头像 */
.danmu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffd700;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3), 0 2px 8px rgba(0,0,0,0.2);
}

/* 弹幕文字 */
.danmu-text {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.danmu-text span {
    color: #e74c3c;
    font-weight: 700;
    flex-shrink: 0;
}

.danmu-text .action {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: #555;
}

.danmu-text .amount {
    color: #27ae60;
    font-weight: 700;
    font-size: 12px;
    background: rgba(255,255,255,0.6);
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

/* 手机端隐藏 */
@media screen and (max-width: 768px) {
    .danmu-wrapper {
        display: none !important;
    }
}