/* Google Fonts에서 가져온 '고운 돋움' 폰트를 적용합니다. */
body {
    background-color: #0c0c1a;
    color: #cccccc;
    font-family: 'Gowun Dodum', sans-serif;
    margin: 0;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

/* 첫 화면을 꽉 채우는 컨테이너 */
.viewport-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.main-header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 2s ease 0.5s forwards;
}

h1 {
    font-size: 2em;
    font-weight: 400;
    color: #e0e0e0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    transition: opacity 0.5s ease;
}

button#twinkle-button {
    background-color: transparent;
    color: #bbbbbb;
    border: 1px solid #777777;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 0.9em;
    margin-top: 20px;
    transition: all 0.3s ease;
    animation: heartbeat 2.5s infinite ease-in-out;
}

button#twinkle-button:hover {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    animation-play-state: paused;
}

.language-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.language-container {
    display: flex;
    align-items: center;
    white-space: normal;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.language-container:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.star {
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 12px 3px white;
    margin-right: 12px;
    animation: subtleTwinkle 3s infinite ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.star.clicked {
    transform: scale(2);
    box-shadow: 0 0 25px 8px white;
}

.language-text {
    font-size: 0.95em;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.language-container:hover .language-text {
    color: #e0e0e0;
}

#language-field.desktop-layout .language-container {
    position: absolute;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

#language-field.mobile-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    box-sizing: border-box;
    padding-bottom: 40px;
}

#language-field.mobile-layout::-webkit-scrollbar {
    width: 5px;
}
#language-field.mobile-layout::-webkit-scrollbar-track {
    background: transparent;
}
#language-field.mobile-layout::-webkit-scrollbar-thumb {
    background-color: #555555;
    border-radius: 5px;
}

#language-field.mobile-layout .language-container {
    position: static;
    margin: 6px 0;
    width: 90%;
    max-width: 450px;
}

/* [수정됨] 하단 여백 조절 */
.main-footer-text {
    padding: 80px 40px 40px 40px;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #888888;
    line-height: 1.9;
    background-color: #0c0c1a;
}
.main-footer-text p { margin: 1.2em 0; }
.translations-list {
    margin: 2.5em 0;
    font-size: 0.95em;
    color: #666666;
    line-height: 1.7;
    font-style: italic;
    opacity: 0.7;
}

/* [추가됨] 두 번째 footer 스타일 */
.sub-footer-text {
    padding: 40px 40px 80px 40px;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #888888;
    line-height: 1.9;
    background-color: #0c0c1a;
    border-top: 1px solid #333; /* 위쪽 footer와 구분을 위한 선 (선택 사항) */
}
.sub-footer-text p {
    margin: 1.2em 0;
}


@keyframes subtleTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}
@keyframes fadeIn { to { opacity: 1; } }

@keyframes heartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(200, 200, 255, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(200, 200, 255, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(200, 200, 255, 0.2);
    }
}

/* 페이지 전환 페이드 아웃 오버레이 스타일 */
#fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    opacity: 0;
    z-index: 9999;
    pointer-events: none; /* 평소에는 클릭되지 않도록 설정 */
    /* transition 속성 제거: JavaScript에서 제어합니다. */
}
#fade-overlay.visible { opacity: 1; pointer-events: auto; }