@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
    --primary-color: #ff577f; /* 로맨틱한 핑크 컬러로 변경 */
    --background-color: #fdf6f8;
    --text-color: #333;
    --card-bg: #ffffff;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    flex-direction: column;
}

.container {
    max-width: 400px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--primary-color);
}

h2 {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 30px;
}

.cta-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.gender-btn, .answer-btn {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid #ddd;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

/* 마우스를 올렸을 때, 그리고 'selected' 클래스가 붙었을 때 동일한 효과 적용 */
.gender-btn:hover,
.answer-btn:hover,
.answer-btn.selected {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.02);
    /* box-shadow를 추가하여 조금 더 눈에 띄게 만듭니다 */
    box-shadow: 0 0 10px rgba(255, 87, 127, 0.3);
}
/* 로딩 애니메이션 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 결과 페이지 */
.result-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    margin-bottom: 30px;
}

.catchphrase {
    font-size: 1rem;
    color: #888;
    margin-top: 0;
}

#result-name {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

#result-image {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-section {
    text-align: left;
    margin-bottom: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.result-section h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.result-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap; /* 줄바꿈 문자를 인식하도록 설정 */
}

#result-keywords {
    color: var(--primary-color);
    font-weight: bold;
}

.chemistry {
    display: flex;
    gap: 15px;
}

.chemistry-box {
    flex: 1;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}
.chemistry-box p {
    margin: 0;
    line-height: 1.5;
}
.chemistry-box strong {
    font-size: 0.8rem;
}

.share-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
/* --- 광고 컨테이너 스타일 --- */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 320px; /* 광고 너비(data-ad-width)와 일치 */
    height: 100px; /* 광고 높이(data-ad-height)와 일치 */
    margin: 30px auto 0; /* 위쪽 여백, 좌우는 자동으로 가운데 정렬 */
    background-color: #f0f0f0; /* 광고 로딩 전 배경색 */
}

/* 세로 광고 컨테이너 스타일 */
.ad-container-vertical {
    display: none; /* 모바일에서는 기본적으로 숨김 */
    position: fixed;
    left: 20px;
    top: 50%;
    justify-content: center;
    align-items: center;
    transform: translateY(-50%);
    width: 160px; /* 광고 너비와 일치 */
    height: 600px; /* 광고 높이와 일치 */
    background-color: #f0f0f0; /* 광고 로딩 전 배경색 */
    z-index: 999;
}

/* 화면 너비가 1000px 이상일 때만 세로 광고를 표시 (PC 화면) */
@media (min-width: 1000px) {
    .ad-container-vertical {
        display: flex;
    }
}