/* downloads.css - 下载页面专用样式 */

/* ===== 下载页面动画标题 ===== */
.animated-download-header {
    text-align: center;
    margin-bottom: 3rem;
}

.download-hero {
    position: relative;
    padding: 2rem 0;
}

.download-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

.download-subtitle {
    font-size: 1.3rem;
    color: #ccc;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

/* ===== 浮动下载图标 ===== */
.floating-download-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.floating-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    opacity: 0;
    animation: floatIn 0.8s ease var(--delay) forwards;
}

/* ===== 搜索动画 ===== */
.animated-search {
    opacity: 0;
    animation: slideInUp 0.8s ease 0.5s forwards;
}

.search-pulse {
    position: absolute;
    top: 50%;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transform: translateY(-50%);
}

.search-box.focused .search-pulse {
    opacity: 1;
}

.search-box.focused {
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.3);
}

/* ===== 分类标签 ===== */
.download-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.7s forwards;
}

.category-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--light);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.category-btn:hover {
    background: var(--glass-highlight);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
}

/* ===== 下载统计 ===== */
.download-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-number.completed {
    animation: numberPop 0.3s ease;
}

.stat-label {
    color: #ccc;
    font-size: 0.9rem;
}

/* ===== 底部提示 ===== */
.download-footer {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--glass);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.1s forwards;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #ccc;
}

.footer-content i {
    color: var(--secondary);
    font-size: 1.2rem;
}

/* ===== 背景动画元素 ===== */
.bg-animation-element {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ===== 分类按钮动画增强 ===== */
.category-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn.active {
    animation: buttonPulse 0.6s ease;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.4);
}

/* ===== 统计卡片动画 ===== */
.download-stats {
    perspective: 1000px;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px) rotateX(5deg);
}

/* ===== 页面加载动画 ===== */
.downloads-loaded .animated-download-header {
    animation: slideInFromTop 0.8s ease;
}

/* ===== 浮动图标动画增强 ===== */
.floating-icon {
    transition: all 0.3s ease;
}

.floating-icon:hover {
    transform: scale(1.2) rotate(10deg);
    color: var(--accent);
}

/* ===== 推荐系统样式 - 优化版本 ===== */
.download-item.recommended {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(30, 30, 30, 0.6) 50%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
}

.download-item.recommended::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 10px;
    pointer-events: none;
}

.recommendation-badge {
    position: absolute;
    top: 15px;
    right: -8px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b6b00;
    padding: 0.4rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    z-index: 10;
    border: 2px solid #ffed4e;
}

.recommendation-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    z-index: -1;
    border-radius: 2px;
}

.recommendation-badge i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

/* 移除之前的标题行样式 */
.download-title-row {
    display: block;
    margin-bottom: 0.5rem;
}

.download-title-row h4 {
    margin: 0;
    padding-right: 60px; /* 为推荐徽章留出空间 */
}

/* 推荐卡片悬停效果 */
.download-item.recommended:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(30, 30, 30, 0.7) 50%);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
}

/* 推荐徽章动画 */
.download-item.recommended .recommendation-badge {
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 2px 15px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
    }
}

/* ===== 多下载按钮样式 ===== */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    color: white;
    background-color: var(--btn-color, var(--primary));
    text-align: center;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

/* 特定按钮样式 */
.download-btn.github {
    background-color: #333;
}

.download-btn.wechat {
    background-color: #07c160;
}

.download-btn.baidu {
    background-color: #2932e1;
}

.download-btn.website {
    background-color: #007bff;
}

/* 微信公众号特殊样式 */
.wechat-popup {
    position: relative;
}

/* ===== 无下载链接样式 ===== */
.no-download {
    color: #888;
    font-style: italic;
    padding: 0.6rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .download-title {
        font-size: 2.5rem;
    }
    
    .download-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .floating-download-icons {
        gap: 1rem;
    }
    
    .floating-icon {
        font-size: 2rem;
    }
    
    .download-categories {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .download-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
        width: 100%;
        margin-top: 1rem;
    }
    
    .download-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .download-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recommendation-badge {
        top: 10px;
        right: -10px;
        padding: 0.3rem 1rem;
        font-size: 0.7rem;
    }
    
    .download-title-row h4 {
        padding-right: 50px;
        font-size: 1rem;
    }
    
    .download-item.recommended:hover {
        transform: none;
    }
    
    .category-btn.active {
        transform: scale(1.02);
    }
}

