.colortest {
    color: #001aff;
}

.gallery img {
    height: 400px !important;
    width: 0px;
    border-radius: 12px 12px 3px 3px;
    object-fit: contain;
    min-height: 400px;
    max-height: 400px;
}

.live-status {
    position: absolute;
    top: 6px;
    left: 6px;
    border-radius: 10px 0 0 0;
    color: rgb(221, 51, 51);
    background: rgba(255, 255, 255, 0.355);
    padding: 2px 9px;
    font-size: 13px;
    display: none;
    height: 20px;
    line-height: 20px;
}

.image-select-checkbox {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    z-index: 2;
}

.image-select-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #666;
    /* font-size: 16px; */
}

.image-select-checkbox:checked {
    background-color: #4e5e8f;
}

.image-select-checkbox:checked::after {
    color: white;
}

.image-select-checkbox:hover {
    /* transform: scale(1.1); */
    background-color: #4e5e8f;
}

.image-select-checkbox:hover::after {
    color: white;
}

.image-container b {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.hover-menu-container {
    z-index: 900;
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.hover-menu-container #selection-count {
    margin-right: 5px;
}

.hover-menu {
    display: none;
    flex-direction: column;
    background-color: #f1f3f4;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    width: 220px;
    overflow: hidden;
    animation: popup-appear 0.3s ease-out;
}

/* 모달 기본 스타일 */
#compression-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    
    /* 기본적으로 숨김 */
    display: none;
}

/* 모달 표시 클래스 */
#compression-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 모달 창 */
#compression-modal .window-frame {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalAppear 0.3s ease-out;
    
    /* 추가 속성 */
    margin: 0;
    transform: none;
    top: auto;
    left: auto;
}

/* 모달 헤더 */
#compression-modal .window-header {
    background-color: #f8f8f8;
    height: 34px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-bottom: 1px solid #ccc;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#compression-modal .window-header-buttons {
    display: flex;
    gap: 8px;
}

#compression-modal .window-header-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.compression-content {
    padding: 30px;
    text-align: center;
}

#compression-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.progress-bar-container {
    width: 100%;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: #4e5e8f;
    transition: width 0.3s ease;
}

.compression-status {
    font-size: 16px;
    color: #666;
    margin-top: 15px;
}

@keyframes popup-appear {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hover-menu-header {
    display: flex;
    background-color: #e0e0e0;
    justify-content: flex-start;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.window-header-hover-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

#hover-close-button {
    background-color: #ff5f57;
}

#hover-minimize-button {
    background-color: #ffbd2e;
}

#hover-fullscreen-button {
    background-color: #28c940;
}

.hover-menu-body {
    background-color: #f9f9f9;
    padding: 0 15px;
    margin-bottom: 5px;
}

.hover-menu .selection-count-container {
    color: #333;
    font-size: 18px;
    margin: 15px 0;
    text-align: center;
    flex-direction: row;
    display: flex;
    justify-content: center;
}

.hover-menu button {
    font-family: 'KartriderExtraBold', sans-serif;
    color: #fff;
    background-color: #4e5e8f;
    border: none;
    padding: 12px 18px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.hover-menu button:hover {
    background-color: #3d4a70;
}

.hover-menu button:active {
    background-color: #2c3855;
}

.hover-menu button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(50, 50, 255, 0.5);
}

.image-container {
    margin: 10px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #ccc;
    padding: 4px;
    /* display: inline-flex; */
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    position: relative;
    height: 440px;
    min-height: 440px;
    max-height: 440px;
}

.image-container p {
    margin: 10px 0;
}

.image-name {
    color: #4b4b4b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin: 10px 0;
}

.download-button,
.instagram-button,
.share-button,
.image-select-checkbox {
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 0;
    font-size: 16px;
}

.download-button:hover {
    background-color: #c6abee;
}

.instagram-button:hover {
    background-color: #ef9f9f;
}

.share-button:hover {
    background-color: #f3d398;
}

.download-button i,
.instagram-button i,
.share-button i {
    color: #666;
}

.download-button:hover i {
    color: #1f40a1;
}

.instagram-button:hover i {
    color: #e4405f;
}

.share-button:hover i {
    color: #dba134;
}

.pagination a,
.pagination span {
    margin: 5px;
    padding: 8px 18px;
    text-decoration: none;
    color: #2d465f;
    border: 1px solid #2d465f;
    border-radius: 8px;
    text-align: center;
    flex-basis: auto;
}

.pagination a:hover {
    background-color: #2d465f;
    color: #fff;
}

.pagination .current-page {
    background-color: #2d465f;
    color: #fff;
}

.image-container img {
    cursor: pointer;
}

