/* 1. 전체 설정 */
body {
    background-color: #282c34;
    color: #ffffff;
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 2. 서번트 아이콘 & 애니메이션 */
.icon-container {
    margin-top: 20px;
    position: relative; /* 이스터에그 메시지 위치 기준점 */
}

#savant-icon {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    
    /* 기본: 천천히 돌기 (20초) */
    animation: rotate-slow 20s linear infinite;
    cursor: pointer;
    transition: transform 0.3s; /* 클릭 효과용 */

    /* [수정됨] 모바일 터치 시 검은 박스/파란 박스 제거 */
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

#savant-icon:active {
    transform: scale(0.95);
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* [이스터에그] 엄청 빠르게 돌기 (0.2초) */
.super-fast {
    animation: rotate-slow 0.2s linear infinite !important;
    filter: hue-rotate(90deg); /* 색깔도 살짝 변하면 더 재밌음 */
}

/* [이스터에그] 메시지 스타일 (수정됨) */
#easter-egg-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 정확히 정중앙 배치 */
    
    background-color: rgba(0, 0, 0, 0); /* 배경 투명 */
    color: #ff4444; /* 빨간색 텍스트 */
    
    /* 텍스트 스타일 */
    font-weight: bold;
    font-size: 1.5rem;
    font-style: italic;
    
    /* [수정됨] 줄바꿈 방지 및 쉐도우 추가 */
    white-space: nowrap;       /* 무조건 한 줄로 표시 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 0, 0, 0.5); /* 검은 그림자 + 붉은 빛 */
    
    pointer-events: none; /* 클릭 방해 안 함 */
    opacity: 0;
    transition: opacity 1.5s;
    z-index: 10;
}

#easter-egg-msg.show {
    opacity: 1;
}

/* 3. 명제 표시 영역 */
.proposition-area {
    height: 160px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

#proposition-text {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: bold;
    word-break: keep-all;
    line-height: 1.5;
    color: #eeece1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin: 0;
}

/* 4. 버튼 및 컨트롤 */
.control-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
    align-items: center; /* 드롭다운 중앙 정렬 */
}

#generate-btn {
    width: 100%; /* 버튼은 가득 차게 */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('button-bg.png'); 
    background-color: #17006b; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    
    /* [추가] 모바일 터치 하이라이트 제거 */
    -webkit-tap-highlight-color: transparent;
}

#generate-btn:active {
    transform: scale(0.95);
}

/* [수정됨] 드롭다운 메뉴 작게 만들기 */
.select-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

#language-select {
    padding: 5px 10px;     /* 패딩 줄임 */
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #3b4048; /* 배경색 어둡게 */
    color: #ccc;
    font-size: 0.8rem;     /* 폰트 크기 줄임 */
    text-align: center;
    cursor: pointer;
    width: 30%;            /* 너비 30% 수준 */
    opacity: 0.8;          /* 살짝 흐리게 */
    transition: opacity 0.2s;
}

#language-select:hover {
    opacity: 1;
}

/* 5. 하단 링크 및 푸터 */
/* [수정됨] 2x2 그리드 배치 적용 */
.footer-links {
    display: grid;               /* Flex 대신 Grid 사용 */
    grid-template-columns: repeat(2, 90px); /* 90px 너비의 기둥 2개 생성 */
    justify-content: center;     /* 전체 그리드를 중앙 정렬 */
    gap: 15px;                   /* 버튼 사이 간격 (조금 넉넉하게) */
    margin-top: 30px;
    width: 100%;
}

/* [수정됨] 하단 버튼 3개 크기 통일 */
.link-btn {
    text-decoration: none;
    color: #ccc;
    border: 1px solid #555;
    
    /* 고정 크기 (정사각형) */
    width: 90px;
    height: 90px;
    
    /* 내용 중앙 정렬 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    border-radius: 15px; /* 둥근 사각형 */
    font-size: 0.8rem;
    line-height: 1.3;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.05); /* 아주 연한 배경 */
    
    /* [추가] 모바일 터치 하이라이트 제거 */
    -webkit-tap-highlight-color: transparent;
}

.emoji-btn {
    font-size: 0.8rem; 
}

.link-btn:hover {
    background-color: #444;
    color: #fff;
    border-color: #fff;
    transform: translateY(-3px); /* 마우스 올리면 살짝 떠오름 */
}

footer {
    margin-top: 40px;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
}

/* [수정됨] 푸터 링크 스타일 */
.footer-link-text {
    color: #888;
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-link-text:hover {
    color: #fff;
}

@media (max-width: 400px) {
    #proposition-text {
        font-size: 1.2rem;
    }
    .proposition-area {
        height: 140px; 
    }
}