/* ==============================================
   1. 背景动画模块
   ============================================== */
#index {
    height: auto;
    width: 100%;
    position: relative;
    z-index: 0;
    background-color: #FFFFFF;
    padding-bottom: 20px;
}

#index .canvas {
    height: 260px;
    width: 100%;
    position: absolute;
    z-index: 0; /* 原z-index: -0 无意义，统一为0 */
    left: 0;
    top: 0;
    overflow: hidden;
    margin-top: -64px;
    background-color: #1EA4FE;
}

#index .canvas .bg,
#index .canvas .bga,
#index .canvas .bgb {
    height: 300px;
    animation: slide 3s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #6c3 50%, #09f 50%);
    position: absolute;
    bottom: 0;
    left: -50%;
    right: -50%;
    top: 0;
    z-index: 0;
    opacity: 0.5;
}

/* 差异化动画配置 */
#index .canvas .bga {
    animation-direction: alternate-reverse;
    animation-duration: 4s;
}
#index .canvas .bgb {
    animation-duration: 5s;
}

/* 滑动动画（兼容WebKit内核） */
@-webkit-keyframes slide {
    0% { -webkit-transform: translateX(0); }
    100% { -webkit-transform: translateX(50%); }
}
@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}



/* 固定背景图样式 */
.open4-bg {
    background-image: url(../img/Error2.webp); /* 标准写法 */
    background-image: -webkit-image-set(url(../img/Error2.webp)); /* WebKit兼容 */
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* 图案背景样式 */
.suo-bg-image {
    background-image: url(../img/background-image.svg);
    background-size: 200px;
}

/*百度抖音搜索*/
#service-bdb-links a:hover .brand-service-logo2 svg {
  background: #2d4c65;
  fill: #ffffff;
}
#service-bdb-links a:hover {
  background: #2d4c65;
  color: #ffffff;
}

/* ==============================================
   2. 过渡动画模块
   ============================================== */
/* 淡入淡出动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 动画应用类 */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}
.fade-out {
    animation: fadeOut 0.3s ease forwards;
}


/* ==============================================
   3. 滚动条样式模块
   ============================================== */
/* 全局滚动条美化（WebKit） */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* 滚动条隐藏类（WebKit） */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 小屏桌面滚动条适配（768px-1023px） */
@media (min-width: 768px) and (max-width: 1023px) {
    .md:scrollbar-auto {
        -ms-overflow-style: auto; /* IE/Edge 显示 */
        scrollbar-width: auto; /* Firefox 显示 */
    }
    .md:scrollbar-auto::-webkit-scrollbar {
        display: block; /* WebKit 显示 */
        height: 6px; /* 横向滚动条高度 */
    }
    .md:scrollbar-auto::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    .md:scrollbar-auto::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }
    .md:scrollbar-auto::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}


/* ==============================================
   4. LOGO样式模块
   ============================================== */
.brand-logo svg {
    display: flex;
    vertical-align: middle;
    height: 32px;
    max-width: 96px !important;
    width: 100%;
}
.brand-service-logo svg {
    display: flex;
    vertical-align: middle;
    height: 48px;
    max-width: 128px;
    width: auto;
}
.brand-service-logos svg {
    display: flex;
    vertical-align: middle;
    height: 18px;
    max-width: 60px;
    width: auto;
}
.brand-service-logo2 svg {
    display: flex;
    vertical-align: middle;
    height: 20px;
    max-width: 60px;
    width: auto;
}

/* LOGO切换按钮 */
.logo-tooltip-toggle {
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f3f3f3;
    color: #2a2929;
    border: 1px solid #d1d5db;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.logo-tooltip-toggle:hover {
    background-color: #e5e7eb;
}
.logo-tooltip-toggle.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}


/* ==============================================
   5. 链接与Tooltip模块
   ============================================== */

/* 文本链接特殊样式 */
.text-link {
    padding: 6px 12px;
    background-color: rgba(221, 0, 0, 0.05);
    border-radius: 4px;
}

/* Tooltip提示框 */
.simple-link .tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(1);
    background-color: #dd0000;
    color: white;
    text-align: center;
    border-radius: 4px;
    padding: 0 6px;
    margin-bottom: 4px;
    z-index: 1000;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/* Tooltip箭头 */
.simple-link .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #dd0000 transparent transparent transparent;
}
/* Tooltip hover触发 */
.simple-link:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
    border-color: #dd0000;
}


/* ==============================================
   6. 品牌服务容器模块
   ============================================== */
/* 容器外层 */
.brand-service-container {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* 操作按钮区 */
.service-action-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}


/* ==============================================
   7. 搜索功能模块
   ============================================== */
.brand-service-search {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.search-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.search-btn {
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.search-btn:hover {
    background-color: #1976d2;
}


/* ==============================================
   8. 文本溢出控制模块
   ============================================== */
.one-line-ellipsis {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.two-line-ellipsis {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.three-line-ellipsis {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}