/*
 * 主题公共样式（横幅纹理、工具类等）
 * ============================================================================
 * 版权所有 (C) 西安尊云信息科技有限公司，并保留所有权利。
 * 网站地址: http://www.zunyunkeji.com
 * ----------------------------------------------------------------------------
 * 许可声明：未经许可不得将本软件的整体或任何部分用于商业用途及再发布。
 * ============================================================================
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
 */

.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.transition-all-300 {
    transition: all 0.3s ease;
}

.btn-hover-effect {
    transition: all 0.3s ease;
}

.btn-hover-effect:hover {
    transform: translateY(-2px) scale(1.02);
}

.link-hover-effect {
    transition: all 0.3s ease;
    position: relative;
}

.link-hover-effect::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.link-hover-effect:hover::after {
    width: 100%;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 35%, #fdba74 70%, #fed7aa 100%);
}

.card-hover-effect {
    transition: all 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-4px);
}

/* 横幅科技纹理：斜向线性线条 + 光斑 */
.hero-tech,
.bg-gradient-primary,
section.hero {
    position: relative;
    overflow: hidden;
}

.hero-tech::before,
.bg-gradient-primary::before,
section.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            -18deg,
            transparent 0,
            transparent 28px,
            rgba(255, 255, 255, 0.12) 28px,
            rgba(255, 255, 255, 0.12) 29px
        ),
        repeating-linear-gradient(
            -18deg,
            transparent 0,
            transparent 112px,
            rgba(255, 255, 255, 0.07) 112px,
            rgba(255, 255, 255, 0.07) 114px
        ),
        radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.2), transparent 42%),
        radial-gradient(circle at 84% 76%, rgba(0, 0, 0, 0.16), transparent 44%);
    background-size: auto, auto, 100% 100%, 100% 100%;
    opacity: 0.85;
}

.hero-tech > .container,
.bg-gradient-primary > .container,
section.hero > .container {
    position: relative;
    z-index: 2;
}

/* 右侧浮动工具条 */
.float-dock {
    position: fixed;
    right: 20px;
    bottom: 28px;
    z-index: 50;
}

.float-dock__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(249, 115, 22, 0.14);
    box-shadow:
        0 10px 28px rgba(28, 25, 23, 0.12),
        0 2px 6px rgba(249, 115, 22, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.float-dock__item {
    position: relative;
}

.float-dock__btn {
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.float-dock__btn--cs {
    background: linear-gradient(145deg, #fb923c, #f97316);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.35);
}

.float-dock__btn--wx {
    background: linear-gradient(145deg, #34d399, #10b981);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
}

.float-dock__btn--top {
    background: linear-gradient(145deg, #fdba74, #f97316);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.28);
}

.float-dock__btn:hover,
.float-dock__btn.is-active {
    transform: translateY(-2px) scale(1.04);
}

.float-dock__btn--cs:hover,
.float-dock__btn--cs.is-active {
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.42);
}

.float-dock__btn--wx:hover,
.float-dock__btn--wx.is-active {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

.float-dock__btn--top:hover {
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.4);
}

.float-dock__btn.is-hidden,
.float-dock__btn[hidden] {
    display: none !important;
}

.float-dock__tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 8px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.float-dock__tip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1f2937;
}

.float-dock__btn:hover .float-dock__tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.float-dock__qr {
    position: absolute;
    right: calc(100% + 14px);
    bottom: -8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.float-dock__qr.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.float-dock__qr-card {
    width: 168px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(249, 115, 22, 0.12);
    box-shadow:
        0 16px 40px rgba(28, 25, 23, 0.16),
        0 2px 8px rgba(249, 115, 22, 0.08);
    text-align: center;
}

.float-dock__qr-card::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid rgba(249, 115, 22, 0.12);
    border-top: 1px solid rgba(249, 115, 22, 0.12);
    transform: rotate(45deg);
}

.float-dock__qr-card {
    position: relative;
}

.float-dock__qr-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.float-dock__qr-card img {
    display: block;
    width: 132px;
    height: 132px;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: cover;
    background: #f9fafb;
}

.float-dock__qr-desc {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.float-dock__qr-close {
    display: none;
}

/* 桌面：始终展开，隐藏折叠按钮 */
.float-dock__toggle {
    display: none;
}

@media (max-width: 767px) {
    .float-dock {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .float-dock__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        color: #fff;
        font-size: 20px;
        background: linear-gradient(145deg, #fb923c, #f97316);
        box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .float-dock__toggle:active {
        transform: scale(0.96);
    }

    .float-dock__toggle-close {
        display: none;
    }

    .float-dock.is-expanded .float-dock__toggle-open {
        display: none;
    }

    .float-dock.is-expanded .float-dock__toggle-close {
        display: inline-block;
    }

    /* 默认收起面板，减少遮挡正文/页尾 */
    .float-dock__panel {
        display: none;
        padding: 6px;
        gap: 6px;
    }

    .float-dock.is-expanded .float-dock__panel {
        display: flex;
        animation: float-dock-in 0.22s ease;
    }

    @keyframes float-dock-in {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .float-dock__btn {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .float-dock__tip {
        display: none;
    }

    /* 手机端二维码居中弹层，避免左侧溢出屏幕 */
    .float-dock__qr {
        position: fixed;
        inset: 0;
        right: auto;
        bottom: auto;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(15, 23, 42, 0.45);
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .float-dock__qr.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .float-dock__qr-card {
        width: min(78vw, 220px);
        padding: 18px 16px 14px;
        border-radius: 18px;
        box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
    }

    .float-dock__qr-card::after {
        display: none;
    }

    .float-dock__qr-close {
        display: flex;
        position: absolute;
        top: 6px;
        right: 10px;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: #94a3b8;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .float-dock__qr-card img {
        width: 148px;
        height: 148px;
    }
}
