/* ===== 다크 테마 로그인 모달 CSS 시작 ===== */

/* 모달 배경 오버레이 */
#logo{
    padding: 10px;
}
#logo_img{
    width:300px;
}
#hd{
    background-color: #0F1C2A;
}
#hd_wrapper{
    height:100px;
}
#container_wr{
    display: flex;
}
#container{
    padding-left:30px;
    background-image: url('./img/world.png'); 
    background-size: cover;         
    background-position: center center; 
    background-repeat: no-repeat;
    min-height: 1150px;
}

/* 메인 페이지 전용 레이아웃 */
.index-page #container {
    width: 1200px !important; 
    padding: 0 20px; 
    background-image: none;
}
nav#gnb{
    background-color: #222C3B;
    height:68px;
}
#gnb #gnb_1dul{
    border-bottom:0px;

}
.gnb_1da{
    position: relative;
    line-height: 65px;
    padding:0 20px;
}
li.gnb_1dli{
    margin:0 15px;
}
.gnb_1dli:hover{
    border-bottom: #f39c12 3px solid;
    color:white !important;
}

li.gnb_1dli a{
    font-size:25px;
    color:white;
}
.gnb_2dli a {
    display: block;
    padding: 5px 22px;
    color: #ccc; 
    background-color: #222C3B;
    border: 1px solid #222C3B;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent; 
}
a.gnb_2da{
    font-size:22px !important;
    font-weight: 700;
}
.gnb_2dul {
    position: absolute;
    display: block;
    top: 185%; 
    left: -25%; 
    min-width: 180px; 
    background-color: #222C3B; 
    border: 1px solid #222C3B; 
    border-radius: 4px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 5px 0; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-out; 
    z-index: 900;
}
.gnb_2dli:hover{
    border-left:3px solid #f39c12
}
.gnb_2dli{
    border-left:3px solid #222C3B
}
.gnb_2dul .gnb_2dul_box{
    border: 0px;
}
.gnb_1dli:hover > .gnb_2dul {
    opacity: 1;
    visibility: visible;
    transform: translatey(-30%) translateY(0); 
}
.gnb_2dul::before {
    content: '';
    position: absolute;
    top: -8px; 
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px; 
    height: 14px;
    background: #222C3B;
    border-top: 1px solid #222C3B;
    border-left: 1px solid #222C3B;
    z-index: 901; /* 2차 메뉴 위에 나타나도록 z-index 설정 */
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.1); /* 꼬리에도 은은한 그림자 */
}

/* 꼬리 위에 1차 메뉴 호버 색상 라인 추가 */
.gnb_1dli:hover > .gnb_2dul::before {
    border-top: 1px solid #f39c12; /* ★★★ 1차 메뉴 호버 색상으로 꼬리 상단 테두리 변경 */
    border-left: 1px solid #f39c12; /* ★★★ 1차 메뉴 호버 색상으로 꼬리 좌측 테두리 변경 */
}



/* 모달 컨테이너 */
#login_modal.dark-theme {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    background-color: #2c3440;
    /* 이미지와 유사한 질감(texture) 배경 */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23364152' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    color: #e0e0e0;
    overflow: hidden; /* 내부 요소가 모서리를 벗어나지 않도록 */
}

/* 모달 헤더 */
.dark-theme .modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid #444;
}

.dark-theme .modal_title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.dark-theme .modal_title .fa-anchor {
    margin-right: 10px;
    color: #f39c12; /* 아이콘 색상 */
}

#modal_close_btn {
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
#modal_close_btn:hover {
    color: #fff;
}

.hd_login li {
    border: 1px #E49735 solid !important;
    text-align: center;
    padding: 12px;
    border-radius: 3px;
    font-family: 'Malgun Gothic', dotum, sans-serif;
    font-size: 15px;
    font-weight: bold;
}
.hd_login{
    top:30px;
}
/* 사이드 스타일 *//* 이제 이 스타일들은 오직 id="sidebar"를 가진 요소 내부에서만 작동합니다.
*/

/* 사이드바 전체 영역 */
#sidebar {
    width: 200px;
    float: left;
    /* margin-right: 20px; */
    display: flex;
    flex-direction: column;
    background-color: #222C3B;
}

/* 사이드바 위젯 박스 */
#sidebar .widget {
    background: #ffffff;
    /* border-radius: 8px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* padding: 25px; */
    margin-bottom: 25px;
    /* border: 1px solid #f0f0f0; */
}

