/* --- Pretendard 폰트 설정 --- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* --- 기본 스타일 및 스크롤바 숨김 --- */
:root {
    --app-bg: #121212;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--app-bg);
    font-family: 'Pretendard', sans-serif;
    color: #ffffff;
    /* 스크롤바 숨기기 (기능은 유지) */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* 이미지 드래그 방지 */
    -webkit-user-drag: none;
    
    /* 우클릭 메뉴(컨텍스트 메뉴) 호출 방지 (일부 브라우저) */
    -webkit-touch-callout: none;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
}

* img {
    pointer-events: none;
    -webkit-user-drag: none;
}

* {
    font-family: 'Pretendard', sans-serif;
}

body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* --- 레이아웃 설정 --- */
.app-container {
    width: 100%;
    max-width: 32rem;
    /* tailwind max-w-lg */
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

header {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background-color: rgba(18, 18, 18, 0.8);
}

main {
    flex: 1;
    padding-top: 8rem;
    /* header 공간 */
    padding-bottom: 10rem;
    /* form 공간 */
    /* 내부 트랜지션 제거 */
    transition: none !important;
}

/* --- 입력 UI 스타일 --- */
#form {
    transition: none !important;
    background-color: var(--app-bg);
}

#input {
    transition: none !important;
    line-height: 1.5;
}

/* --- 애니메이션 및 말풍선 --- */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-animate {
    animation: slideUpFadeIn 0.3s ease-out;
}

.markdown-content {
    line-height: 1.6;
    word-break: break-all;
    user-select: text;
}

.markdown-content p {
    margin: 0.25rem 0;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.25rem;
}

.autocomplete-items {
    position: absolute;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    /* 최대 높이 지정 */
    overflow-y: auto;
    /* 내용이 길면 스크롤 */
    border-top: none;
    border-bottom: none;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #1b1b1b;
    border-bottom: 2px solid #444444;
    color: #fff;
}

.autocomplete-items div:hover {
    color: #657bd1;
}

.autocomplete-items small {
    color: #888;
    font-size: 12px;
}

.autocomplete-active {
    background-color: #3b82f6 !important;
}

.fade-in {
    animation: fadeIn 0.3s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.group {
    position: relative;
    margin-top: 50px;
}

.input {
    font-size: 16px;
    padding: 10px 10px 10px 5px;
    display: block;
    width: 315px;
    border: none;
    border-bottom: 1px solid #515151;
    background: transparent;
}

.input:focus {
    outline: none;
}

inputlabel {
    color: #999;
    font-size: 15px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 5px;
    top: 10px;
    transition: 0.2s ease all;
    -moz-transition: 0.2s ease all;
    -webkit-transition: 0.2s ease all;
}

.input:focus~inputlabel,
.input:valid~inputlabel {
    top: -20px;
    font-size: 14px;
    color: #3b82f6;
}

.bar {
    position: relative;
    display: block;
    width: 320px;
}

.bar:before,
.bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 1px;
    position: absolute;
    background: #3b82f6;
    transition: 0.2s ease all;
    -moz-transition: 0.2s ease all;
    -webkit-transition: 0.2s ease all;
}

.bar:before {
    left: 50%;
}

.bar:after {
    right: 50%;
}

.input:focus~.bar:before,
.input:focus~.bar:after {
    width: 50%;
}

.highlight {
    position: absolute;
    height: 60%;
    width: 100px;
    top: 25%;
    left: 0;
    pointer-events: none;
    opacity: 0.5;
}

.input:focus~.highlight {
    animation: inputHighlighter 0.3s ease;
}

@keyframes inputHighlighter {
    from {
        background: #3b82f6;
    }

    to {
        width: 0;
        background: transparent;
    }
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}