html{
  margin:0;
  padding:0;
  width:100%;
}

body{
  font-family:"맑은 고딕", sans-serif;
  margin:16px auto;
  padding:0 10px;
  line-height:1.5;
  max-width:900px;
  width:100%;
  background:#fafafa;
}

*{
  box-sizing:border-box;
}

/* 상단 이미지 */
.header-img-wrap{
  width:100%;
  margin:0 auto 14px;
}

.header-img{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
}

/* 제목 */
h2{
  margin:12px 0 10px;
  font-size:22px;
  font-weight:700;
  color:#222;
}

/* 검색 영역 */
.search-wrap{
  width:100%;
  margin:14px 0 14px;
}

.search-line{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.search-box{
  flex:1;
  display:flex;
  align-items:center;
  min-height:58px;
  padding:0 10px 0 18px;
  background:#fff;
  border:1px solid #e3e3e3;
  border-radius:999px;
  box-shadow:0 2px 10px rgba(0,0,0,0.10);
  transition:all 0.2s ease;
}

.search-box:focus-within{
  border-color:#d0d0d0;
  box-shadow:0 4px 14px rgba(0,0,0,0.14);
}

.search-box input{
  flex:1;
  height:56px;
  border:none;
  outline:none;
  background:transparent;
  font-size:18px;
  color:#222;
  min-width:0;
}

.search-box input::placeholder{
  color:#777;
}

.icon-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  flex-shrink:0;
}

.clear-btn{
  width:34px;
  height:34px;
  font-size:28px;
  line-height:1;
  color:#777;
  margin-right:8px;
  border-radius:50%;
  transition:all 0.15s ease;
}

.clear-btn:hover{
  color:#222;
  background:#f2f2f2;
}

.search-icon-btn{
  width:50px;
  height:46px;
  font-size:22px;
  line-height:1;
  color:#666;
  border-left:1px solid #ececec;
  padding-left:10px;
  transition:all 0.15s ease;
}

.search-icon-btn:hover{
  color:#222;
}

/* 오른쪽 버튼 (검색해제 / 전체복사) */
.action-btn{
  min-width:150px;
  height:58px;
  padding:0 24px;
  font-size:18px;
  font-weight:600;
  border:1px solid #dcdcdc;
  border-radius:999px;
  background:#ffffff;
  color:#333;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,0.10);
  transition:all 0.2s ease;
}

.action-btn:hover{
  background:#f8f8f8;
  box-shadow:0 4px 14px rgba(0,0,0,0.14);
  transform:translateY(-1px);
}

.action-btn:active{
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(0,0,0,0.10);
}

/* 비디오 바탕화면 */
.video-wrap{
  width:100%;
  height:140px;
  overflow:hidden;
  border-radius:14px;
  box-shadow:0 2px 10px rgba(0,0,0,0.08);
}

.video-wrap video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* 하단 이미지 */
.loading-image-wrap{
  width:100%;
  text-align:center;
  margin:14px 0;
}

.loading-image{
  width:100%;
  height:auto;
  display:block;
  margin:0 auto;
  border-radius:14px;
}

/* 안내문 */
.notice-text{
  font-size:12px;
  color:#666;
  margin-bottom:10px;
}

/* 상단 페이지 버튼 + 상태 */
.result-top{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin:10px 0;
  flex-wrap:wrap;
}

#status{
  margin:0;
  font-size:15px;
  font-weight:bold;
  white-space:nowrap;
  color:#222;
}

.page-btn-group{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.page-btn-group button{
  height:36px;
  padding:0 12px;
  font-size:13px;
  font-weight:bold;
  border:1px solid #cfcfcf;
  border-radius:999px;
  background:#ffffff;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 1px 6px rgba(0,0,0,0.08);
  transition:all 0.2s ease;
}

.page-btn-group button:hover{
  background:#f7f7f7;
}

/* 결과 영역 */
#result{
  width:100%;
  min-height:0;
}

.result-item{
  border-bottom:4px double #2457ff;
  padding:14px 0 20px;
  margin:0 0 18px;
}

.result-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:6px;
  gap:8px;
}

.result-head-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.result-title{
  font-weight:bold;
  font-size:20px;
  color:#1f1f1f;
}

.result-select-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
  font-size:13px;
  font-weight:bold;
}

.result-select-wrap input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  vertical-align:middle;
}

.select-copy-btn{
  height:36px;
  padding:0 14px;
  font-size:13px;
  font-weight:bold;
  border:1px solid #cfcfcf;
  border-radius:999px;
  background:#ffffff;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 1px 6px rgba(0,0,0,0.08);
}

.select-copy-btn:hover{
  background:#f3f3f3;
}

.result-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.copy-btn,
.style-copy-btn,
.viewer-btn{
  height:32px;
  padding:0 12px;
  font-size:12px;
  font-weight:bold;
  border:1px solid #cfcfcf;
  border-radius:999px;
  background:#ffffff;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 1px 6px rgba(0,0,0,0.08);
}

.copy-btn:hover,
.viewer-btn:hover{
  background:#f5f5f5;
}

.style-copy-btn{
  background:#f4edff;
  border-color:#bfa3f1;
  color:#5a35a8;
}

.style-copy-btn:hover{
  background:#ece0ff;
}

.context-label{
  font-size:13px;
  font-weight:bold;
  margin:0 0 4px;
  color:#555;
}

.current-label{
  color:#000;
}

.result-text{
  white-space:normal;
  word-break:break-word;
  background:#ffffff;
  padding:14px 16px;
  border:1px solid #ececec;
  border-radius:14px;
  margin:0;
  line-height:1.9;
  box-shadow:0 1px 8px rgba(0,0,0,0.04);
}

.result-text br{
  display:block;
  margin-bottom:8px;
  content:"";
}

.current-text{
  background:#fffbe8;
  border:1px solid #e6d98a;
}

/* 하단 페이지 버튼 */
.result-bottom{
  margin:14px 0 6px;
  display:flex;
  justify-content:center;
}

.bottom-actions{
  margin-top:8px;
  display:flex;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}

/* 기본 검색 강조 */
mark{
  background:yellow;
  padding:0 1px;
}

/* 화면 표시용 검색 강조 */
mark.search-hit{
  color:#ff0000;
  background:transparent;
  padding:0 1px;
  font-weight:bold;
}

/* 비밀번호 게이트 */
.password-gate{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.6);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.password-box{
  background:#fff;
  padding:24px 20px;
  border-radius:16px;
  width:90%;
  max-width:360px;
  box-shadow:0 8px 30px rgba(0,0,0,0.25);
  text-align:center;
}

.password-box h3{
  margin:0 0 14px;
  font-size:22px;
  color:#222;
}

.password-box input{
  width:100%;
  height:46px;
  padding:0 14px;
  font-size:16px;
  border:1px solid #ccc;
  border-radius:10px;
  outline:none;
  margin-bottom:12px;
}

.password-box button{
  width:100%;
  height:46px;
  border:none;
  border-radius:10px;
  background:#2457ff;
  color:#fff;
  font-size:16px;
  font-weight:bold;
  cursor:pointer;
}

.password-box button:hover{
  background:#1c46cf;
}

#passwordError{
  margin:10px 0 0;
  font-size:14px;
  color:crimson;
}