@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

.gradient-text {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar Hide */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Button Styles */
.case-btn {
    transition: all 0.3s ease;
}
.case-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}
.dark .case-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.slider-wrapper {
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Smooth anchor scroll offset */
section {
    scroll-margin-top: 80px;
}

/* Chat UI Styles & Animation */
.chat-message {
    max-width: 90%;
    margin-bottom: 0.8rem;
    animation: fadeInUp 0.3s ease-out forwards;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}

.chat-message.ai {
    align-items: flex-start;
    margin-right: auto;
    text-align: left;
}

.chat-bubble {
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    display: inline-block;
    line-height: 1.4; 
    font-size: 0.9rem;
    text-align: left; 
    word-break: break-word;
}

.chat-bubble.user {
    background-color: #2563eb;
    color: white;
    border-bottom-right-radius: 0;
}

.chat-bubble.ai {
    background-color: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 0;
    border: 1px solid #e5e7eb;
}

.dark .chat-bubble.ai {
    background-color: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

/* Typing Indicator */
.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9ca3af;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Chat Content Styles */
.chat-content strong { 
    font-weight: 600; 
    color: #2563eb; 
}
.dark .chat-content strong { color: #60a5fa; }

.chat-content h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: #1e3a8a;
}
.dark .chat-content h4 { color: #93c5fd; }

.chat-content ul {
    list-style-type: disc;
    margin-left: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Chat Buttons Style - Fixed Visibility */
.chat-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.chat-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background-color: white;
    color: #4b5563;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-btn:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
}

/* Primary Button (네, 신청할게요) - 강제 적용 */
.chat-btn.primary {
    background-color: #2563eb !important; /* 배경 파란색 강제 */
    color: white !important;               /* 글자 흰색 강제 */
    border-color: #2563eb !important;
}

.chat-btn.primary:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* 다크모드 대응 */
.dark .chat-btn {
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .chat-btn:hover {
    background-color: #4b5563;
}

/* 다크모드에서도 Primary 버튼은 파란색 유지 */
.dark .chat-btn.primary {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
}

/* Save Modal */
#save-modal {
    backdrop-filter: blur(5px);
}

/* Animations */
#chat-container {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 0;
    opacity: 0;
    transform: scale(0.95);
    overflow: hidden;
    visibility: hidden;
}
#chat-container.active {
    max-height: 800px;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    display: flex; /* [수정] 활성화 시 flex 표시 */
}
#search-container {
    transition: all 0.4s ease;
    max-height: 300px;
    opacity: 1;
}
#search-container.hidden-animate {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Search Tags Expand Transition */
#search-tags-container {
    transition: max-height 0.5s ease-in-out;
}

/* [수정] 이미지 레이지 로딩 트랜지션 */
img.transition-opacity {
    transition: opacity 0.8s ease-in-out;
}

/* ==========================================================================
   [Admin Mode] Remote Cursor Styles
   - 모바일 터치 시 끊김 현상을 방지하기 위해 transition 속성이 핵심입니다.
   ========================================================================== */
.remote-cursor {
    position: absolute; /* [수정됨] fixed -> absolute로 변경하여 전체 문서 좌표(pageX/Y)와 동기화 */
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    pointer-events: none; /* 커서가 클릭을 방해하지 않도록 설정 */
    z-index: 9999;
    
    /* [핵심] 0.15초 동안 부드럽게 이동 (모바일 스팟 이동 보정) */
    transition: transform 0.15s linear; 
    will-change: transform; /* 성능 최적화 */
}

.cursor-pointer-icon {
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 18px solid rgba(239, 68, 68, 0.9); /* 기본 빨간색 */
    transform: rotate(-45deg);
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.cursor-label {
    position: absolute;
    top: 15px;
    left: 12px;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    font-family: monospace;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}