/* 갤러리 페이지 전용 스타일 - 픽셀 게임 스타일 */

body {
    padding-top: 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #F375C2 0%, #B153D7 100%);
    border: 6px solid #fbbf24;
    box-shadow: 
        0 0 0 2px #0E21A0,
        8px 8px 0 0 rgba(0, 0, 0, 0.3),
        0 0 30px rgba(243, 117, 194, 0.5);
    animation: headerGlow 2s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% {
        box-shadow: 
            0 0 0 2px #0E21A0,
            8px 8px 0 0 rgba(0, 0, 0, 0.3),
            0 0 30px rgba(243, 117, 194, 0.5);
    }
    50% {
        box-shadow: 
            0 0 0 2px #0E21A0,
            8px 8px 0 0 rgba(0, 0, 0, 0.3),
            0 0 50px rgba(243, 117, 194, 0.8);
    }
}

.page-header h1 {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    font-size: 3rem;
    color: #fff;
    text-shadow: 
        4px 4px 0 #0E21A0,
        5px 5px 0 rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.page-header p {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    font-size: 1.4rem;
    color: #F375C2;
    font-weight: normal;
    margin-bottom: 0;
    text-shadow: 
        2px 2px 0 #0E21A0;
}

/* 갤러리 그리드 - 픽셀 스타일 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 갤러리 아이템 - 픽셀 프레임 */
.gallery-item {
    background: #fff;
    padding: 20px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    border: 5px solid #B153D7;
    animation: itemAppear 0.4s steps(4, end);
}

@keyframes itemAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.3);
}

.gallery-item:nth-child(2n) {
    border-color: #F375C2;
}

.gallery-item:nth-child(3n) {
    border-color: #4D2FB2;
}

/* 사진 프레임 - 픽셀 아트 */
.photo-frame {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 비율 */
    background: linear-gradient(135deg, #e9d5ff 0%, #fce7f3 100%);
    border: 4px solid #0E21A0;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 0 0 2px #B153D7;
}

.photo-frame img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.photo-frame img:hover {
    transform: scale(1.05);
}

/* 플레이스홀더 - 픽셀 스타일 */
.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        repeating-linear-gradient(
            45deg,
            #dbeafe,
            #dbeafe 10px,
            #bfdbfe 10px,
            #bfdbfe 20px
        );
}

.placeholder-content {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 4px solid #4D2FB2;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.placeholder-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    animation: pixelBounce 1.5s ease-in-out infinite;
}

@keyframes pixelBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.placeholder-text {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    font-size: 1.2rem;
    color: #0E21A0;
    font-weight: normal;
    line-height: 1.6;
}

/* 사진 캡션 - 픽셀 텍스트 */
.photo-caption {
    text-align: center;
    padding: 10px;
    background: #B153D7;
    border: 3px solid #F375C2;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.photo-caption p {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    font-weight: normal;
    margin: 0;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* 갤러리 정보 섹션 - 픽셀 박스 */
.gallery-info {
    background: #fff;
    border: 6px solid #B153D7;
    box-shadow: 
        0 0 0 2px #4D2FB2,
        8px 8px 0 0 rgba(0, 0, 0, 0.3);
    padding: 40px;
    margin-bottom: 40px;
}

.gallery-info h3 {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    font-size: 2.2rem;
    color: #4D2FB2;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 2px 2px 0 #F375C2;
}

.info-content {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    color: #0E21A0;
}

.info-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.15rem;
}

.info-content strong {
    color: #B153D7;
    font-weight: 900;
}

.code-example {
    background: #f3f4f6;
    border: 4px solid #B153D7;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.code-example pre {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #0E21A0;
    margin: 10px 0 0 0;
    overflow-x: auto;
    line-height: 1.6;
}

/* 이미지 모달 - 픽셀 오버레이 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 33, 160, 0.95);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 4px,
            rgba(0, 0, 0, 0.1) 4px,
            rgba(0, 0, 0, 0.1) 8px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 4px,
            rgba(0, 0, 0, 0.1) 4px,
            rgba(0, 0, 0, 0.1) 8px
        );
    animation: pixelFadeIn 0.3s steps(6, end);
}

@keyframes pixelFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border: 8px solid #F375C2;
    box-shadow: 
        0 0 0 4px #B153D7,
        12px 12px 0 0 rgba(0, 0, 0, 0.5);
    animation: pixelZoomIn 0.3s steps(6, end);
    image-rendering: auto;
}

@keyframes pixelZoomIn {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #F375C2;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 
        4px 4px 0 #0E21A0;
    font-family: Arial, sans-serif;
}

.modal-close:hover {
    color: #fff;
    transform: scale(1.2);
}

.modal-caption {
    font-family: 'DungGeunMo', 'NeoDunggeunmoPro', 'Noto Sans KR', sans-serif;
    color: #fff;
    font-size: 1.6rem;
    text-align: center;
    padding: 20px 40px;
    margin-top: 20px;
    background: #B153D7;
    border: 5px solid #F375C2;
    box-shadow: 
        0 0 0 2px #0E21A0,
        6px 6px 0 0 rgba(0, 0, 0, 0.5);
    font-weight: normal;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    body {
        padding-top: 140px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-info {
        padding: 25px;
    }

    .gallery-info h3 {
        font-size: 1.8rem;
    }

    .info-content p {
        font-size: 1.05rem;
    }

    .code-example {
        padding: 15px;
    }

    .code-example pre {
        font-size: 0.85rem;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 50px;
    }

    .placeholder-emoji {
        font-size: 3rem;
    }

    .placeholder-text {
        font-size: 1rem;
    }

    .modal-caption {
        font-size: 1.3rem;
        padding: 15px 25px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 160px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .photo-caption p {
        font-size: 1rem;
    }

    .modal-close {
        font-size: 40px;
    }
}
