/* 탑 버튼 스타일 */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
    line-height: 1.2;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.scroll-to-top-btn::before {
    content: '▲';
    font-size: 16px;
    line-height: 1;
    margin-bottom: -2px;
}

.scroll-to-top-btn:hover {
    background: #5568d3;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.scroll-to-top-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    
    .scroll-to-top-btn::before {
        font-size: 14px;
    }
}

.js-select-basic-single{
    width:300px;
    height:50px;
    line-height:50px;
    margin-top:10px;
    margin-bottom:10px;
}

/* 상세검색 컨테이너 스타일 */
#job-search-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
}

/* 직업 검색 행 */
.job-search-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    width: 100%;
    position: relative;
    margin-bottom: 28px;
}

/* 필터 컬럼 */
.filter-column {
    display: flex;
    flex-direction: column;
    width: 50%;
}

.filter-column-full {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 필터 라벨 */
.filter-label {
    display: flex;
    align-items: center;
    margin: 0 2px 4px 2px;
    height: 24px;
}

.filter-label-empty {
    margin: 0 2px 4px 2px;
    height: 24px;
}

.filter-label-small {
    display: flex;
    align-items: center;
    margin: 0 2px 0px 2px;
    height: 24px;
}

.filter-label-text {
    color: #555;
    font-weight: 600;
}

/* 커스텀 드롭다운 래퍼 */
.custom-dropdown-wrapper {
    position: relative;
    width: 100%;
}

/* 검색 필터 select */
.search-filter-select {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    background: #fff;
}

.search-filter-select:disabled {
    opacity: 0.5;
}

/* 커스텀 드롭다운 */
.custom-dropdown {
    width: 100%;
    height: 32px;
    padding: 0 30px 0 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    background: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
}

.custom-dropdown-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-dropdown-selected {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}

/* 커스텀 드롭다운 옵션 */
.custom-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 딜러/버퍼 버튼 컨테이너 */
.character-type-buttons {
    position: absolute;
    right: 0;
    top: -4px;
    display: flex;
    gap: 4px;
}

.character-type-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}

.character-type-btn.active {
    background: #6e84ff;
    color: #fff;
    border-color: transparent;
}

.character-type-btn:not(.active) {
    background: #fff;
    color: #333;
}

/* 세트/무기 컨테이너 */
.set-weapon-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    width: 100%;
    margin-bottom: 3px;
}

/* 검색 버튼 컨테이너 */
.search-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: flex-end;
    width: 100%;
}

.search-btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    cursor: pointer;
}

.search-btn-reset {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.search-btn-submit {
    border: 1px solid #6e84ff;
    background: #6e84ff;
    color: #fff;
}

/* 숨겨진 select */
.hidden-select {
    display: none;
}

/* 무기 필터 임시 숨김 처리 */
.hidden-weapon-filter {
    display: none !important;
}

/* 상세검색 세트 타일 그리드 (시뮬레이터 스타일) */
.search-set-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.search-set-grid .set-tile{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 0 0 0;
    margin: 3px 0;
    background: transparent;
    border: 1px dashed transparent;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.search-set-grid .set-tile:hover{
    background: rgba(0,0,0,0.03);
}

.search-set-grid .set-tile.active{
    border-color: #c8e1ff;
    background: #f2f8ff;
}

.search-set-grid .set-tile.inactive{
    opacity: 0.4;
    filter: grayscale(100%);
}

.search-set-grid .set-tile.inactive:hover{
    opacity: 0.6;
}

.search-set-grid .set-tile-img{
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.search-set-grid .set-tile-label{
    margin-top: 3px;
    font-size: 11px;
    color: #444;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 모바일: 두 줄 그리드로 표시, 아이콘 더 작게 */
@media (max-width: 640px){
    /* 상세검색 섹션 간격 줄이기 */
    #job-search-container {
        gap: 4px !important;
    }
    
    /* 직업 행 하단 마진 줄이기 */
    .job-search-row {
        margin-bottom: 12px !important;
    }
    
    /* 세트/무기 컨테이너 간격 줄이기 */
    .set-weapon-container {
        gap: 8px !important;
    }
    
    /* 필터 라벨 텍스트 크기 줄이기 */
    .filter-label-text {
        font-size: 13px !important;
    }
    
    /* 검색 버튼 위 마진 줄이기 */
    .search-buttons-container {
        
    }
    
    .search-set-grid{
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)) !important;
        gap: 3px !important;
        max-height: 120px;
        overflow-y: auto;
    }
    .search-set-grid .set-tile{
        min-width: 44px;
        padding: 2px 1px;
    }
    .search-set-grid .set-tile-img{
        width: 18px;
        height: 18px;
    }
    .search-set-grid .set-tile-label{
        font-size: 8px;
        margin-top: 1px;
    }
}