/* 市场封面图样式 */
/* 猫哥创作 | 2026-01-17 */

/* 封面容器 */
.market-cover {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.market-cover-simple {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 背景层 */
.cover-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gradient-bg {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 粒子效果 */
.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: particle-float 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.4;
    }
}

/* 内容层 */
.cover-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cover-emoji {
    font-size: 4rem;
    opacity: 0.8;
    animation: emoji-pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

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

/* 图案层 */
.cover-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

/* 图表图案 */
.chart-pattern {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding: 20px;
}

.chart-bar {
    width: 16%;
    background: white;
    border-radius: 4px 4px 0 0;
    animation: chart-grow 1.5s ease-out forwards;
    opacity: 0.6;
}

@keyframes chart-grow {
    from {
        height: 0;
    }
}

/* 波浪图案 */
.wave-pattern {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60%;
}

/* 网格图案 */
.grid-pattern {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 20px 0;
}

.grid-line {
    width: 100%;
    height: 2px;
    background: white;
    opacity: 0.2;
    animation: grid-slide 3s ease-in-out infinite;
}

.grid-line:nth-child(2) {
    animation-delay: 0.5s;
}

.grid-line:nth-child(3) {
    animation-delay: 1s;
}

@keyframes grid-slide {
    0%, 100% {
        transform: scaleX(0.8);
        opacity: 0.2;
    }
    50% {
        transform: scaleX(1);
        opacity: 0.4;
    }
}

/* 圆圈图案 */
.circles-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.circle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-radius: 50%;
    opacity: 0;
    animation: circle-expand 3s ease-out infinite;
}

@keyframes circle-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* 覆盖层 */
.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

/* 关键词标签 */
.cover-keywords {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.keyword-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: badge-slide-in 0.5s ease-out backwards;
}

@keyframes badge-slide-in {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 统计标签 */
.cover-stats {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: badge-fade-in 0.5s ease-out;
}

.stat-badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
}

.stat-badge.apy {
    background: rgba(255, 255, 255, 0.95);
    color: #43e97b;
}

@keyframes badge-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 简化版封面 */
.simple-icon {
    font-size: 3rem;
    opacity: 0.9;
    animation: simple-bounce 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes simple-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.simple-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
}

.simple-particles span {
    font-size: 1.5rem;
    opacity: 0.25;
    animation: simple-float 4s ease-in-out infinite;
}

.simple-particles span:nth-child(2) {
    animation-delay: 0.5s;
}

.simple-particles span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes simple-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
    }
}

/* Hover效果 */
.market-cover:hover .cover-emoji {
    transform: scale(1.15);
}

.market-cover:hover .particle {
    animation-duration: 3s;
}

.market-cover:hover .stat-badge {
    transform: scale(1.05);
}

/* 响应式 */
@media (max-width: 768px) {
    .market-cover {
        height: 140px;
    }
    
    .market-cover-simple {
        height: 100px;
    }
    
    .cover-emoji {
        font-size: 3rem;
    }
    
    .simple-icon {
        font-size: 2.5rem;
    }
    
    .keyword-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.625rem;
    }
    
    .stat-badge {
        font-size: 0.625rem;
        padding: 0.3rem 0.5rem;
    }
}

/* 加载动画 */
.market-cover.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s ease-in-out infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
