/*
 * 算力云 - 镜像市场页面专用样式
 * Images Market Page Styles
 */

/* ==================
   基础样式导入
   ================== */
/* 确保引用主样式文件中的变量 */
@import url('./style.css');

/* ==================
   镜像卡片样式
   ================== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.image-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    backdrop-filter: blur(10px);
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(47, 84, 235, 0.03) 0%, rgba(59, 130, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.image-card:hover::before {
    opacity: 1;
}

.image-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 30px 60px rgba(47, 84, 235, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.image-card.featured {
    background: #ffffff;
    border: 2px solid #3b82f6;
    position: relative;
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2), 0 15px 30px rgba(59, 130, 246, 0.15);
}

.image-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-2xl);
    z-index: 0;
    pointer-events: none;
}

.image-card.featured:hover {
    transform: translateY(-14px) scale(1.03);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3), 0 40px 80px rgba(59, 130, 246, 0.25);
    border-color: #2563eb;
}

.image-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    animation: badgePulse 2s ease-in-out infinite;
}

.image-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
}

/* 推荐标签 - 蓝色渐变 */
.image-card.featured:nth-child(1) .image-badge,
.image-card.featured:nth-child(12) .image-badge,
.image-card.featured:nth-child(21) .image-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* 热门标签 - 红色渐变 */
.image-card.featured:nth-child(11) .image-badge,
.image-card.featured:nth-child(14) .image-badge,
.image-card.featured:nth-child(22) .image-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 新品标签 - 绿色渐变 */
.image-card.featured:nth-child(20) .image-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.image-icon {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.image-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.image-icon i {
    font-size: 56px;
    color: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
}

.image-card.featured .image-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
}

.image-card.featured .image-icon i {
    font-size: 64px;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

.image-card:hover .image-icon i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 16px rgba(59, 130, 246, 0.5));
}

.image-content {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.image-content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    line-height: 1.3;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.image-card.featured .image-content h3 {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-card:hover .image-content h3 {
    background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-content p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
    flex: 1;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.image-card:hover .image-content p {
    color: #475569;
}

.image-tags {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.image-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #3b82f6;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.image-card.featured .image-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

.image-card:hover .image-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.image-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.image-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.image-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.image-btn:hover::after {
    opacity: 1;
}

.image-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.image-card.featured .image-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.image-card.featured .image-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

/* ==================
   镜像特效样式
   ================== */
.image-glow {
    position: relative;
}

.image-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-primary-400), var(--color-error-500), var(--color-warning-500), var(--color-primary-400));
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate 4s linear infinite;
}

.image-card:hover .image-glow::after {
    opacity: 0.6;
}

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

/* ==================
   镜像标签页样式
   ================== */
.image-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    flex-wrap: wrap;
}

.image-tab {
    background: transparent;
    border: 2px solid var(--color-border-light);
    color: var(--color-text-secondary);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.image-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(47, 84, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.image-tab:hover::before {
    left: 100%;
}

.image-tab:hover {
    border-color: var(--color-primary-400);
    color: var(--color-primary-600);
    background: var(--color-primary-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 84, 235, 0.15);
}

.image-tab.active {
    background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-600) 100%);
    border-color: var(--color-primary-500);
    color: var(--color-white);
    box-shadow: 0 8px 20px rgba(47, 84, 235, 0.3);
    transform: translateY(-2px);
}

/* ==================
   镜像统计样式
   ================== */
.image-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin: var(--space-12) 0;
    padding: var(--space-8);
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    padding: var(--space-4);
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-600);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

/* ==================
   响应式设计
   ================== */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .image-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .image-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .image-tabs {
        flex-direction: column;
        align-items: center;
    }

    .image-tab {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .image-content {
        padding: var(--space-4);
    }

    .image-content h3 {
        font-size: var(--font-size-lg);
    }

    .image-header {
        padding: var(--space-4);
    }

    .image-icon {
        height: 100px;
    }

    .image-icon i {
        font-size: 40px;
    }

    .image-stats {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

/* ==================
   动画效果增强
   ================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-grid {
    animation: fadeInUp 0.6s ease-out;
}

/* 镜像卡片进入动画 */
.image-card {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out forwards;
}

.image-card:nth-child(1) { animation-delay: 0.1s; }
.image-card:nth-child(2) { animation-delay: 0.2s; }
.image-card:nth-child(3) { animation-delay: 0.3s; }
.image-card:nth-child(4) { animation-delay: 0.4s; }
.image-card:nth-child(5) { animation-delay: 0.5s; }
.image-card:nth-child(6) { animation-delay: 0.6s; }
.image-card:nth-child(7) { animation-delay: 0.7s; }
.image-card:nth-child(8) { animation-delay: 0.8s; }
.image-card:nth-child(9) { animation-delay: 0.9s; }
.image-card:nth-child(10) { animation-delay: 1.0s; }
.image-card:nth-child(11) { animation-delay: 1.1s; }
.image-card:nth-child(12) { animation-delay: 1.2s; }
.image-card:nth-child(13) { animation-delay: 1.3s; }
.image-card:nth-child(14) { animation-delay: 1.4s; }
.image-card:nth-child(15) { animation-delay: 1.5s; }
.image-card:nth-child(16) { animation-delay: 1.6s; }
.image-card:nth-child(17) { animation-delay: 1.7s; }
.image-card:nth-child(18) { animation-delay: 1.8s; }
.image-card:nth-child(19) { animation-delay: 1.9s; }
.image-card:nth-child(20) { animation-delay: 2.0s; }
.image-card:nth-child(21) { animation-delay: 2.1s; }
.image-card:nth-child(22) { animation-delay: 2.2s; }
.image-card:nth-child(23) { animation-delay: 2.3s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
