/* 기본 스타일 초기화 및 폰트 설정 */
/* body {
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
} */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 10px;
}

header h1 {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    text-align: center;
    margin-bottom: 5px;
}

header p {
    text-align: center;
    color: #a0a0b0;
    margin-top: 0;
}

/* 검색창 스타일 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#search-type, #search-query, .search-box button {
    padding: 12px;
    border: 1px solid #4a4a5e;
    border-radius: 5px;
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-size: 16px;
}

#search-query {
    flex-grow: 1; 
}

.search-box button {
    background-color: #ff4757;
    width:70px;
    height:49px;
    line-height: 27px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #e02f3f;
    
}

/* 결과창 스타일 */
#results-container .placeholder {
    color: #7a7a8e;
    text-align: center;
    padding: 40px 0;
}

.result-item {
    background-color: #3a3a4e;
    border-left: 5px solid;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

.result-item.item { border-color: #4CAF50; } /* 아이템: 녹색 */
.result-item.quest { border-color: #fbc02d; } /* 퀘스트: 노란색 */

.result-item h3 {
    margin: 0 0 5px 0;
    color: #ffffff;
}

.result-item p {
    margin: 0;
    color: #c0c0d0;
}

/* 간단한 등장 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 기본 스타일 */
body { font-family: 'Malgun Gothic', 'Nanum Gothic', sans-serif; }
.item-dic-container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    }
.title-header { 
    color: #000; 
    padding-bottom: 20px;
    font-size: 32px; 
    font-weight: bold; 

}

/* 검색창 */
.background-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding:30px;
    margin-bottom: 30px;

}


.search{
    padding-bottom: 30px;
}
/* 1. 검색창 전체를 감싸는 컨테이너 */
.search-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #E49735
}

/* 2. 텍스트 입력창 */
input.search-input {
    flex-grow: 1; 
    border: none;
    padding: 18px 20px; 
    font-size: 16px;
    outline: none !important; 
    border:0px;
}

/* placeholder 텍스트 스타일 */
.search-input::placeholder {
    color: #aaa;
}

/* 3. 검색 버튼 */
.search-button {
    width: 70px; 
    border: none; 
    background-color: #E49735; 
    color: white; 
    font-size: 20px;
    cursor: pointer; 
    transition: background-color 0.2s ease; 
}

/* 아이템 테이블 */
.item-table { 
    width: 100%; 
    border-collapse: collapse;
    font-size:17px;
    font-weight:bold;
    background-color: rgba(255,255,255,0.3);;
}
.item-table th, .item-table td { 
    padding: 12px 10px; 
    text-align: center; 
    border-bottom: 1px solid #ddd; 
}
.item-table th { 
    background: #222C3B;
    font-size:20px;
    color: #FFF; 
    font-weight: bold; 
    border-top: 1px solid #ccc; 
}

.item-table tr:hover { background-color: #f1f1f1; }
.item-table .item-name { text-align: left; padding-left: 20px; font-weight: bold; }
.item-table .item-name a { color: #005a9c; text-decoration: none; }
.item-table .item-name a:hover { text-decoration: underline; }
.item-table .empty_table { padding: 50px 0; text-align: center; color: #777; }

/* 아이템 nav */
#container .item-dic-container .pg_wrap {
    text-align: center; 
    padding: 30px 0 20px 0;
    font-size: 0; 
    margin:auto;
}


#container .item-dic-container .pg_wrap .pg {
    float: none;
    display: inline-block; 
    vertical-align: middle;
    font-size: 14px; 
}


#container .item-dic-container .pg_wrap a,
#container .item-dic-container .pg_wrap strong {
    float: none;
    display: inline-block;
    text-decoration: none;
}


#container .item-dic-container .pg_wrap .pg_page,
#container .item-dic-container .pg_wrap .pg_next,
#container .item-dic-container .pg_wrap .pg_prev,
#container .item-dic-container .pg_wrap .pg_end,
#container .item-dic-container .pg_wrap .pg_start {
    margin: 0 4px;
    text-indent:0px;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

#container .item-dic-container .pg_wrap .pg_current {
    margin: 0 4px;
   
    border-radius: 4px;
    background: #4a6a9a;
    color: white;
    border: 1px solid #4a6a9a;
    font-weight: bold;
}

#container .item-dic-container .pg_wrap a:hover {
    background-color: #f0f0f0;
}
.item-dic-container .pg_wrap {
    text-align: center; 
    padding: 30px 0 20px 0;
}

.nav{
    width:100%;
    display: flex;
}

/* 퀘스트 완료 */
#btnQuestComplete{
    padding:10px;
    border-radius: 5px;
    color:white;
    transition: all 0.2s;
    /* background-color: #0d6efd;
    border:1px solid #0d6efd; */
    font-size:1.1em;
    line-height: 1;
}

#btnQuestComplete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; 
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}


#btnQuestComplete.btn-primary {
    background-color: #0d6efd; 
    border: 1px solid #0d6efd;
}
#btnQuestComplete.btn-primary:hover {
    background-color: #0b5ed7;
}

#btnQuestComplete.btn-danger {
    background-color: #dc3545;
    border: 1px solid #dc3545;
}
#btnQuestComplete.btn-danger:hover {
    background-color: #bb2d3b; 
}


