/* 기본 폰트 설정 및 배경색 조정 */
body {
    cursor: none;
    font-family: 'Noto Sans KR', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;r
    margin: 0;
    background-color: #000000; /* 어두운 배경색 */
    color: #f0f0f0; /* 밝은 기본 텍스트 색상 */
    line-height: 1.6;
}

/* 커스텀 마우스 커서 div 스타일 */
#custom-cursor {
    position: fixed; /* 화면에 고정되어 스크롤해도 따라다니게 */
    top: 0;
    left: 0;
    width: 50px; /* 이미지의 너비 */
    height: 50px; /* 이미지의 높이 */
    background-image: url('images/jh.png'); /* 여기에 준비한 이미지 경로를 입력하세요! */
    background-size: contain; /* div 크기에 맞게 이미지 조절 */
    background-repeat: no-repeat;
    pointer-events: none; /* 이 div 위로 마우스가 올라와도 아래의 요소들을 클릭할 수 있도록 */
    z-index: 9999; /* 다른 요소들보다 항상 위에 표시 */
    transition: transform 0.05s ease-out; /* 마우스 움직임에 부드러운 전환 효과 */
    will-change: transform; /* 애니메이션 성능 최적화 */
}



.container {
    /* background-color: #2d2d2d; /* 컨테이너 배경색 (바디보다 약간 밝게) */
    padding: 40px 60px; */
    border-radius: 10px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); 그림자 강조 */
    text-align: center;
    max-width: 800px;
    width: 100%;
    /* box-sizing: border-box; */
    margin: 20px;
}

/* 폰트 스타일 적용 및 색상 조정 */
header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 700;
}

.jersey-10-regular {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.highlight-text {
    color: #ffda47; /* 이미지의 노란색/금색 계열 폰트 색상 */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* 그림자 효과 추가 */
    font-size: 80px;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.sub-text {
    font-size: 0.9em;
    color: #aaaaaa; /* 이미지의 밝은 회색 계열 폰트 색상 */
    margin-bottom: 40px;
}

.image-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    position: relative;
    gap: 15px;
}

.image-gallery img {
    max-width: 100%; /* 부모 요소의 너비를 넘지 않도록 */
    height: auto;    /* 너비에 맞춰 높이 자동 조절 */
    max-height: 550px; /* 최대 높이 설정 */
    display: block;
    border: 1px solid #444444; /* 이미지 테두리색 어둡게 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); /* 이미지 그림자 강조 */
    
    /* 이미지 비율 유지 및 컨테이너 맞추기 */
    object-fit: contain; /* 이미지가 컨테이너 안에 딱 맞게 들어가도록 (비율 유지) */
    object-position: center; /* 이미지가 컨테이너 내에서 중앙에 정렬되도록 */
}

.nav-button {
    background-color: rgba(255, 255, 255, 0.2); /* 밝은 투명 버튼 (어두운 배경에 대비) */
    color: #e0e0e0; /* 버튼 글씨색 밝게 */
    border: none;
    padding: 12px 18px;
    font-size: 1.8em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.05);
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}

.message-box {
    border: 1px solid #4a4a4a; /* 테두리색 어둡게 */
    border-radius: 8px;
    padding: 25px;
    margin-top: 40px;
    font-size: 1em;
    color: #cccccc; /* 메시지 박스 텍스트색 밝게 */
    line-height: 1.6;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2); /* 안쪽 그림자 강조 */
    margin-bottom: 50px;
}

.message-box p:last-child {
    margin-top: 20px;
    color: #e0e0e0; /* 마지막 문구색 더 밝게 */
}

#confetti-container {
    position: fixed; /* 화면 전체에 고정 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 클릭 이벤트가 아래 요소에 전달되도록 */
    z-index: 1000; /* 다른 콘텐츠보다 위에 표시 */
}

.confetti {
    position: absolute;
    width: 10px; /* 꽃가루 너비 */
    height: 15px; /* 꽃가루 높이 */
    background-color: #f06; /* 기본 색상 */
    opacity: 0.7;
    animation: fall 5s linear infinite; /* 떨어지는 애니메이션 */
    transform-origin: 50% -100%; /* 회전을 위한 중심점 설정 */
}

