/* ============================================
   AI 챗봇 인터랙션 섹션 스타일
   ============================================ */

.ai-chat-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, 
        rgba(26, 11, 46, 0.95) 0%, 
        rgba(46, 16, 101, 0.98) 100%
    );
    position: relative;
    overflow: hidden;
}

/* 별 파티클 배경 */
.ai-chat-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 1px),
        radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 0.8px),
        radial-gradient(circle, rgba(244, 114, 182, 0.1) 0%, transparent 1px);
    background-position: 20% 30%, 50% 60%, 75% 40%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: gentleSparkle 15s ease-in-out infinite;
    pointer-events: none;
}

/* 채팅 컨테이너 */
.chat-container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, 
        rgba(30, 15, 50, 0.9) 0%, 
        rgba(46, 20, 80, 0.85) 100%
    );
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 
        0 10px 50px rgba(139, 92, 246, 0.4),
        0 5px 20px rgba(236, 72, 153, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
}

/* 채팅 메시지 영역 */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 개별 메시지 */
.chat-message {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.chat-message.typing-animation {
    animation-delay: 1s;
}

.chat-message.delayed-message {
    animation-delay: 2s;
}

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

/* 메시지 아바타 */
.message-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(139, 92, 246, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(236, 72, 153, 0.7);
    }
}

/* 메시지 버블 */
.message-bubble {
    flex: 1;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(139, 92, 246, 0.05) 100%
    );
    padding: 25px 30px;
    border-radius: 25px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 5px 20px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.message-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(139, 92, 246, 0.3) transparent transparent;
}

.message-bubble::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #ffffff transparent transparent;
}

/* 메시지 텍스트 */
.message-bubble p {
    margin: 0 0 15px 0;
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong {
    color: #f472b6;
    font-weight: 600;
}

/* 하이라이트 텍스트 */
.highlight-text {
    background: linear-gradient(120deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.1em;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

/* 채팅 리스트 */
.chat-list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.chat-list li {
    padding: 15px 20px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.15) 0%, 
        rgba(236, 72, 153, 0.1) 100%
    );
    border-radius: 15px;
    margin-bottom: 12px;
    border-left: 4px solid #ec4899;
    transition: all 0.3s ease;
}

.chat-list li:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.25) 0%, 
        rgba(236, 72, 153, 0.15) 100%
    );
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.chat-list li strong {
    display: block;
    color: #f472b6;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.sub-text {
    display: block;
    color: #b0b0b0;
    font-size: 0.95rem;
    margin-top: 5px;
    padding-left: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 채팅 푸터 */
.chat-footer {
    margin-top: 20px !important;
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.3) 0%, 
        rgba(236, 72, 153, 0.25) 100%
    );
    border-radius: 15px;
    text-align: center;
    font-size: 1.1rem;
    border: 2px dashed rgba(244, 114, 182, 0.6);
    color: #f0f0f0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 상담 CTA */
.consultation-cta {
    margin-top: 20px !important;
    padding: 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 15px;
    text-align: center;
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: glow 2s ease-in-out infinite;
}

.consultation-cta i {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(139, 92, 246, 0.6);
    }
    50% {
        box-shadow: 0 8px 30px rgba(236, 72, 153, 0.8);
    }
}

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

/* 반응형 */
@media (max-width: 768px) {
    .ai-chat-section {
        padding: 60px 0;
    }
    
    .chat-container {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .chat-messages {
        gap: 20px;
    }
    
    .message-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .message-bubble {
        padding: 20px;
        border-radius: 20px;
    }
    
    .message-bubble p {
        font-size: 0.95rem;
    }
    
    .chat-list li {
        padding: 12px 15px;
    }
    
    .chat-list li strong {
        font-size: 1rem;
    }
    
    .sub-text {
        font-size: 0.85rem;
    }
    
    .consultation-cta {
        font-size: 1rem !important;
        padding: 15px;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .message-bubble p {
        font-size: 0.9rem;
    }
    
    .chat-list li {
        padding: 10px 12px;
    }
}
