/* 悬浮文章推荐样式 */
.floating-articles-container {
    position: fixed;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    filter: drop-shadow(0 10px 20px rgba(59, 178, 184, 0.1));
}

/* 主按钮样式 */
.floating-articles-button {
    background: linear-gradient(135deg, #42e695 0%, #3bb2b8 100%);
    color: white;
    padding: 12px 12px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(66, 230, 149, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-lr;
    height: auto;
    min-height: 115px;
    line-height: 1.5;
    letter-spacing: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 45px;
    filter: drop-shadow(0 5px 15px rgba(59, 178, 184, 0.25));
}

/* 添加光效 */
.floating-articles-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0));
    border-radius: 25px 25px 0 0;
    pointer-events: none;
}

/* 添加按钮点击动画 */
.floating-articles-button.clicked {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(66, 230, 149, 0.2);
}

/* 添加鼠标互动时的微弱光影变化 */
.floating-articles-container:hover::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(66, 230, 149, 0.1) 0%, rgba(59, 178, 184, 0) 70%);
    z-index: -1;
    animation: pulse-light 3s infinite;
}

@keyframes pulse-light {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.floating-articles-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
}

.floating-articles-button:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* 改进按钮与文字结合 */
.floating-articles-button span {
    position: relative;
    z-index: 2;
    text-align: center;
}

.floating-articles-button span::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.floating-articles-button:hover span::after {
    width: 80%;
}

.floating-articles-button:hover {
    background: linear-gradient(135deg, #3bb2b8 0%, #42e695 100%);
    transform: translateX(2px) scale(1.03);
    box-shadow: 0 15px 30px rgba(59, 178, 184, 0.35);
}

/* 弹出窗口样式 */
.floating-articles-popup {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 15px;
    width: 340px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(66, 230, 149, 0.08);
    display: none;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.floating-articles-popup.active {
    display: block;
    opacity: 1;
    animation: popup-slide 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes popup-slide {
    from {
        opacity: 0;
        transform: translateX(-15px) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* 弹出窗口头部 */
.floating-articles-popup-header {
    background: linear-gradient(135deg, #42e695 0%, #3bb2b8 100%);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    position: relative;
}

.floating-articles-popup-header::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
}

.floating-articles-popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.floating-articles-popup-header h3::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.floating-articles-close {
    font-size: 24px;
    cursor: pointer;
    color: white;
    line-height: 1;
    opacity: 0.9;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.floating-articles-close:hover {
    background-color: rgba(255,255,255,0.2);
    opacity: 1;
}

/* 渐变过渡效果 */
.floating-articles-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #42e695 transparent;
    position: relative;
}

.floating-articles-list::before,
.floating-articles-list::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

.floating-articles-list::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0));
}

.floating-articles-list::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* 文章列表样式 */
.floating-article-item {
    display: block;
    padding: 16px 25px;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(241, 241, 241, 0.7);
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.4;
    margin: 5px 10px;
    border-radius: 12px;
    counter-increment: article-counter;
    font-size: 15px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s backwards;
}

.floating-article-item:last-child {
    border-bottom: none;
}

/* 添加文章卡片入场动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.floating-article-item:hover {
    background-color: rgba(66, 230, 149, 0.08);
    color: #37c78b;
    padding-left: 38px;
    margin: 5px 8px;
    box-shadow: 0 4px 15px rgba(66, 230, 149, 0.15);
    transform: translateY(-2px) scale(1.01);
}

.floating-article-item::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #42e695;
    opacity: 0;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.floating-article-item:hover::before {
    opacity: 1;
    left: 18px;
    box-shadow: 0 0 0 4px rgba(66, 230, 149, 0.15);
}

.floating-article-item::after {
    content: counter(article-counter, decimal-leading-zero);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(66, 230, 149, 0.2);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.floating-article-item:hover::after {
    color: rgba(66, 230, 149, 0.5);
    right: 15px;
}

/* 添加高亮项目样式 */
.floating-article-item.highlight {
    background-color: rgba(66, 230, 149, 0.08);
    padding-left: 38px;
    margin: 5px 8px;
    box-shadow: 0 4px 15px rgba(66, 230, 149, 0.15);
    position: relative;
}

.floating-article-item.highlight::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #42e695;
    opacity: 1;
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px rgba(66, 230, 149, 0.15);
}

.floating-article-item.highlight::after {
    color: rgba(66, 230, 149, 0.5);
}

/* 解决高亮项在悬停时的特殊样式 */
.floating-article-item.highlight:hover {
    background-color: rgba(66, 230, 149, 0.12);
}

/* 自定义滚动条 */
.floating-articles-list::-webkit-scrollbar {
    width: 4px;
}

.floating-articles-list::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.3);
    border-radius: 10px;
    margin: 5px 0;
}

.floating-articles-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #42e695 0%, #3bb2b8 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-articles-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3bb2b8 0%, #42e695 100%);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator::after {
    content: "";
    width: 20px;
    height: 4px;
    background: linear-gradient(90deg, #42e695 0%, #3bb2b8 100%);
    border-radius: 2px;
}

/* 添加装饰性元素 */
.floating-articles-popup::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(66, 230, 149, 0.08) 0%, rgba(59, 178, 184, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.floating-articles-popup::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(66, 230, 149, 0.05) 0%, rgba(59, 178, 184, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

/* 响应式设计优化 - 手机端改为箭头 */
@media screen and (max-width: 768px) {
    .floating-articles-container {
        left: 0;
        top: auto;
        bottom: 30px;
        transform: none;
        filter: none;
    }
    
    .floating-articles-popup {
        width: 280px;
        margin-left: 38px;
        bottom: 0;
        top: auto;
        left: 0;
        transform: none;
    }
    
    /* 手机端的按钮样式 - 改为箭头 */
    .floating-articles-button {
        padding: 8px;
        font-size: 0;
        min-height: 0;
        width: 22px;
        height: 40px;
        border-radius: 0 6px 6px 0;
        writing-mode: horizontal-tb;
        border-left: none;
        letter-spacing: 0;
        box-shadow: 0 4px 10px rgba(66, 230, 149, 0.15);
    }
    
    /* 清除手机端的其他文字内容 */
    .floating-articles-button span {
        display: none;
    }
    
    /* 添加箭头图标 */
    .floating-articles-button::before {
        content: '';
        position: absolute;
        width: 8px;
        height: 8px;
        border-top: 2px solid white;
        border-right: 2px solid white;
        transform: rotate(45deg);
        left: 6px;
        top: 50%;
        margin-top: -4px;
        opacity: 1;
    }
    
    /* 调整弹出窗口的位置和尺寸 */
    .floating-articles-popup {
        top: auto;
        bottom: 0;
        left: 30px;
        transform: none;
        margin-left: 0;
        max-width: calc(100vw - 50px);
        max-height: 80vh;
    }
    
    /* 调整高亮状态 */
    .floating-article-item.highlight, 
    .floating-article-item:hover {
        padding-left: 30px;
        margin: 5px;
    }
    
    /* 调整列表项目的大小 */
    .floating-article-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* 调整点击后的按钮状态 */
    .floating-articles-button.active {
        background: linear-gradient(135deg, #3bb2b8 0%, #42e695 100%);
    }
    
    /* 当弹窗打开时，改变箭头指向 */
    .floating-articles-button.active::before {
        transform: rotate(225deg);
        left: 8px;
    }
} 