@media (max-width: 576px) {
    .download-title {
        font-size: 2rem;
    }
    
    .download-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .floating-download-icons {
        flex-wrap: wrap;
    }
}

/* ===== 微信公众号提示样式 ===== */
.wechat-tooltip {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid #07c160;
    backdrop-filter: blur(10px);
}

.tooltip-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tooltip-content .fa-weixin {
    font-size: 1.5rem;
    color: #07c160;
}

.tooltip-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tooltip-text strong {
    color: #fff;
    font-weight: 600;
}

.public-name {
    color: #07c160;
    font-weight: 600;
    font-size: 0.9rem;
}

.tooltip-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #07c160;
}

/* 微信公众号按钮悬停效果增强 */
.download-btn.wechat.wechat-popup {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
    background: linear-gradient(135deg, #07c160, #05a050) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wechat-tooltip {
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }
    
    .tooltip-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}
/* ===== 微信公众号弹窗样式 ===== */
.wechat-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.wechat-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--dark);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.wechat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.1) 0%, transparent 100%);
}

.wechat-modal-header h3 {
    color: var(--light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wechat-modal-header .fa-weixin {
    color: #07c160;
    font-size: 1.2rem;
}

.wechat-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wechat-close:hover {
    color: var(--accent);
}

.wechat-modal-body {
    padding: 2rem;
    text-align: center;
}

.wechat-icon {
    font-size: 4rem;
    color: #07c160;
    margin-bottom: 1.5rem;
    animation: wechatPulse 2s infinite;
}

@keyframes wechatPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.wechat-info h4 {
    color: #07c160;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.wechat-info p {
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 1rem;
}

.wechat-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.copy-btn {
    background: linear-gradient(135deg, #07c160, #05a050);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.3);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #28a745, #218838);
}

.copy-btn.copied i {
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wechat-modal-content {
        width: 95%;
        max-width: 350px;
    }
    
    .wechat-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .wechat-modal-body {
        padding: 1.5rem;
    }
    
    .wechat-icon {
        font-size: 3rem;
    }
    
    .wechat-info h4 {
        font-size: 1.3rem;
    }
}

/* ===== 微信公众号提示样式 ===== */
.wechat-tooltip {
    position: absolute;
    bottom: 100%; /* 改为在按钮上方显示 */
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid #07c160;
    backdrop-filter: blur(10px);
    margin-bottom: 10px; /* 与按钮的间距 */
    min-width: 200px; /* 确保最小宽度 */
}

.tooltip-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tooltip-content .fa-weixin {
    font-size: 1.5rem;
    color: #07c160;
}

.tooltip-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tooltip-text strong {
    color: #fff;
    font-weight: 600;
}

.public-name {
    color: #07c160;
    font-weight: 600;
    font-size: 0.9rem;
}

.tooltip-arrow {
    position: absolute;
    top: 100%; /* 箭头在底部 */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #07c160; /* 箭头颜色 */
    border-bottom: none; /* 移除底部边框 */
}

/* 确保下载项有足够的空间显示提示 */
.download-item {
    position: relative;
    overflow: visible !important; /* 确保提示框不会被裁剪 */
}

.download-buttons {
    position: relative;
    z-index: 10;
}

/* 微信公众号按钮特殊样式 */
.download-btn.wechat {
    position: relative;
    overflow: visible;
}
/* 简化版本：固定在上方显示 */
.wechat-tooltip {
    position: absolute;
    bottom: calc(100% + 10px); /* 在按钮上方10px */
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10000; /* 很高的层级 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid #07c160;
    backdrop-filter: blur(10px);
    min-width: 220px;
}

/* 确保所有父容器都不裁剪 */
.download-item,
.content-card,
.content-grid,
.download-section,
.container {
    overflow: visible !important;
}