.navbar .title {
    color: #252525;
    font-size: 2.6rem;
    font-weight: normal;
    margin-left: 2rem;
    margin-top: 1rem;
}

.navbar .subtitle,
.navbar .update-status {
    color: #585858;
    font-size: 1.1rem;
    margin-left: 2rem;
    margin-top: 0.2rem;
}

.navbar .update-status {
    display: flex;
    /* justify-content: center; */
    /* align-items: center; */
    flex-direction: row;
}

.navbar .update-status #update-status-lable {
    margin-right: 5px;
}

.navbar .page-number {
    color: #3a3a3a;
    cursor: pointer;
    font-size: 1.3rem;
    margin-right: 2rem;
    margin-top: 2rem;
    white-space: nowrap;
}

.navbar .page-number:hover {
    color: #7e7e7e;
}

.metadata {
    font-size: 0.65em;
    color: #7b7b7b;
    text-align: center;
    display: none;
    line-height: 0.6;
    margin-top: 1px;
}

.page-setting input {
    padding: 10px;
    font-size: 17px;
    margin-right: 1px;
    border-radius: 8px 0 0 8px;
    width: 80px;
    border: 1px solid #ccc;
    font-family: 'KartriderExtraBold', sans-serif;
}

.page-setting button {
    padding: 10px 15px;
    font-size: 17px;
    background-color: #2d465f;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.page-setting button:hover {
    background-color: #2d465f;
}

.search-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 1.2rem;
    height: 2.5rem;
    font-family: 'KartriderExtraBold', sans-serif;
    box-sizing: border-box;
    width: 25rem;
}

.search-button {
    padding: 8px 12px;
    height: 2.5rem;
    border: 1px solid #ccc;
    border-left: none;
    background-color: #2d465f;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

.clear-search-button {
    padding: 8px 12px;
    height: 2.5rem;
    border: 1px solid #ccc;
    border-left: none;
    background-color: #eb5b51;
    color: white;
    border-radius: 0 0 0 0;
    cursor: pointer;
    font-size: 1rem;
}

.image-search-button {
    padding: 8px 12px;
    height: 2.5rem;
    border: 1px solid #dddddd;
    background-image: linear-gradient(130deg, #ff5c5c, #ddbe7b);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.image-search-text {
    margin-left: 4px;
    white-space: nowrap;
}

.search-button:hover {
    background-color: #16232f;
}

.clear-search-button:hover {
    background-color: #ac3830;
}

.image-search-button:hover {
    background-image: linear-gradient(130deg, #c7634a, #ac9460);
}

.search-button i,
.clear-search-button i {
    font-size: 1rem;
}

.search-form-flex {
    width: auto;
    padding: 16px 16px 8px 16px;
}

.tag-filter label {
    margin: 5px;
    font-family: 'KartriderExtraBold', sans-serif;
}

.tag-filter #tag-all {
    margin-left: 0;
}

.tag-filter input[type="checkbox"] {
    display: none;
}

.tag-filter label {
    background-color: #ddd;
    color: #444;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.easysearch button {
    margin: 5px;
    font-family: 'KartriderExtraBold', sans-serif;
    padding: 10px 15px;
    font-size: 1rem;
    background-color: #4e5e8f;
    color: #ffffff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
}

.tag-filter input[type="checkbox"]:checked+label {
    background-color: #2d465f;
    color: #fff;
}

.tag-filter label:hover {
    background-color: #bbb;
}

.easysearch button:hover {
    background-color: #a8a8a8;
}

.tag-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 240px;
    font-size: 0.9rem;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 910;
    background-color: white;
    border: 0px 1px 1px 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: none;
    width: 25rem;
}

.tag-suggestions li {
    padding: 8px;
    cursor: pointer;
}

.tag-suggestions li:hover {
    background-color: #eee;
}

/* 날짜 필터 스타일 */
.date-filter {
    justify-items: center;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8px 16px 14px 16px;
}

.date-filter .label {
    font-size: 20px;
    color: #4b4b4b;
    white-space: nowrap;
}

.date-filter input {
    box-sizing: border-box;
    padding: 0px 8px;
    font-size: 18px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    margin: 0 0 0 10px;
    font-family: 'KartriderExtraBold', sans-serif;
    background-color: #ffffff;
    color: #4b4b4b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    height: 40px;
    display: flex;
    align-items: center;
}

.date-filter input:first-child {
    margin-left: 2rem;
}

.date-filter input:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.date-filter input:focus {
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.reset-button {
    box-sizing: border-box;
    background: none;
    border: 1px solid #ccc;
    cursor: pointer;
    margin-left: 1px;
    padding: 8px;
    border-radius: 0 5px 5px 0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    height: 40px;
    display: flex;
    align-items: center;
}

.reset-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.reset-button:focus {
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.reset-button i {
    font-size: 14px;
    color: #4b4b4b;
    transition: color 0.3s ease;
}

.reset-button:hover i {
    color: #000000;
}

.download-button.animate i {
    animation: slideDownUpIcon 1s ease-in-out;
}

.alert-popup {
    display: none;
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
    max-width: 70vw;
}

.alert-popup.main {
    z-index: 1003;
}

.alert-popup.sub {
    z-index: 1002;
}

.window-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-header-button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#close-button {
    background-color: #ff5f57;
}

#minimize-button {
    background-color: #ffbd2e;
}

#fullscreen-button {
    background-color: #28c940;
}