/* 1차 메뉴 제목 (위젯 타이틀) */
#sidebar .widget-title {
    font-size: 25px;
    font-weight: 600;
    background-color: #0F1C2A;
    color: #FFF;
        padding: 12px 30px;
        
    }

/* 2차 메뉴 목록 전체 */
#sidebar .sub-menu {
    background-color: #222C3B;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 2차 메뉴 각 항목 (링크) */
#sidebar .sub-menu li a {
    display: block;
    padding: 12px 30px;
    text-decoration: none;
    color: #FFF;
    font-size: 20px;
    font-weight: 600;
    
    transition: all 0.2s ease-in-out;
    position: relative;
    left: 0;
}

/* 마우스를 올렸을 때 (Hover) */
#sidebar .sub-menu li a:hover {
    background-color: #E49735;
    
}

/* 현재 활성화된 메뉴 (Active) */
#sidebar .sub-menu li.current-menu-item a {
    background-color: #007bff;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    left: 0;
}


/* 검색창 */
.background-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding:30px;
    margin-bottom: 30px;

}
.background-container form{
    border: 2px solid #E49735
}

/* 1. 검색창 전체를 감싸는 컨테이너 */
.search-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

/* 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; 
}

/* 버튼에 마우스를 올렸을 때 */
.search-button:hover {
    background-color: #d35400; 
}
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px; 
}
/* 검색 미리보기 */
/* 검색창 컨테이너에 position: relative; 추가 */
.search-container {
    width: 100%;
    display: flex;
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 검색 결과 미리보기 영역 */
#search-results-preview {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

/* 미리보기 목록 스타일 */
#search-results-preview ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#search-results-preview li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

#search-results-preview li a:hover {
    background-color: #f8f9fa;
}

body.modal-open {

  padding-right: 0 !important;
}


/* 모달  */
/* --- Bootstrap 5.1 Modal Minimal CSS --- */
/* (기존 style.css 파일 맨 아래에 추가) */
#commonModal{
    padding-right:0px !important;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none; /* JS가 .show 로 제어 */
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog {
    transition: none;
  }
}

.modal.show .modal-dialog {
  transform: none;
}

.modal.show {
  display: block; /* JS가 .show 를 추가하면 보이도록 함 */
}

/* (중앙 정렬 핵심) */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  /* flex를 이용한 중앙 정렬 */
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem); 
}
@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto; /* 데스크탑에서 중앙 정렬 */
    min-height: calc(100% - 3.5rem);
  }
}

/* 유저가 사용한 .modal-lg 클래스 대응 */
@media (min-width: 992px) {
  .modal-lg {
    max-width: 800px;
  }
}