/* image-wrapper: 이미지와 설명을 감싸는 컨테이너 */
.image-wrapper {
    position: relative; /* 자식 요소인 설명 div를 위치시키기 위해 필요 */
    display: flex; /* 이미지가 가운데 정렬되도록 */
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 설명이 wrapper 밖으로 나가지 않도록 */
    /* .image-gallery img 에 설정된 max-width, height, max-height를 이 wrapper로 옮겨주는 것이 좋습니다. */
    max-width: 100%;
    height: auto;
    max-height: 550px; /* img와 동일한 최대 높이 */
    border: 1px solid #444444; /* 이미지 테두리색 어둡게 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); /* 이미지 그림자 강조 */
}

/* 기존 .image-gallery img 스타일에서 max-width, height, max-height, border, box-shadow 제거 */
/* 대신 .image-wrapper 내 img에 비율 유지만 적용 */
.image-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}


/* image-description: 이미지 설명 오버레이 */
.image-description {
    position: absolute; /* 이미지 위에 겹치도록 */
    bottom: 0; /* 이미지 아래쪽에 위치 */
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 반투명 검정 배경 */
    color: #ffffff; /* 흰색 글씨 */
    padding: 15px 20px;
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 */
    transform: translateY(100%); /* 기본적으로 아래로 숨김 */
    transition: transform 0.3s ease-out; /* 부드러운 애니메이션 */
    opacity: 0; /* 처음에는 투명하게 */
    text-align: center;
    display: flex; /* 텍스트 정렬을 위해 flexbox 사용 */
    align-items: center; /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    min-height: 50px; /* 설명 최소 높이 */
}

/* image-wrapper에 마우스 호버 시 설명 표시 */
.image-wrapper:hover .image-description {
    transform: translateY(0); /* 위로 올라와 보이게 함 */
    opacity: 1; /* 투명도 1로 변경 */
}

/* 폰트 크기 및 스타일 조정 (선택 사항) */
.image-description p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}



/* 모바일 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 25px 30px;
        margin: 15px;
    }

    header h1 {
        font-size: 2em;
        line-height: 0.8em;
        margin-bottom: 50px;
    }

    .sub-text {
        font-size: 0.9em;
        margin-bottom: 50px;
    }

    /* 모바일에서는 버튼을 이미지 위아래로 배치하는 대신, 이미지 옆에 유지 */
    /* 단, 버튼의 좌우 여백을 줄여 이미지와의 공간을 확보 */
    .nav-button {
        padding: 10px 15px;
        font-size: 1.5em;
        /* position: absolute;  기본값 유지 */
        /* transform: translateY(-50%); 기본값 유지 */
    }
    .prev-button { left: 5px; } /* 이미지 가장자리에서 더 가깝게 */
    .next-button { right: 5px; } /* 이미지 가장자리에서 더 가깝게 */


    .image-gallery img {
        max-height: 400px; /* 모바일에서 이미지 높이 제한 */
        object-fit: contain;
    }

    .message-box {
        padding: 15px;
        margin-top: 25px;
        font-size: 0.85em;
    }
    .image-description {
        /* 모바일에서는 호버 없이도 항상 보이도록 할 경우 */
        /* opacity: 1;
        transform: translateY(0); */
        /* 또는 마우스 호버 이벤트를 사용하지 않으려면 JavaScript에서 다른 로직을 적용해야 합니다. */
        padding: 10px 15px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
        line-height: 0.8em;
    }

    .sub-text {
        font-size: 0.8em;
    }

    .nav-button {
        font-size: 1.2em;
        padding: 8px 12px;
    }

    .image-gallery img {
      max-width: 100%; /* 부모 요소(image-gallery)의 최대 너비를 넘지 않도록 100% 설정 */
      height: auto; /* 너비가 조절될 때 높이도 자동으로 비율에 맞춰 조절되도록 */
      max-height: 550px; /* 이미지의 최대 높이 설정 */
      display: block;
      border: 1px solid #ddd;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  
      /* --- 이미지 비율 유지 및 컨테이너 채우기/맞추기 설정 --- */
      object-fit: contain; /* 또는 cover, fill, scale-down, none */
      /* object-position: center; /* 이미지가 컨테이너 내에서 어떻게 정렬될지 (기본값 center) */
  }
}
