/**
 * 点赞收藏组件样式
 * Minecraft风格的点赞和收藏按钮
 */

.like-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: linear-gradient(135deg, 
        rgba(29, 28, 26, 0.95) 0%, 
        rgba(35, 35, 35, 0.92) 25%, 
        rgba(40, 40, 40, 0.94) 50%, 
        rgba(35, 35, 35, 0.92) 75%, 
        rgba(29, 28, 26, 0.95) 100%);
    border: 2px solid var(--minecraft-green);
    border-radius: 8px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(68, 189, 50, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    font-family: 'Minecraft', 'Minecraftia-Regular', 'VT323', monospace;
    position: fixed !important;
    bottom: 50px !important;
    right: 30px !important;
    z-index: 9999 !important;
    overflow: hidden;
    min-width: 70px;
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.like-component::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.like-component:hover::before {
    left: 100%;
}

.like-btn, .favorite-btn, .share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 6px;
    background: var(--minecraft-green);
    border: none;
    border-radius: 4px;
    color: white;
    font-family: 'Minecraft', 'Minecraftia-Regular', 'VT323', monospace;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    min-height: 45px;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.like-btn:hover, .favorite-btn:hover, .share-btn:hover {
    background: var(--minecraft-secondary);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(68, 189, 50, 0.4);
}

.like-btn:active, .favorite-btn:active, .share-btn:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.like-btn.liked {
    background: var(--minecraft-accent);
    animation: likeAnimation 0.6s ease;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(255, 140, 0, 0.4);
}

.favorite-btn {
    background: var(--minecraft-dirt);
}

.favorite-btn.favorited {
    background: #e91e63;
    animation: favoriteAnimation 0.6s ease;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(233, 30, 99, 0.4);
}

.share-btn {
    background: #1da1f2; /* X.com蓝色 */
}

.share-btn:hover {
    background: #0c85d0;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(29, 161, 242, 0.4);
}

.share-btn:active {
    background: #1a91da;
}

.share-btn.sharing {
    animation: shareAnimation 0.6s ease;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(29, 161, 242, 0.4);
}

.like-icon, .favorite-icon, .share-icon {
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.like-btn:hover .like-icon {
    transform: scale(1.15);
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.6));
}

.favorite-btn:hover .favorite-icon {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.6));
}

.share-btn:hover .share-icon {
    transform: scale(1.15) rotate(-8deg);
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.6));
}

.like-count, .favorite-count, .share-count {
    font-weight: bold;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
}

.like-text, .favorite-text, .share-text {
    font-size: 9px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

/* 点赞动画 */
@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 收藏动画 */
@keyframes favoriteAnimation {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 分享动画 */
@keyframes shareAnimation {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 粒子效果 */
.like-particles {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--minecraft-green);
    border-radius: 1px;
    animation: particleFloat 1s ease-out forwards;
    box-shadow: 0 0 4px var(--minecraft-green);
}

.particle.favorite {
    background: var(--minecraft-dirt);
    box-shadow: 0 0 4px var(--minecraft-dirt);
}

.particle.liked {
    background: var(--minecraft-accent);
    box-shadow: 0 0 4px var(--minecraft-accent);
}

.particle.share {
    background: #1da1f2; /* X.com蓝色 */
    box-shadow: 0 0 4px #1da1f2;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.5);
    }
}

/* 悬浮组件悬停效果 */
.like-component:hover {
    transform: translateY(-2px);
    border-color: var(--minecraft-secondary);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(68, 189, 50, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(68, 189, 50, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .like-component {
        bottom: 40px;
        right: 20px;
        padding: 12px 8px;
        min-width: 70px;
    }
    
    .like-btn, .favorite-btn, .share-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .like-component {
        bottom: 30px;
        right: 15px;
        padding: 10px 6px;
        min-width: 60px;
    }
    
    .like-btn, .favorite-btn, .share-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .like-icon, .favorite-icon, .share-icon {
        font-size: 12px;
    }
}

/* 加载状态 */
.like-btn.loading, .favorite-btn.loading, .share-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.like-btn.loading::after, .favorite-btn.loading::after, .share-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.like-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.like-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.like-btn:hover .like-tooltip,
.favorite-btn:hover .like-tooltip,
.share-btn:hover .like-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Minecraft风格边框效果 */
.minecraft-border {
    position: relative;
}

.minecraft-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    z-index: -1;
    border-radius: 8px;
}

/* 成功提示 */
.like-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--minecraft-green);
    color: white;
    padding: 10px 16px;
    border-radius: 4px;
    font-family: 'Minecraft', 'Minecraftia-Regular', 'VT323', monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(68, 189, 50, 0.4);
    z-index: 10000;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

