/* ✅ 2025-08-12 机构赛乌龟样式 */
/* 机构赛乌龟专用样式 */

.turtle-racing-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.turtle-racing-panel .panel-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    padding: 12px 16px;
}

.turtle-racing-panel .panel-body {
    padding: 0 !important;
    height: 280px;
    overflow: hidden !important;
    line-height: 0 !important;
}

.turtle-track {
    background: linear-gradient(to right, 
        rgba(34, 197, 94, 0.05) 0%, 
        rgba(34, 197, 94, 0.1) 50%, 
        rgba(34, 197, 94, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.turtle-participant {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.turtle-participant:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.turtle-icon {
    font-size: 24px;
    margin-right: 12px;
    animation: turtleMove 3s ease-in-out infinite;
}

.turtle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.turtle-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.turtle-code {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.turtle-metrics {
    display: flex;
    gap: 16px;
    align-items: center;
}

.turtle-price {
    font-weight: bold;
    color: var(--text-primary);
}

.turtle-change {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.turtle-change.positive {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.turtle-change.negative {
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
}

.turtle-volume {
    font-size: 12px;
    color: var(--text-secondary);
}

.turtle-position {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(34, 197, 94, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 乌龟动画 */
@keyframes turtleMove {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(2px); }
    75% { transform: translateX(-2px); }
}

/* 慢速移动效果 */
.turtle-slow {
    animation: turtleSlow 5s ease-in-out infinite;
}

@keyframes turtleSlow {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(8px) scale(1.05); }
}

/* 快速移动效果（机构加速） */
.turtle-fast {
    animation: turtleFast 2s ease-in-out infinite;
}

@keyframes turtleFast {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(6px) scale(1.1); }
    75% { transform: translateX(-2px) scale(0.95); }
}

/* 胜利效果 */
.turtle-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.2));
    border: 2px solid rgba(255, 193, 7, 0.5);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
    animation: turtleWinner 1s ease-in-out infinite alternate;
}

@keyframes turtleWinner {
    0% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.3); }
    100% { box-shadow: 0 0 30px rgba(255, 193, 7, 0.6); }
}

/* 机构特有的稳健风格 */
.turtle-institutional {
    border-left: 4px solid #22c55e;
}

.turtle-institutional .turtle-icon {
    color: #22c55e;
}

/* 大单交易闪烁 */
.turtle-big-trade {
    animation: turtleBigTrade 0.5s ease-out;
}

@keyframes turtleBigTrade {
    0% { background: rgba(34, 197, 94, 0.3); }
    100% { background: rgba(255, 255, 255, 0.05); }
}

/* 排行榜样式 */
.turtle-leaderboard {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.leaderboard-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-title::before {
    content: '🏆';
    font-size: 16px;
}

/* Loading状态 */
.turtle-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--text-secondary);
}

.turtle-loading::before {
    content: '🐢';
    font-size: 32px;
    animation: spin 2s linear infinite;
    margin-right: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .turtle-participant {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .turtle-icon {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .turtle-name {
        font-size: 13px;
    }
    
    .turtle-code {
        font-size: 11px;
    }
    
    .turtle-metrics {
        gap: 12px;
    }
    
    .turtle-change {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .turtle-position {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}