.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: var(--bs-modal-color);
  pointer-events: auto;
  background-color: #fff; /* 흰색 배경 */
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.5); /* 그림자 */
}
/* --- End of Minimal CSS --- */

        
        .quest-modal-container {
            max-width: 750px;
            width: 100%;
            background-color: #ffffff;
            border: 1px solid #D5D5D5; 
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            overflow: hidden; 
        }

        /*  유저가 제공한 .dhoinfoRead 구조 스타일링 
         */
        .dhoinfoRead {
            padding: 20px 25px;
        }

        /* 1. 모달 헤더 (제목, 설명) */
        .dhoinfoRead .readHeader {
            position: relative;
            border-bottom: 1px solid #EEEEEE;
            /* padding-bottom: 15px; */
            
        }

        /* X 닫기 버튼 (이미지에서 요청한 스타일) */
        .modal-close-btn {
            position: absolute;
            top: -5px;
            right: -5px;
            font-size: 28px;
            font-weight: 300;
            color: #888;
            background: none;
            border: none;
            cursor: pointer;
            line-height: 1;
        }
        .modal-close-btn:hover {
            color: #000;
        }

        .dhoinfoRead .readHeader h1 {
            font-size: 22px;
            font-weight: 600;
            margin: 0 0 15px 0;
            color: #222;
        }

        /* '퀘스트' 파란색 글씨 */
        .dhoinfoRead .readHeader .infoType {
            color: #007BFF; 
            font-weight: 700;
            margin-right: 8px;
        }

        .dhoinfoRead .readHeader .description {
            font-size: 14px;
            color: #555;
            line-height: 1.6;
            margin: 0;
        }
        
        /* '퀘스트 완료' (유저 HTML 기반) */
        .dhoinfoRead .completionArea {
            margin-top: 10px;
        }
        .dhoinfoRead .completion {
            font-size: 13px;
            font-weight: bold;
            color: #28a745; /* 완료 색상 */
        }

        /* 2. 모달 본문 (테이블) */
        .dhoinfoRead .readBody .meta {
            width: 100%;
            border-collapse: collapse;
            border-top: 2px solid #999; /* 테이블 상단 강조선 */
            margin-bottom: 20px;
            font-size: 14px;
        }

        .dhoinfoRead .readBody .meta th,
        .dhoinfoRead .readBody .meta td {
            border-bottom: 1px solid #D3D3D3;
            padding: 12px 10px;
            vertical-align: top;
            line-height: 1.6;
        }

        .dhoinfoRead .readBody .meta th {
            background-color: #F9F9F9;
            width: 120px; /* 고정 너비 */
            text-align: left;
            font-weight: 600;
            color: #333;
        }
        
        /* 테이블 안의 링크 스타일 */
        .dhoinfoRead .readBody a {
            color: #007BFF;
            text-decoration: none;
        }
        .dhoinfoRead .readBody a:hover {
            text-decoration: underline;
        }

        /* 별점 (난이도) */
        .starOn, .starOff {
            font-size: 16px;
            color: #FFC107; /* 켜진 별 */
            letter-spacing: -2px;
        }
        .starOff {
            color: #E0E0E0; /* 꺼진 별 */
        }
        
        /* '필요', '보상' 테이블 내부의 테이블 */
        .dhoinfoRead .readBody .internal {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        
        .dhoinfoRead .readBody .internal th,
        .dhoinfoRead .readBody .internal td {
            border: none;
            padding: 5px 0;
        }
        
    
        
        .dhoinfoRead .readBody .internal .subth {
            font-weight: 600;
            color: #444;
            width: 60px;
        }
        
        /* '필수' 스킬 */
        .dhoinfoRead .readBody .essential {
            font-weight: bold;
            color: #D9534F; 
        }
        
        /* '선금', '보상금' 등 부가 설명 */
        .dhoinfoRead .readBody .sub {
            color: #777;
            font-size: 13px;
            margin-right: 4px;
        }
        .dhoinfoRead .readBody .unit {
             color: #777;
             font-size: 13px;
             margin-left: 2px;
        }
        
        /* '공략', '진행' 텍스트 */
        .dhoinfoRead .readBody .guide td,
        .dhoinfoRead .readBody .progress td {
            line-height: 1.7;
            white-space: pre-line; 
        }
        #worldMap {
            height: 300px; 
            width: 400px;
        }
        #worldMap .leaflet-marker-icon {
            background: url("../../dho/js/images/marker.png") no-repeat
        }

        .readHeader .modal-url-container input[readonly] {
            width:400px;
            padding-bottom: 10px;
            background-color: #f9f9f9;
            color: blue;
            border:none;
            font-size: 13px;
            cursor: pointer; /* 클릭할 수 있음을 표시 */
            box-sizing: border-box; /* 패딩이 너비를 밀어내지 않도록 함 */
        }

        /* --- [위키 기능 버튼 스타일] --- */

/* 1. 버튼 영역: 제목 옆에 나란히 배치 */
.wiki-btn-area {
    display: inline-flex;       /* 가로 배치 */
    align-items: center;        /* 수직 중앙 정렬 */
    gap: 5px;                   /* 버튼 사이 간격 */
    margin-left: 10px;          /* 제목과 버튼 사이 간격 */
    vertical-align: middle;     /* 텍스트 높이 맞춤 */
}

/* 2. 버튼 공통 모양 */
.wiki-btn {
    border: none;
    padding: 5px 10px;          /* 안쪽 여백 (상하 5px, 좌우 10px) */
    border-radius: 4px;         /* 모서리 둥글게 */
    cursor: pointer;            /* 마우스 올리면 손가락 모양 */
    font-size: 12px;            /* 글자 크기 */
    color: white;               /* 글자색 흰색 */
    transition: background 0.2s; /* 색상 변경 부드럽게 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wiki-btn i {
    margin-right: 4px;          /* 아이콘과 글자 사이 간격 */
}

/* 3. 히스토리 버튼 색상 (청록색 계열) */
.wiki-btn.btn-history {
    background-color: #17a2b8;
}
.wiki-btn.btn-history:hover {
    background-color: #138496; /* 마우스 올렸을 때 진해짐 */
}

/* 4. 수정 버튼 색상 (주황색 계열) */
.wiki-btn.btn-edit {
    background-color: #ffc107;
    color: #333; /* 배경이 밝으니 글자는 어둡게 */
}
.wiki-btn.btn-edit:hover {
    background-color: #e0a800;
}

.mb-3 {
    margin-bottom: 30px; 
}

.form-control {
    padding: 12px 15px; 
}