iframe html {
    display: flex;
    justify-content: center;
  }

  body {
    margin: 0;
    padding: 0;
    border: none;
    font-family: Arial, sans-serif;
    overflow: hidden;
    color: #FFF;
    user-select: none;
  }

  input {
    user-select: auto;
  }
  
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    cursor: pointer;
  }

  ::-webkit-scrollbar-thumb {
    height: 56px;
    border-radius: 8px;
    background-clip: content-box;
    background-color: #888888;
  }

  #thumbnails-section ::-webkit-scrollbar-track {
    background-color: #404040;
    border-radius: 8px;
  }

  #thumbnails-section.light ::-webkit-scrollbar-track {
    background-color: #f7f7f7 !important;
    border-radius: 8px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(136, 136, 136, 0.7);
  }

  ::-webkit-scrollbar-thumb:active {
    background-color: rgb(92,92,92);
  }

  .crepas-scrollbar-horizontal{
    border-radius: 8px;
    right: 12px !important;
  }

  .crepas-scrollbar-horizontal .crepas-scrollbar-thumb{
    border-radius: 6px;
  }
  
  .crepas-scrollbar-vertical{
    border-radius: 8px;
    top: 12px !important;
  }

  .crepas-scrollbar-vertical .crepas-scrollbar-thumb{
    border-radius: 6px;
  }


  #header {
    position: fixed;
    top: 0;
    left: 0;
    height: 55px;
    width: 100%;
    background-color: #404040;
    padding: 0px 18px;
    display: flex;
    align-items: center;
    font-size: 14px;
    box-sizing: border-box;
  }

  #header #end #util #download,
  #header #end #util #print,
  #header #end #util #info-menu,
  #header.light #end #util #download,
  #header.light #end #util #print,
  #header.light #end #util #info-menu{
    transition: background 0.2s ease-in-out;
  }

  #header.light{
    background-color: #f7f7f7;
  }

  #header .icon:not(.active):hover{
    background-color: rgba(148, 148, 148, 0.5);
  }

  #header.light .icon:not(.active):hover{
    background-color: #43aaef91;
  }


  #container {
    width: 100%;
    height: 100vh;
    padding-top: 55px;
	  background-color: #AAAAAA;
    box-sizing: border-box;
    display: flex;
  }

  .icon {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 5px;
  }

  #title {
    color: inherit;
    font-style: normal;
    line-height: normal;
    white-space: nowrap;
    margin-left: 13px;
  }

  #start {
    align-items: center;
    display: flex;
    overflow: hidden;
  }

  #start #thumbnailMenu{
    min-width: 30px;
    min-height: 30px;
    border-radius: 20px;
  }

  /* #center{
    position: relative;
    left : 50px;
  } */

  #center, #center div {
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
  }

  #end, #end div{
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #center input {
    background: rgba(0,0,0,.5);
    caret-color: currentColor;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
    margin: 0 4px;
    padding: 1px 6px;
    text-align: center;
    width: 40px;
    font-size: 14px;
    border: none;
    outline: 0;
    box-sizing: border-box;
    outline: 1px solid #4f4f50;
    height: 30px;
    border-radius: 3px;
  }

  #center #scale{
    width : 7ch;
  }

  #center .icon {
    cursor: pointer !important;
  }

  #end #pagination input {
    background: rgba(0,0,0,.5);
    border: none;
    caret-color: currentColor;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
    outline: 0;
    padding: 1px 6px;
    text-align: center;
    font-size: 14px;
  }

  #center.light input {
    background: #ffffff;
    caret-color: currentColor;
    color: #262626;;
    outline: 1px solid #b6b6b6;
  }

  #end.light #pagination.light input {
    background:  #ffffff;
    caret-color: currentColor;
    color: #262626;
  }

  #end {
    /* gap: 140px; */
    /* justify-content: end; */
    /* padding-inline-end: 30px; */
    margin-right: 30px;
    justify-content: flex-end;
  }

  #viewer {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    outline: none;
  }

  .canvas-container.in-focus {
    outline: 2px dashed #007bff !important;
    outline-offset: -2px;
  }
  
  #thumbnails {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    outline: none;
  }

  #thumbnails.vertical {
    min-height: 310px;
  }

  #thumbnails-section {
    max-width: 300px;
    box-sizing: border-box;
    overflow-y: auto;
    text-align: center;
    background-color: #404040;
    flex: 0 0 300px;
    position: relative;
    box-shadow: 0px -2px 1px 0px rgba(0,0,0,.09);
    outline: none;
  }

  @media (max-width: 860px) {
    #thumbnails-section{
      display: none;
    }

  }

  #thumbnails-section.light {
    background-color: #f7f7f7;
    box-shadow: 0px 0px 2px 0px rgba(0,0,0,.09);
  }  

  #thumbnails-section .thumbnail-page{
    display: inline-block;
    position: absolute;
    bottom: -12px;
    align-items: center;
    justify-content: center;
    max-width: 100px;
    height: 25px;
    color: #f7f7f7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  #thumbnails-section.light .thumbnail-page{
    color: #272727;
  }

  #thumbnails-section .thumbnail-container{
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    gap: 16px;
    padding: 12px 16px 16px 16px;
  }

  #thumbnails-section .thumbnail-container.excel{
    /* min-height: 150px; */
  }

  #thumbnails-section .thumbnail-container-inner{
    display: flex;
    cursor: pointer;
    /* padding: 8px; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  #thumbnails-section .thumbnail-container-inner.excel,
  #thumbnails-section .thumbnail-container-inner.powerpoint{
    min-width: 180px;
    min-height: 135px;
  }

  #thumbnails-section .thumbnail-container-inner.hangul,
  #thumbnails-section .thumbnail-container-inner.pdf,
  #thumbnails-section .thumbnail-container-inner.word
  {
    width : 175px;
    height : 250px;
  }

  #thumbnails-section .thumbnail-container-inner.excel,
  #thumbnails-section .thumbnail-container-inner.powerpoint{
    min-width: 180px;
    min-height: 135px;
  }

  #thumbnails-section .thumbnail-container.excel .thumbnail-container-inner.excel .thumbnail-page {
    /* bottom: 0; */
  }

  #thumbnails-section .thumbnail-container-inner.hangul,
  #thumbnails-section .thumbnail-container-inner.pdf,
  #thumbnails-section .thumbnail-container-inner.word
  {
    width : 175px;
    height : 250px;
  }

  #thumbnails-section .thumbnail-container .thumbnail-container-inner.highlight canvas{
    outline: 5px solid #7C7C7C;
  } 

  #thumbnails-section.light .thumbnail-container .thumbnail-container-inner.highlight canvas{
    outline: 5px solid #8bb4f4;
  } 

  .thumbnail-container .thumbnail-container-inner {
    opacity: 0.5;
    transition: opacity 0.3s ease;
  }

  .thumbnail-container-inner:hover {
    opacity: 1 !important;
  }

  .thumbnail-loading-image{
    width: 50px;
    height: 50px;
  }

  .closed {
    transform : translateX(-100%);
    visibility: hidden;
    width: 0 !important;
  }

  #viewer-thumbnail {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  #util {
    /* column-gap: 17px; */
    margin-left: 150px;
    padding-right: 10px;
    width: 80px;
    gap: 1rem;
  }
  
  #center #prevPage,
  #center #nextPage,
  #center #zoomOut,
  #center #zoomIn,
  #center #fitHeightIcon,
  #center #fitWidthIcon
  {
    min-width: 30px;
    min-height: 30px;
    border-radius: 20px;
  }

  #util #print,#download,#info-menu,#closeDocument {
    min-width: 30px;
    min-height: 30px;
    border-radius: 20px;
  }

  #print {
    opacity: 0.5;
    pointer-events: none;
  }

  #download {
    opacity: 0.5;
    pointer-events: none;
  }

  #pageLength{
    color : #999999;
  }

  #pageLength.light{
    color : #262626;
  }

  #pageLength, #divider {
    padding : 0 4px 0 10px;
  }

  #divider.light {
    color : #262626;
  }

  #sectionDivider{
    margin : 0 1.1rem 0 1.1rem;
  }

  #start, #end {
    flex: 1;
  }

  #findText {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: black;
    width: 150px !important;
    position: relative;
    display: inline-block;
	  text-align : left !important;
    margin-right: 110px;
    outline: none !important;
  }

  input[type=number]::-webkit-outer-spin-button,
  input[type=number]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
  }

  input[type=number] {
      -moz-appearance: textfield;
  }

  #currentLength:focus{
    outline: 2px solid #0b76fb !important;
  }

  .noSpin::-webkit-outer-spin-button,
  .noSpin::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Edge에서 증감 버튼 숨기기 */
    margin: 0;
  }

  #scale:focus{
    outline: 2px solid #0b76fb !important;
  }

  #findText:focus{
    outline:2px solid #0b76fb;
  }

  #findText::placeholder{
    font-size: 12px;
  }
  #findText:focus::-webkit-input-placeholder { /* Chrome/Safari/Opera */
    opacity: 0;
  }
  #findText:focus::-moz-placeholder { /* Firefox */
    opacity: 0;
  }
  #findText:focus:-ms-input-placeholder { /* IE/Edge */
    opacity: 0;
  }
  #findText:focus::placeholder { /* 최신 브라우저 */
    opacity: 0;
  }
  
  #findText-Wrapper {
    margin-right: 100px;
  }

  #findTextBtn-Wrapper:focus{
    outline: none;
  }
  
  #findTextBtn,#prevText,#nextText{
    cursor: pointer;
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
	  margin-left: 0px !important;
    /* outline: 1px solid #4f4f50 !important */
    border-radius: 20px !important;
  }

  #pageToFit #fitToggle {
    position: relative;
  }

  /* #pageToFit #fitToggle */

  #pageToFit #fitHeightIcon,
  #pageToFit #fitWidthIcon {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
  }

  #topFindText-Wrapper{
    width: 250px;
    background-color: #101010;
    outline: 1px solid #4f4f50;
  }

  #topFindText-Wrapper.light{
    background-color: #ffffff;
    outline: 1px solid #b6b6b6;
  }

  #findTextBtn-Wrapper{
    position: absolute;
    margin-left: 120px;
    background-color: #101010;
    height: 18px;
    display: flex;
    align-items: center;
  }

  #findTextBtn-Wrapper.light{
    background-color: #ffffff;
  }

  #findTextBtn-Divider{
    position: relative;
    left: 10px;
    padding-right: 10px;
  }

  #nextPage {
    cursor: pointer;
  }
  #prevPage {
    cursor: pointer;
  }

  #nextText {
      cursor: pointer;
      position: relative;
      /* right: 10px; */
      /* margin-left: 20px; */
  }
  #prevText {
      cursor: pointer;
      /* margin-left: 4px; */
      /* right: 10px; */
      position: relative;
  }

  #viewer-mask {
      display: none;
      position: absolute;
      width: 100%;
      height: 100%;
      z-index: 999;
      background-color: rgba(64, 64, 64, 0.8);
  }

  #viewer-mask img {
   width: 70px;
  }

  #viewer-mask div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 60px;
    margin-left: 3px;
    font-size: 18px;
  }

  #activeProcess {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 60px;
  }

  #loading {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
  }
  
  #loadProcess {
    position: absolute;
    top: 57%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  #loadPage {
    width: 100%;
    height: 100%;
  }

  #titleSection {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #title {
    white-space: nowrap; /* 텍스트가 한 줄에 표시되도록 설정 */
    overflow: hidden; /* 넘치는 텍스트를 가림 */
    text-overflow: ellipsis; /* 넘치는 텍스트에 ...을 추가 */
  }

