/* ==================== 有趣的图特定样式 ==================== */

/* 有趣的图的 slide-description 移除默认样式 */
[id^="page-content-有趣的图-"].slide-description {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-height: auto;
}

/* 单张图片展示容器 */
.image-single-display {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: padding 0.3s ease;
}

.image-single-display.expanded {
    padding: 0;
}

.image-single-display img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 20px;
    box-shadow:
        8px 8px 16px rgba(209, 217, 230, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.7);
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.image-single-display img:hover {
    transform: scale(1.02);
    box-shadow:
        12px 12px 24px rgba(209, 217, 230, 0.6),
        -12px -12px 24px rgba(255, 255, 255, 0.95);
}

.image-single-display img.expanded {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(1);
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* 图片展示容器 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 20px 0;
}

.image-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        4px 4px 8px rgba(255, 182, 193, 0.3),
        -4px -4px 8px rgba(135, 206, 235, 0.3);
    border: 2px solid transparent;
}

.image-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow:
        8px 8px 16px rgba(255, 182, 193, 0.4),
        -8px -8px 16px rgba(135, 206, 235, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 15px;
}

.image-item:hover .overlay {
    opacity: 1;
}

.image-item .overlay-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* 图片详情卡片 */
.image-detail-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow:
        8px 8px 16px rgba(209, 217, 230, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.image-detail-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.image-detail-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 10px 0;
}

.image-detail-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* 图表容器 */
.chart-container {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    box-shadow:
        8px 8px 16px rgba(209, 217, 230, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 15px 0;
    text-align: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 图片统计卡片 */
.image-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.image-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow:
        6px 6px 12px rgba(209, 217, 230, 0.5),
        -6px -6px 12px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.image-stat-card:hover {
    transform: translateY(-5px);
    box-shadow:
        8px 8px 16px rgba(209, 217, 230, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.95);
}

.image-stat-value {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(90deg, #667EEA, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.image-stat-label {
    font-size: 14px;
    color: #64748b;
}

/* 图片网格布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.image-grid-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 15px;
    box-shadow:
        6px 6px 12px rgba(209, 217, 230, 0.5),
        -6px -6px 12px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.image-grid-item img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.image-grid-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 5px 0;
}

.image-grid-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 767px) {
    .image-single-display {
        padding: 10px;
    }

    .image-single-display img {
        max-height: 500px;
        border-radius: 16px;
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }

    .image-item img {
        height: 120px;
    }

    .image-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .image-single-display {
        padding: 5px;
    }

    .image-single-display img {
        max-height: 450px;
        border-radius: 12px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .image-item img {
        height: 150px;
    }

    .image-detail-card,
    .chart-container {
        padding: 15px;
    }

    .image-stat-value {
        font-size: 20px;
    }
}
