@font-face {
    font-family: 'Dalmoori';
    src: url('fonts/dalmoori.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #f4f4f8;
    overflow: hidden;
    color: #333333;
    font-family: 'Pretendard', sans-serif;
}

.credit-text {
    font-family: 'Dalmoori', sans-serif;
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.15);
    margin: 0;
    padding: 0;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.company-logo {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 60px;
    height: auto;
    opacity: 0.6;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

body.slideshow-active .credit-text, body.slideshow-active .company-logo,
body.player-active .credit-text, body.player-active .company-logo,
body.slideshow-active .main-logo, body.player-active .main-logo { opacity: 0; pointer-events: none; }

/* 메뉴 컨테이너: 여전히 전체 화면 중앙에 정렬 */
.menu-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* 메뉴1, 메뉴2 그룹 자체를 중앙 정렬 */
    gap: 20px;
}

/* 메뉴1, 메뉴2 그룹: 버튼들을 세로로 정렬 */
#menu1, #menu2 {
    display: flex;
    flex-direction: column; /* 버튼들을 세로로 정렬 */
    align-items: center; /* 각 버튼을 가로축 중앙에 정렬 */
    gap: 20px;
}

/* 데이터 로딩 중 텍스트 중앙 정렬 */
#menu1 p {
    display: block;
    width: auto;
    font-size: 24px;
    text-align: center; /* 텍스트 중앙 정렬 추가 */
}

/* 모든 메뉴 버튼에 적용 */
.menu-container button {
    background: #ffffff;
    color: #333333;
    font-family: 'Dalmoori', sans-serif; /* <-- 이 줄 추가 */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    border: 1px solid #dddddd;
    font-size: 24px; /* 기준 폰트 크기 */
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-shadow: none;
    
    /* --- ⭐️ 이 부분이 수정되었습니다 ⭐️ --- */
    width: 350px;             /* 원하는 너비로 고정 (예: 350px) */
    padding: 20px 15px;      /* 좌우 패딩을 약간 줄여 텍스트 공간 확보 */
    box-sizing: border-box;
    text-align: center;

    /* 텍스트의 세로 중앙 정렬을 위해 flex 속성 사용 */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    
    /* 아래 속성들은 더 이상 필요 없으므로 삭제합니다. */
    /* text-overflow: ellipsis; */
    /* overflow: hidden; */
}

/* 이전으로 버튼과 다른 버튼 사이에 간격 추가 */
.back-button-spacer {
    height: 20px; /* 간격 조절 */
}

/* 슬라이드쇼 및 플레이어 관련 스타일 (기존 코드와 동일) */
.slide-track {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
}

.slide-track img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide-track img.active {
    opacity: 1;
}

.player-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: none;
    background-color: #000;
}

#youtube-player {
    width: 100%;
    height: 100%;
}

#play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* display: none; /* 평소에는 JS에서 제어하므로 주석 처리 또는 제거 */
}

#play-button {
    font-size: 80px;
    color: white;
    background: none;
    border: 3px solid white;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    line-height: 110px;
    text-align: center;
    transition: transform 0.2s ease;
}

#play-button:hover {
    transform: scale(1.1);
}

.main-logo {
    display: block;
    width: 300px; /* 로고 너비 */
    margin: 50px; /* 위아래, 좌우(자동 중앙 정렬) 여백 */
    transition: opacity 0.5s ease;
}

.menu-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column; /* 아이템을 세로로 배치 */
    justify-content: center; /* 세로 중앙 정렬 */
    align-items: center;     /* 가로 중앙 정렬 */
}

/* 버튼 호버 시 입체 효과 */
.menu-container button:hover {
    transform: translateY(-3px); /* 버튼을 살짝 위로 이동 */
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.15); /* 그림자를 더 뚜렷하게 */
}

/* 로고가 부드럽게 나타나는 애니메이션 정의 */
@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 중앙 로고에 애니메이션 적용 */
.main-logo {
    animation: fadeInLogo 0.8s ease-out forwards;
}

/* 버튼 클릭 시 눌리는 효과 */
.menu-container button:active {
    transform: translateY(1px); /* 버튼을 살짝 아래로 이동 */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* 그림자를 약하게 */
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: none; /* 평소에는 숨김 */
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2em;
    font-family: 'Dalmoori', sans-serif;
}