@charset "utf-8";
/* CSS Document */


/* 공통 */

*{
	margin:0;
	padding:0;
}

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, p, form, figure, fieldset, input, th, td{margin:0;padding:0;}
/*
*:focus {
    outline: 0;
}
*/

.makechat :focus-visible {
    outline: 5px solid #666;
}

html,body{
	height: 100%;
	width: 100%;
	position: fixed;
	background:#F5F7FA;
	-webkit-overflow-scrolling: touch;
 }

img{border:none;}

.clear{clear:both;}

.btn{cursor:pointer;}

.click{cursor:default;}

button{
	border: none;
}

body{
	font-family: '맑은 고딕', 'notokr-regular', sans-serif;
}

.makechat {
    text-size-adjust: 100%;
    font-feature-settings: normal;
    font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-variation-settings: normal !important;
    line-height: 1.5;
    tab-size: 4;
	display:none;
	letter-spacing:-1px;
}

.makechat,.makechat_msg{
	background:#343541 !important;
}

.makechat_msg{
	padding-left: 20px;
	padding-right: 20px;
	letter-spacing:0;
	font-size:16px;
}

/* 개행 표시 */
.makechat_msg_item_msg{
	white-space: pre-wrap;
}

/* 링크 스타일 - 모바일/데스크탑 공통 */
.makechat_msg_item_msg a {
	color: #8b5cf6; /* 보라색 */
	text-decoration: underline;
	cursor: pointer;
}

.makechat_msg_item_msg a:visited {
	color: #7c3aed; /* 방문한 링크 진한 보라색 */
}

.makechat_msg_item_msg a:hover {
	color: #a78bfa; /* 호버 시 밝은 보라색 */
	text-decoration: underline;
}

.makechat_msg_item_msg a:active {
	color: #6d28d9; /* 클릭 시 더 진한 보라색 */
}


/* 상단 */
.makechat_top{
    display: flex; /* Flexbox 사용 */
    justify-content: space-between; /* 양 끝에 요소 배치 */
    align-items: center; /* 세로 중앙 정렬 */
    padding-left: 15px; /* 여백 추가 */
    padding-right: 15px; /* 여백 추가 */
	color:#FFF;
	font-weight:bold;
}

.makechat_top_logo {
    font-size:18px;
}

.makechat_btn_shareLink {
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background-color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.share-button i {
  font-size: 20px;
}

.share-button:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

#makechat_btn_close {
    background: none;
    border: none;
    cursor: pointer;
}

#makechat_btn_close i {
    font-size: 20px; /* 아이콘 크기 */
}


/* 하단 */
.makechat_bottom{
	background:#FFF;
	padding-top:10px;
	padding-bottom:10px;
}

.makechat_input{
	width:100%;
	position:absolute;
	bottom:20px;
	z-index:10000;
}

.makechat_input {
	width:calc(100% - 40px);
	margin-left:20px;
	margin-right:20px;
    display: flex; /* Flexbox 사용 */
    align-items: center; /* 세로 중앙 정렬 */
    justify-content: space-between; /* 요소들 사이에 공간 분배 */
}

.makechat_input {
    border: 1px solid #666; /* 경계선 색상 */
    border-radius: 15px; /* 경계선 둥글게 */
    padding-left: 20px; /* 내부 여백 */
    padding-right: 20px; /* 내부 여백 */
    resize: none; /* 크기 조절 기능 비활성화 */
	position:static;
	height:50px;
	width:calc(100% - 40px);
	background:#FFF;
}

.makechat_input textarea{
	width:100%;
	height:30px;
	line-height:20px;
	margin-left:5px;
	margin-right:5px;
	color:#FFF;
	font-size:1rem;
	padding-left:5px;
	padding-right:5px;
	box-sizing: border-box;
	border:none;
	outline: none !important;
	font-family: '맑은 고딕', 'notokr-regular', sans-serif;
    background-color: transparent; /* 배경색 투명 */
	font-size:14px;
	box-sizing:content-box;
	overflow:hidden;
	background:#FFF;
	margin-top: 10px;
}

