/**
 * 活动照片墙 - 自定义样式
 * 包含自定义 CSS 类和工具类
 */

/* 自定义工具类 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .text-shadow-lg {
        text-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
    }
    .backdrop-blur {
        backdrop-filter: blur(8px);
    }
    .photo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-gap: 1rem;
    }
    .masonry-grid {
        column-count: 1;
        column-gap: 1rem;
    }
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 4;
    }
}

@layer utilities {
    .masonry-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    .qr-code-container {
        position: relative;
        display: inline-block;
    }
    .qr-code-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 30%;
        height: 30%;
        background-color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .upload-progress {
        transition: width 0.3s ease;
    }
    .camera-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1rem;
        background: linear-gradient(to bottom, 
            rgba(0,0,0,0.5) 0%, 
            rgba(0,0,0,0) 20%, 
            rgba(0,0,0,0) 80%, 
            rgba(0,0,0,0.5) 100%);
    }
    .camera-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
    }
    .camera-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: rgba(255,255,255,0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .camera-button:hover {
        transform: scale(1.1);
        background-color: white;
    }
    .camera-button:active {
        transform: scale(0.95);
    }
    .featured-photo {
        position: relative;
        overflow: hidden;
    }
    .featured-photo::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, 
            rgba(0,0,0,0.2) 0%, 
            rgba(0,0,0,0.7) 100%);
        opacity: 0.7;
    }
    .featured-photo:hover .featured-overlay {
        opacity: 1;
    }
    .featured-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 1.5rem;
        opacity: 0.9;
        transition: opacity 0.3s ease;
    }
    .like-button {
        transition: all 0.2s ease;
    }
    .like-button.liked {
        color: #EF4444;
        transform: scale(1.2);
    }
    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
    }
    @keyframes skeleton-loading {
        0% {
            background-position: 200% 0;
        }
        100% {
            background-position: -200% 0;
        }
    }
}