.window-content {
    padding: 0;
    background-color: white;
    margin: 1px;
}

.popup img,
.popup video {
    display: block;
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.progress-bar {
    width: 90%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 12px 0;
    position: relative;
}

.progress-bar-inner {
    height: 100%;
    background-color: #007aff;
    border-radius: 4px;
    transition: width 0.3s;
}

.loading-text {
    color: #333;
    font-size: 16px;
    padding: 10px 0;
    font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

footer {
    margin: 30px 0;
    text-align: center;
    color: #777;
}

footer p {
    font-size: 0.95rem;
}

footer a {
    color: #777;
    text-decoration: underline;
}

footer p .lang {
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

footer p .lang.active {
    color: #111;
}

/* Image Search Popup Styles */
#image-search-title {
    font-size: 1.5em;
    padding: 20px 0;
    font-weight: bold;
}

#preview-container.upload-area {
    width: 300px;
    height: 300px;
    border: 2px dashed #869deb;
    border-radius: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background-color: #f5f5f5;
}

#image-upload-container {
    padding-bottom: 20px;
}

#preview-container.upload-area:hover {
    border-color: #6c7eb9;
    background-color: #f0f0f0;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #869deb;
}

.upload-placeholder i {
    font-size: 40px;
}

.upload-text {
    font-size: 16px;
}

#search-uploaded-image:hover, #reupload-image:hover {
    background-color: #6c7eb9;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.24);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #06133f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 5px;
}

.loading-overlay .loading-text {
    font-family: 'KartriderExtraBold', sans-serif;
    font-size: 1.2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#preview-container.upload-area {
    position: relative;
    overflow: hidden;
}

#preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.similarity-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1;
    font-weight: bold;
}

.search-result-nav {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    margin: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-preview-container {
    width: 260px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-buttons {
    display: flex;
    gap: 10px;
}

.search-again-button,
.reset-search-button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'KartriderExtraBold', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease;
}

.search-again-button {
    background-color: #4e5e8f;
    color: white;
}

.reset-search-button {
    background-color: #e08484;
    color: white;
}

.search-again-button:hover {
    background-color: #3d4a70;
}

.reset-search-button:hover {
    background-color: #c77272;
}

/* ---- 임시 안내 팝업 ---- */
#maintenanceNotice {
    width: auto;
    background-color: #fff0b4;
    color: rgb(56, 56, 56);
    text-align: center;
    padding: 12px 0 10px 0;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ---- 임시 안내 팝업 ---- */

@keyframes slideDownUpIcon {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(100%);
        opacity: 0;
    }

    51% {
        opacity: 0;
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 페이지당 항목 수 설정 드롭다운 */
.items-per-page {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.items-per-page select {
    padding: 10px;
    font-size: 17px;
    border-radius: 8px;
    width: 100px;
    border: 1px solid #ccc;
    font-family: 'KartriderExtraBold', sans-serif;
    cursor: pointer;
    
    /* iOS 기본 스타일 제거 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* iOS에서 기본 스타일 완전히 제거 */
    background-color: white;
    -webkit-border-radius: 8px;
    -webkit-box-shadow: none;
    -webkit-padding-end: 30px;
    -webkit-padding-start: 10px;
    -webkit-user-select: none;
    
    /* 커스텀 화살표 아이콘 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    padding-right: 30px;
}

/* iOS에서 포커스 시 파란 하이라이트 제거 */
.items-per-page select:focus {
    outline: none;
    border-color: #2d465f;
    -webkit-tap-highlight-color: transparent;
}

/* iOS에서 선택된 옵션의 기본 스타일 제거 */
.items-per-page select option {
    background-color: white;
    color: black;
    font-family: 'KartriderExtraBold', sans-serif;
}

/* 모바일 대응 */
@media only screen and (max-width: 768px) {
    .page-setting, .items-per-page {
        transform: scale(0.9);
    }
    
    .items-per-page {
        margin-left: 10px;
    }
}

@media only screen and (max-width: 480px) {
    .page-setting, .items-per-page {
        transform: scale(0.8);
    }
    
    .items-per-page select {
        width: 90px;
    }
}