.makechat_input_msg {
    flex-grow: 1; /* 나머지 공간 채우기 */
    margin: 0 10px; /* 좌우 여백 */
    color: #fff; /* 글자색 (밝은색 권장) */
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

button i {
    color: #FFF; /* 아이콘 색상 */
    font-size: 16px; /* 아이콘 크기 */
}

/* white 스킨 */
.makechat_white.makechat{
	background:#FFF !important;
}

.makechat_white .makechat_msg{
	background:#FFF !important;
}
.makechat_top{
	color:#333;
}

.makechat_white button i {
    color: #333; /* 아이콘 색상 */
}

.makechat_white .txt_makechat_input_msg {
    color: #333; /* 아이콘 색상 */
}
.pcoded-main-container{
	background:#FFF;
}




/* 메세지 */
.makechat_msg{
	background:#e8e8e8;
    overflow-y: scroll;
	box-sizing: border-box;
	overflow-x: hidden;
}


.makechat_msg_item_msg_conv_name{
	font-weight:900;
}

.makechat_msg_item_msg{
	margin-bottom:10px;
}
.makechat_msg_item_tools{
	height:20px;
	width:100%;
	margin-bottom:20px;
	color:#999;
}
.makechat_msg_item_tools i{
	cursor:pointer;
}

.makechat_msg_item_img {
	flex-shrink: 0; /* flex 컨테이너에서 축소되지 않음 */
    margin-left:20px;
    width: 30px;  /* 크기 증가 */
    height: 30px; 
    border-radius: 15px; 
    margin-right: 10px;
    margin-top:4px;
    float: left;
}

.makechat_msg_item {
    display: flex;
    align-items: flex-start; /* 이미지를 상단에 고정 */
}

/* 코드 블락 */
.msg_block_code_head{
	color: #FFF;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    font-weight: 300;
    background: #333;
    padding-left: 10px;
    box-sizing: border-box;
	border-top-left-radius:10px;
	border-top-right-radius:10px;
}
.msg_block_code_head_title{
	width:50%;
	float:left;
}
.btn_msg_block_code_copy{
	width:80px;
    height: 30px;
    line-height: 30px;
	margin-right:10px;
	float:right;
	text-align:right;
	color:#FFF;
	cursor:pointer
}
.btn_msg_block_code_copy i{
	font-size:14px;
	margin-right:4px;
}
.msg_block_code_msg{
	color:#FFF;
	font-weight:300;
	background:#000000;
	padding:10px 15px 10px 15px;
	box-sizing: border-box;
	border-bottom-left-radius:10px;
	border-bottom-right-radius:10px;
}






/* Font Awesome 아이콘 스타일 */
.fas {
    font-size: 16px; /* 아이콘 크기 */
    color: #FFF; /* 아이콘 색상 */
}




/*********** 메세지 코드 블록 ***********/
.copy-button {
	cursor: pointer;
	background-color: #eee;
	border: none;
	padding: 5px 10px;
	border-radius: 3px;
	margin: 5px;
	font-size: 12px;
	float: right; /* 버튼을 오른쪽에 위치시킵니다 */
}

.copy-button:hover {
	background-color: #ddd;
}

.prism-show-language-label {
	font-size: 0.85em;
	color: #fff;
	padding: 0.5em;
	background-color: #333;
	clear: both; /* float 스타일을 초기화합니다 */
	border-top-left-radius:5px;
	border-top-right-radius:5px;
	position:relative;
}


.prism-show-language-label .btn_msg_block_code_copy{
	width: 80px;
	height: 20px;
	line-height: 20px;
	font-size: 12px;
	float: right;
	text-align: right;
	color: #FFF;
	cursor:pointer
	top:5px;
	right:5px;
}
.prism-show-language-label .btn_msg_block_code_copy i{
	font-size:14px;
	margin-right:4px;
}

pre {
	background:#000;
	border-bottom-left-radius:5px;
	border-bottom-right-radius:5px;
	margin-bottom:0;
	position: relative;
	width:100%;
}
/*********** 메세지 코드 블록 ***********/

cite {
    color: #666;
    font-style: normal;
}

.sources-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.sources-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.sources-container h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-item {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
	cursor:pointer;
}

.source-item strong {
    color: #2c5282;
    margin-right: 6px;
}

.reference {
    color: #666;
    font-style: normal;
}

.sources-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-item {
    margin: 5px 0;
    color: #666;
}

.source-item strong {
    color: #2c5282;
    margin-right: 6px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* source-item의 기본 스타일은 유지 */
/* 기존 코드 수정 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* source-item의 기본 스타일은 유지 */
.source-item {
    margin: 5px 0;
    color: #666;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.2s;
}

/* 새로 추가되는 항목에만 애니메이션 적용 */
.source-item.new {
    animation: fadeIn 0.5s ease-in-out;
}

.source-item:hover {
    background-color: #f1f5f9;
}



/* 모바일 대응을 위한 미디어 쿼리 */
/* document index 2의 @media screen and (max-width: 768px) 부분을 아래와 같이 수정 */
@media screen and (max-width: 768px) {
    .makechat {
        height: 100vh;
        width: 100vw;
        position: fixed;
        top: 0;
        left: 0;
        overflow: hidden; /* 전체 스크롤 방지 */
    }
	.makechat_top{
		background-color:#3498db;
		color:#FFF;
	}	
	.makechat_top_logo{
		width:100%;
		text-align:center;
	}

    .makechat_msg {
        height: calc(100vh - 130px); /* 상단 헤더(50px)와 하단 입력창(80px) 고려 */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS 스크롤 부드럽게 */
        padding: 20px;
		padding-right:30px;
        font-size: 16px; /* iOS에서 자동 확대 방지 */
    }

    .makechat_bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 10px;
		height:40px !important;
    }

    .makechat_input {
        position: relative;
        bottom: 0;
        margin: 0 10px;
        height: 45px;
        border-radius: 22px;
    }

    .makechat_input textarea {
        padding: 12px 5px;
        margin-top: 0;
        line-height: 20px;
        font-size: 16px; /* iOS에서 자동 확대 방지 */
        height: 20px !important; /* 추가: 높이 고정 */
        max-height: 20px !important; /* 추가: 최대 높이 제한 */
        overflow-y: auto; /* 추가: 스크롤 허용 */
    }

    /* 버튼 터치 영역 확대 */
    .btn_makebot_home,
    .btn_makebot_sumit {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
	.makechat_msg_item_img{
		margin-left:0;
	}
}

/* iOS 노치 디자인 대응 */
@supports (padding: max(0px)) {
    .makechat_bottom {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    .makechat_msg {
        padding-top: max(15px, env(safe-area-inset-top));
    }
}

/* AI 프로필 이미지 애니메이션 */
.makechat_msg_item_img.ai-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex !important;  /* 추가 */
    align-items: center !important;  /* 추가 */
    justify-content: center !important;  /* 추가 */
}

/* 아이콘 스타일 추가 */
.makechat_msg_item_img.ai-avatar i {
    font-size: 20px;
    color: white;
    z-index: 2;
    position: relative;
}

/* 반짝이는 효과 추가 */
.makechat_msg_item_img.ai-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shine 2s infinite;
    z-index: 1;  /* 추가 */
}

/* 그라디언트 이동 애니메이션 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 반짝임 애니메이션 */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* AI가 응답 중일 때 더 빠른 애니메이션 */
.makechat_msg_item_img.ai-avatar.responding {
    animation: gradientShift 1.5s ease infinite, pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
}

/* ===== Gemini 스타일 스트리밍 ===== */

/* 타이핑 커서 */
.typing-cursor {
	display: inline-block;
	width: 8px;
	height: 16px;
	background: linear-gradient(135deg, #588bff 0%, #7b68ee 100%);
	border-radius: 2px;
	margin-left: 2px;
	vertical-align: middle;
	animation: cursorBlink 1s infinite;
	transform: translateY(-1px);
}

@keyframes cursorBlink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* 새로 등장하는 글자 청크 - 부드럽게 페이드인 */
.stream-chunk {
	display: inline;
	opacity: 0;
	animation: chunkFadeIn 0.25s ease-out forwards;
}

@keyframes chunkFadeIn {
	from {
		opacity: 0;
		filter: blur(2px);
	}
	to {
		opacity: 1;
		filter: blur(0);
	}
}

/* 스트리밍 중 메시지 박스에 살짝 글로우 효과 */
.makechat_msg_item_msg.is-streaming {
	position: relative;
}

.makechat_msg_item_msg.is-streaming::after {
	content: '';
	position: absolute;
	left: 0; top: 0; right: 0; bottom: 0;
	border-radius: inherit;
	background: linear-gradient(135deg, rgba(88,139,255,0.04), rgba(123,104,238,0.04));
	pointer-events: none;
	animation: streamGlow 2s ease-in-out infinite;
}

@keyframes streamGlow {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 0.7; }
}