body {
    font-family: 'Poppins', sans-serif; /* 모던하고 세련된 폰트 */
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5e6f5, #e0f7fa); /* 그라디언트 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    flex-direction: column; /* 광고를 아래에 배치 */
    gap: 20px; /* 인트로/채팅과 광고 간 간격 */
}

#intro, #chat {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9); /* 반투명 백그라운드 */
    backdrop-filter: blur(10px); /* 유리 효과 */
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease; /* 부드러운 전환 */
}

#intro:hover, #chat:hover {
    transform: scale(1.02); /* 호버 시 살짝 확대 */
}

#intro h1 {
    text-align: center;
    color: #ff4d94; /* 네온 핑크 */
    margin-bottom: 15px;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#intro img {
    display: block;
    margin: 15px auto;
    width: 120px;
    height: auto;
    border-radius: 50%; /* 원형 이미지 */
    border: 4px solid #00e1ff; /* 네온 블루 테두리 */
    animation: float 3s ease-in-out infinite; /* 부유 애니메이션 */
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#intro h2 {
    text-align: center;
    color: #00e1ff; /* 네온 블루 */
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.input-group select, .input-group button {
    width: 100%;
    max-width: 220px;
    padding: 12px;
    border: none;
    border-radius: 50px; /* 둥근 테두리 */
    font-size: 14px;
    background: linear-gradient(90deg, #ff80bf, #00e1ff); /* 그라디언트 배경 */
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group select:hover, .input-group button:hover {
    transform: scale(1.05); /* 호버 시 살짝 확대 */
    box-shadow: 0 5px 15px rgba(0, 225, 255, 0.4);
}

.input-group button {
    background: linear-gradient(90deg, #ff4d94, #00e1ff);
    font-weight: bold;
    margin-top: 15px;
}

#chat {
    display: none;
}

.container {
    padding: 20px;
}

.chat-container {
    height: 500px;
    overflow-y: auto;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header {
    text-align: center;
    font-size: 22px;
    color: #ff4d94;
    padding-bottom: 10px;
    border-bottom: 1px solid #00e1ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-messages {
    padding: 10px;
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 70%;
    margin: 5px 0;
    padding: 12px 18px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

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

.user-message {
    background: linear-gradient(90deg, #ff80bf, #ff4d94);
    color: #fff;
    margin-left: auto;
    text-align: right;
}

.bot-message {
    background: linear-gradient(90deg, #00e1ff, #80deea);
    color: #fff;
    margin-right: auto;
    text-align: left;
}

.user-message::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 12px solid #ff80bf;
    border-radius: 0 5px 0 0;
}

.bot-message::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid #00e1ff;
    border-radius: 5px 0 0 0;
}

.input-area {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.input-area input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    color: #333;
}

.send-button {
    padding: 12px 25px;
    background: linear-gradient(90deg, #ff4d94, #00e1ff);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 77, 148, 0.5);
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid #ff4d94;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

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


/* 옵션 버튼 스타일 */
.option-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    padding: 0 10px;
    animation: fadeIn 0.5s ease-out;
}

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

.premium-button, .restart-button {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-button {
    background: linear-gradient(90deg, #ffd700, #ff6b6b);
    color: #fff;
}

.premium-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.restart-button {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: #fff;
}

.restart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 채팅 메시지 높이 조정 (버튼 공간 확보) */
.chat-messages {
    height: 350px; /* 400px에서 축소 */
}

/* 카카오 애드핏 광고 스타일 추가 */
.ad-container {
    width: 320px;
    height: 100px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.2); /* 배경과 어울리는 반투명 스타일 */
    border-radius: 15px;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.kakao_ad_area {
    display: block !important; /* display: none을 강제로 오버라이드 */
}