/* Dianify Site Linker Plugin Styles */

/* 基础变量定义 */
:root {
    --linker-primary: #6954B7;
    --linker-secondary: #360CCC;
    --linker-accent: #FFFF36;
    --linker-white: #ffffff;
    --linker-shadow: rgba(105, 84, 183, 0.3);
    --linker-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --linker-animation-duration: 0.3s;
}

/* 主容器 */
.dianify-linker {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    font-size: 1rem;
    overflow: visible;
}

/* Logo 按钮 */
.linker-logo {
    width: 4.5rem;
    height: 4.5rem;
    padding: 1rem;
    background-color: var(--linker-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(54, 12, 204, 0.3);
    transition: var(--linker-transition);
    /* 默认隐藏 */
    opacity: 0;
    transform: translateX(100%);
}

/* 初始隐藏状态 - 避免闪烁 */
.linker-logo.initial-hide {
    opacity: 0;
    transform: translateX(100%);
}

.linker-logo:hover {
    transform: scale(1.1);
}

.linker-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 54, 0.2));
}

/* 提示框 */
.linker-tip {
    min-width: 18rem;
    background: var(--linker-primary);
    border-radius: 1rem;
    box-shadow: 0 8px 30px var(--linker-shadow);
    color: var(--linker-white);
    padding: 2rem 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    /* 默认隐藏 */
    opacity: 0;
    transform: translateX(100%);
    transition: var(--linker-transition);
}

/* 提示框尾部箭头 */
.linker-tip::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    right: 1.75rem;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-top: 0.5rem solid var(--linker-primary);
}

/* 关闭按钮 */
.linker-close {
    background: rgba(105, 84, 183, 0.8);
    color: var(--linker-accent);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--linker-transition);
    backdrop-filter: blur(10px);
    align-self: flex-end;
    /* 默认隐藏 */
    opacity: 0;
    transform: translateX(100%);
}

.linker-close:hover {
    background: rgba(105, 84, 183, 1);
    transform: scale(1.1);
}

.linker-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* 提示框内容样式 */
.linker-tip h3,
.linker-tip p {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--linker-white);
    margin: 0;
    padding: 0;
}

/* 提示框按钮 */
.linker-button {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(54, 12, 204, 0.25);
    color: var(--linker-accent);
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--linker-transition);
    border: none;
    cursor: pointer;
}

.linker-button:hover {
    color: #FFFF66;
    transform: translateX(2px);
}

.linker-button svg {
    transition: transform 0.3s ease;
}

.linker-button:hover svg {
    transform: translateX(2px);
}

/* 显示状态类 */
.linker-tip.show,
.linker-close.show,
.linker-logo.show {
    opacity: 1;
    transform: translateX(0);
}

/* 隐藏状态类 */
.linker-tip.hide,
.linker-close.hide,
.linker-logo.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* 点击反馈效果 */
.linker-clicked {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dianify-linker {
        bottom: 1rem;
        right: 1rem;
    }
    
    .linker-tip {
        min-width: 16rem;
        padding: 1.5rem 1rem;
    }
    
    .linker-logo {
        width: 4rem;
        height: 4rem;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dianify-linker {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .linker-tip {
        min-width: 14rem;
        padding: 1rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .linker-logo {
        width: 3.5rem;
        height: 3.5rem;
        padding: 0.7rem;
    }
}
