/* 페이지 이동(움찔거림) 방지 코드 */
html {
    overflow-y: scroll;
}

/* 기본 스타일 및 폰트 설정 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #212529;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 상단 언어 전환 버튼 --- */
#lang-switcher {
    z-index: 1000;
    text-align: center;
    padding-top: 20px;
    display: flex;           /* 이 줄 추가 */
    justify-content: center; /* 이 줄 추가 */
}

/* ✨✨✨ 버튼 폭과 크기 문제를 해결했습니다 ✨✨✨ */
#lang-switcher button {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    transform: scale(1);
    min-width: 100px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    height: 40px;                   
    display: flex;                  
    align-items: center;            
    justify-content: center;         
    line-height: 1.2;               
}

#lang-switcher button:first-child {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

#lang-switcher button:last-child {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    border-left: none;
}

#lang-switcher button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    /* [수정] 활성화 시 커지는 효과를 제거했습니다. */
    /* transform: scale(1.1); */
}
/* --- 여기까지 수정 --- */


/* --- 메인 콘텐츠 레이아웃 --- */
.main-wrapper {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

/* --- 인트로 화면 (메뉴 추천 시작) --- */
.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.chef-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

#intro-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

#start-btn, .option-btn, #retry-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

#start-btn:hover, .option-btn:hover, #retry-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* --- 질문 화면 --- */
.question-box {
    padding: 20px 0;
}

.question-box h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- 결과 화면 --- */
#result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#food-recommendation {
    margin-bottom: 15px;
}

#food-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
    margin: 10px 0;
}

#food-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

/* --- 광고 영역 --- */
#adsense-ad {
    margin-top: 20px;
    text-align: center;
}

/* --- 면책 조항 --- */
.disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
    box-sizing: border-box;
}

.disclaimer:not(.hidden) {
    transform: translateY(0);
}

.disclaimer p {
    margin: 0;
    font-size: 0.9rem;
}


/* --- 독립 맛집 검색 영역 --- */
#standalone-search-section {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 40px auto;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

#standalone-search-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #007bff;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#standalone-search-section input[type="text"] {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 200px;
    flex: 1;
}

#standalone-search-section button {
    padding: 12px 22px;
    border: none;
    background-color: #28a745;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#standalone-search-section button:hover {
    background-color: #218838;
}

/* --- 블로그 및 정적 페이지 --- */
#page-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-sizing: border-box;
}

.blog-post-content img, .static-page-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.blog-post-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    align-items: center;
}
.blog-post-summary:last-child {
    border-bottom: none;
}

.blog-thumbnail {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.blog-text-content {
    text-align: left;
}

.blog-text-content h3 {
    margin: 0 0 10px 0;
}

/* --- 하단 푸터 --- */
.site-footer {
    width: 100%;
    background-color: #e9ecef;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links .nav-btn {
    background: none;
    border: none;
    color: #495057;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.footer-links .nav-btn:hover,
.footer-links .nav-btn.active {
    color: #007bff;
    font-weight: 700;
}

/* --- 유틸리티 클래스 --- */
.hidden {
    display: none !important;
}

/* --- 애니메이션 --- */
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#result-container:not(.hidden) .chef-image,
#result-container:not(.hidden) #food-recommendation {
    animation: zoomIn 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
