/* 收藏功能样式 */

/* 收藏按钮样式 */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    font-size: 16px;
    min-width: 32px;
    min-height: 32px;
}

/* 服务器卡片右下角收藏按钮样式 */
.favorite-btn-corner {
    background: none;
    border: none;
    border-radius: 0;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
    padding: 0;
    position: relative;
    z-index: 2;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateZ(0);
}

.favorite-btn-corner:hover {
    background: none;
    transform: scale(1.1);
}

.favorite-btn-corner i {
    font-size: 18px;
    color: #ccc;
    transition: all 0.3s ease;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    line-height: 1;
}

.favorite-btn-corner i.fas {
    color: #ff6b6b;
}

.favorite-btn-corner:hover i {
    color: #ff6b6b;
    transform: scale(1.1);
}

.favorite-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    transform: scale(1.1);
}

.favorite-btn .fas.fa-heart {
    color: #ff6b6b;
}

.favorite-btn .far.fa-heart {
    color: #ccc;
}

.favorite-btn .far.fa-heart:hover {
    color: #ff6b6b;
}

/* 心形动画 */
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-40px) scale(0.8);
        opacity: 0;
    }
}

.heart-animation {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

/* 服务器卡片收藏按钮位置调整 */
.server-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.server-card-actions .explore-btn,
.server-card-actions .github-link {
    flex: 1;
}

/* 确保收藏按钮在右下角正确显示 */
.server-card-actions .favorite-btn-corner {
    margin-left: auto;
}

/* 导航栏收藏分类样式 */
.nav-favorites {
    position: relative;
}

.nav-favorites .favorites-count {
    background: #ff6b6b;
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* 收藏页面样式 */
.favorites-page {
    padding: 20px 0;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 20px;
}

.favorites-title {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.favorites-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.favorites-sort {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
}

.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color-secondary);
}

.empty-favorites i {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.empty-favorites h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-favorites p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.browse-servers-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.browse-servers-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 123, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .favorites-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .favorites-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .favorite-btn {
        min-width: 28px;
        min-height: 28px;
        font-size: 14px;
    }
    
    .favorite-btn-corner {
        width: 28px;
        height: 28px;
        margin-left: 6px;
    }
    
    .favorite-btn-corner i {
        font-size: 16px;
    }
}

/* 深色模式支持 */
.dark-mode .favorite-btn:hover {
    background: rgba(255, 107, 107, 0.2);
}

.dark-mode .favorite-btn-corner {
    background: none;
    border: none;
}

.dark-mode .favorite-btn-corner:hover {
    background: none;
}

.dark-mode .favorites-sort {
    background: var(--bg-color-dark);
    border-color: var(--border-color-dark);
}

/* 确保服务器卡片有相对定位以支持绝对定位的收藏按钮 */
.server-card {
    position: relative;
}

.server-card-inner {
    position: relative;
}