@media (max-width: 574px) {
  /* 500px 미만일 경우, 왼쪽의 미리보기 탭이 사라집니다. (pdf 뷰어 참고) */
  #thumbnails-section {
    max-width: 0px;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
    background-color: #404040;
    flex: 0;
  }

  /* 헤더 반응형 테스트 */
  #icon.menu {
    display: none;
  }

  #title {
    display: none;
  }
}

  #content {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #cccccc;
    overflow: auto;
  }

  #loadingOverlay { 
      display: none;
  }

  .loading-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: all 0.3s ease;
  }

  .loading-overlay.visible {
      visibility: visible;
      opacity: 1;
  }

  .error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px;
    background-color: #ef4444;
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .error-message.visible {
    display: block;
  }

  #fileSection{
    position: relative;
    margin-right: 35px;
  }

  #fileSection #insertFile{
    display: inline-block;
    height: 40px;
    padding: 0 10px;
    vertical-align: middle;
    border: none;
    width: 200px;
    color: #999999;
    background-color: #404040;
  }
  #fileSection label {
    display: flex;
    color: #fff;
    vertical-align: middle;
    cursor: pointer;
    height: 20px;
    font-size: 12px;
    background-color: rgba(0,0,0,.5);
    padding: 0 10px;
    outline: 1px solid #4f4f50;
    text-align: center;
    justify-content: center;
    align-items: center;
  }
  #fileSection input[type="file"] {
    position: absolute;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    top: 9999px;
    left: 9999px;
  }

  #dropZone {
    position: absolute;
    top: 110px;
    left: 300px;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto 0;
    height: 100%;
    cursor: pointer;
  }

  #dropZoneSection{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto 0;
    height: 100%;
  }

  #dropZone svg {
    position: absolute;
    margin: 0 200px 0 0;
    transform: translate(-50%, -50%);
  }
  
  #dropZoneText {
    position: absolute;
    display: block;
    width: 500px;
    margin : 35px 50px 0 0;
    color: #666666;
  }

  #dropZoneSubText {
    display: block;
    width: auto;
    color: #969696;
    font-size: 13px;
    margin: 100px 285px 0 0;
    position: absolute;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
  
  #supportFormat{
    display: flex;
    height: 25px;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 11rem;
    margin-right: 19rem;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
  }

  .format-badge{
    padding: 0.35rem 0.75rem;
    background: rgba(180, 180, 180, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
    color : #666;
  }

  .format-badge.more-badge{
    display: none;
  }

  @media (max-width: 1150px) {
    #supportFormat:not(.expanded) {
        max-height: 25px;
        padding-right: 40px;
    }

    #supportFormat .more-badge {
        position: absolute;
        top: 0;
        right: 15px;
        background: rgba(180, 180, 180, 0.7);
        padding: 0.35rem 0.75rem;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 500;
        cursor: pointer;
        color : #666;
        z-index: 10;
    }

    #supportFormat:not(.expanded) .more-badge {
        display: block;
    }
  }

  @media (max-width: 650px) {
    #supportFormat .more-badge{
      right: 7px;
    }
  }

  #dropZoneOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5); /* 반투명 배경 */
    color: #666;
    display: none; /* 기본적으로 숨김 */
    justify-content: center;
    align-items: center;
    font-size: 20px;
    z-index: 1000; /* 다른 요소 위에 표시 */
  }

  #dropZoneOverlay svg{
    position: absolute;
    margin: 0 0 150px 0;
  }

  #fileInput {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    left: 9999px;
    top: 9999px;
  }

  .file-label {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 500px;
    border: 2px dashed transparent;
    z-index: 1000;
    pointer-events: none;
  }

  #end .menu-item:focus{
    background-color: rgba(255, 255, 255, 0.2);
  }

  #end.light .menu-item:focus{
    background-color: #43aaef91;
  }

  #info-menu.active:not(.info-menu-content){
    outline: 2px solid #1E88E5;
    outline-offset: -2px;
  }

  #end.light #info-menu.active{
    outline: 2px solid #1E88E5;
    outline-offset: -2px;
  }

  #info-menu-content{
    position: absolute;
    top: 50px;
    right: 50px;
    color: #ffffff;
    background-color: #000000;
    min-width: 100px;
    border-radius: 5px;
    box-shadow: 0 0 3px 3px rgba(31, 32, 34, 0.05);
  }

  #end.light #info-menu-content{
    background-color: #f7f7f7;
    color: #262626;
  }

  .menu-item {
    display: flex;
    min-width: 100px;
    min-height: 30px;
    justify-content: left !important;
    padding: 0 12px 0 5px;
    cursor: pointer;
    outline: none;
    border-radius: 5px;
  }

  #end .menu-item:hover {
    background-color: rgba(148, 148, 148, 0.5);
  }

  #end.light .menu-item:hover {
    background-color: #43aaef91;
  }

  .info-icon{
    position: relative;
    left: 2px;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
  }

  .info-text{
    margin-left: 10px;;
  }

  #version-info {
    width: 300px;
    height: 200px;
    border: 1px solid #000;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    position: relative;
    color : #262626;
    font-size: 14px;
    border-radius: 5px;
}

  #version-info .version-info-header h3 {
      margin: 0;
      font-size: 14px;
      border-bottom: 1px solid #cccccc;
      padding-bottom: 10px;
  }

  #version-info .version-info-image{
    display: flex;
    align-items: center;
    padding: 10px 0 10px 0;
    border-bottom: 1px solid #bfbfbf;
  }

  #version-info .version-info-image img{
    width: 200px;
    height: auto;
  }

  #version-info .version-info-body{
    border-bottom: 1px solid #cccccc;
    padding: 5px;
  }

  #version-info .version-info-body p {
      margin: 5px 0;
      font-size: 12px;
  }

  #version-info .confirm-button {
      position: absolute;
      bottom: 10px;
      right: 20px;
      background-color: #000;
      color: #fff;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
      border-radius: 3px;
  }

  /* 키보드 이벤트 처리 */
  #header [tabindex]:focus:not(.info-menu):not(.menu-item) {
    outline: 2px solid #007bff;
    outline-offset: -2px;
  }

  #container #content [tabindex]:focus {
    outline: 2px dashed #007bff;
    outline-offset: -2px;
  }