/* --- [추가] 부트스트랩 대체용 입력창 스타일 (.form-control) --- */
.form-control {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da; /* 테두리 색상 */
    border-radius: 5px; /* 모서리 둥글게 */
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 설정 */
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe; /* 포커스 시 테두리 파란색 */
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* 포커스 시 번짐 효과 */
}

/* 수정 사유 입력칸 등 작은 입력창용 */
.form-control-sm {
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 3px;
}

/* 라벨 스타일 보정 */
.readBody label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* 1. 버튼 감싸는 영역 (중앙 정렬) */
.wiki-btn-wrap {
    text-align: center;
    margin-top: 30px;       /* 위쪽 입력칸들과의 간격 */
    margin-bottom: 10px;
}

/* 2. 버튼 공통 디자인 */
.wiki-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;               /* 아이콘과 글자 사이 간격 */
    
    padding: 10px 25px;     /* 버튼 크기 (상하 10px, 좌우 25px) */
    font-size: 14px;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 5px;     /* 모서리 둥글게 */
    cursor: pointer;
    transition: background-color 0.2s; /* 색상 변경 부드럽게 */
}

/* 3. 저장하기 버튼 (파란색) */
.wiki-form-btn.btn-save {
    background-color: #0d6efd; /* 진한 파랑 */
}
.wiki-form-btn.btn-save:hover {
    background-color: #0b5ed7; /* 마우스 올리면 더 진한 파랑 */
}

/* 4. 취소 버튼 (회색) */
.wiki-form-btn.btn-cancel {
    background-color: #6c757d; /* 회색 */
    margin-left: 10px;         /* 저장 버튼과의 사이 간격 */
}
.wiki-form-btn.btn-cancel:hover {
    background-color: #5c636a; /* 마우스 올리면 더 진한 회색 */
}


.edit-section-box {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    padding-top:0px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}


.edit-title {
    font-size: 22px;
    font-weight: 800;
    color: #2c3e50;
    border-bottom: 3px solid #4a6a9a;
    padding-bottom: 10px;
    margin-top: 20px; 
    margin-bottom: 20px;
}


.edit-title:first-of-type {
    margin-top: 0; 
}


.edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    margin-bottom: 20px;
}


.edit-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.edit-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } 
.edit-grid.cols-5 { grid-template-columns: repeat(5, 1fr); } 

.edit-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}


@media (max-width: 768px) {
    .edit-grid, 
    .edit-grid.cols-3, 
    .edit-grid.cols-4,
    .edit-grid.cols-5 {
        grid-template-columns: 1fr;
    }
}

.mb-3 {
    margin-bottom: 30px;
}

/* --- [수정] 타이틀 헤더 (Flexbox로 좌우 배치) --- */
.title-header {
    display: flex;                  /* Flex 모드 켜기 */
    justify-content: space-between; /* 요소들을 양 끝으로 밀어내기 */
    align-items: center;            /* 수직 중앙 정렬 */
    
    color: #000;
    padding-bottom: 20px;
    font-size: 32px;
    font-weight: bold;
    
    /* 아래는 선택 사항 (구분선) */
    border-bottom: 2px solid #eee; 
    margin-bottom: 20px;
}

/* --- [추가] 우측 상단 신규 등록 버튼 스타일 --- */
.btn-header-new {
    font-size: 15px;        /* 버튼 글자 크기 (타이틀보다 작게) */
    font-weight: bold;
    color: white;
    background-color: #28a745; /* 녹색 (Bootstrap success 컬러와 유사) */
    border: none;
    border-radius: 5px;     /* 둥근 모서리 */
    padding: 10px 20px;     /* 버튼 내부 여백 */
    cursor: pointer;
    transition: background-color 0.2s; /* 호버 효과 부드럽게 */
    
    /* 아이콘과 텍스트 정렬 */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;         /* 높이 틀어짐 방지 */
}

.btn-header-new:hover {
    background-color: #218838; /* 마우스 올렸을 때 진한 녹색 */
}

/* --- [수정] 타이틀 헤더 (Flexbox로 좌우 배치) --- */
.title-header {
    display: flex;                  /* Flex 모드 켜기 */
    justify-content: space-between; /* 요소들을 양 끝으로 밀어내기 */
    align-items: center;            /* 수직 중앙 정렬 */
    
    color: #000;
    padding-bottom: 20px;
    font-size: 32px;
    font-weight: bold;
    
    /* 아래는 선택 사항 (구분선) */
    border-bottom: 2px solid #eee; 
    margin-bottom: 20px;
}

/* --- [추가] 우측 상단 신규 등록 버튼 스타일 --- */
.btn-header-new {
    font-size: 15px;        /* 버튼 글자 크기 (타이틀보다 작게) */
    font-weight: bold;
    color: white;
    background-color: #28a745; /* 녹색 (Bootstrap success 컬러와 유사) */
    border: none;
    border-radius: 5px;     /* 둥근 모서리 */
    padding: 10px 20px;     /* 버튼 내부 여백 */
    cursor: pointer;
    transition: background-color 0.2s; /* 호버 효과 부드럽게 */
    
    /* 아이콘과 텍스트 정렬 */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;         /* 높이 틀어짐 방지 */
    text-decoration: none;
}

.btn-header-new:hover {
    background-color: #218838; /* 마우스 올렸을 때 진한 녹색 */
}