/* Hot Coin Sidebar 组件 - 赛博朋克风格 - 增强特效版 */

/* 热门币种列表特定样式 */
.coin-list {
    padding: 0;
    margin: 0;
}

/* 币种列表项 */
.coin-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.coin-item:last-child {
    border-bottom: none;
}

/* 悬停扫描线效果 */
.coin-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px var(--primary);
}

/* 悬停光效 */
.coin-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.05), transparent);
    transition: left 0.5s ease;
}

.coin-item:hover {
    background: rgba(0, 255, 136, 0.03);
    transform: translateX(6px);
}

.coin-item:hover::before {
    transform: scaleY(1);
}

.coin-item:hover::after {
    left: 100%;
}

/* 币种图标包装器 */
.coin-icon-wrapper {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--theme-black-light), var(--theme-black-lighter));
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

/* 悬停边框发光 */
.coin-item:hover .coin-icon-wrapper {
    border-color: var(--primary);
    box-shadow: 
        0 0 15px rgba(0, 255, 136, 0.4),
        0 0 30px rgba(0, 255, 136, 0.2);
    transform: scale(1.1);
}

/* 图标旋转光效 */
.coin-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: iconRotate 2s linear infinite;
}

.coin-item:hover .coin-icon-wrapper::after {
    opacity: 0.5;
}

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

.coin-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.coin-item:hover .coin-icon {
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* 币种信息 */
.coin-info {
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
}

.coin-name-cn {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 0.125rem;
    transition: all 0.3s ease;
    position: relative;
}

.coin-item:hover .coin-name-cn {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.coin-name-en {
    font-size: 0.8rem;
    color: var(--text-gray);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.coin-item:hover .coin-name-en {
    opacity: 1;
    color: var(--text-light);
}

/* 趋势指示器 */
.coin-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.coin-trend svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

/* 上涨趋势 */
.coin-trend.up {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.2);
}

.coin-item:hover .coin-trend.up {
    background: rgba(74, 222, 128, 0.2);
    box-shadow: 
        0 0 15px rgba(74, 222, 128, 0.4),
        inset 0 0 10px rgba(74, 222, 128, 0.1);
}

/* 下跌趋势 */
.coin-trend.down {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.2);
}

.coin-item:hover .coin-trend.down {
    background: rgba(248, 113, 113, 0.2);
    box-shadow: 
        0 0 15px rgba(248, 113, 113, 0.4),
        inset 0 0 10px rgba(248, 113, 113, 0.1);
}

/* 稳定趋势 */
.coin-trend.stable {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.2);
}

.coin-item:hover .coin-trend.stable {
    background: rgba(148, 163, 184, 0.2);
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.3);
}

/* 上涨箭头动画 */
.coin-trend.up svg {
    animation: trendUp 2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.6));
}

.coin-trend.down svg {
    animation: trendDown 2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.6));
}

.coin-trend.stable svg {
    filter: drop-shadow(0 0 4px rgba(148, 163, 184, 0.4));
}

@keyframes trendUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes trendDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* 趋势数字动画 */
.coin-trend span {
    position: relative;
}

.coin-trend.up span::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(74, 222, 128, 0.3);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.coin-item:hover .coin-trend.up span::before {
    width: 100%;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* 买入按钮 */
.buy-btn {
    padding: 0.25rem 0.625rem;
    min-width: 44px;
    text-align: center;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* 按钮光效 */
.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.buy-btn:hover {
    background: var(--primary);
    color: #0a0a0a;
    box-shadow: 
        0 0 15px rgba(0, 255, 136, 0.5),
        0 0 30px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

.buy-btn:active {
    transform: scale(0.95) translateY(0);
}

/* 按钮点击波纹 */
.buy-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.buy-btn:active::after {
    width: 300px;
    height: 300px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .coin-item {
        padding: 0.75rem 1rem;
    }
    
    .coin-icon-wrapper {
        width: 32px;
        height: 32px;
        margin-right: 0.75rem;
    }
    
    .coin-name-cn {
        font-size: 0.85rem;
    }
    
    .coin-name-en {
        font-size: 0.75rem;
    }
    
    .coin-trend {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .coin-trend svg {
        width: 14px;
        height: 14px;
    }
    
    .buy-btn {
        padding: 0.35rem 0.75rem;
        min-width: 48px;
        font-size: 0.7rem;
        border-radius: 5px;
    }
    
    .coin-item:hover {
        transform: translateX(3px);
    }
}

@media (max-width: 480px) {
    .coin-item {
        flex-wrap: wrap;
        padding: 0.5rem;
    }
    
    .coin-info {
        order: 2;
        flex-basis: calc(100% - 60px);
        margin-top: 0.5rem;
    }
    
    .coin-trend {
        order: 3;
        margin-left: auto;
        margin-right: 0;
    }
    
    .buy-btn {
        order: 4;
        margin-left: auto;
        margin-top: 0.5rem;
    }
    
    .coin-item:hover {
        transform: translateX(2px);
    }
}
