/* ──────────────────────────────────────────────────────────
   1. 초기화 및 레이아웃 설정
   ────────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.search-page {
    background-color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    color: #474747;
}

.search-container {
    max-width: 960px; /* 마이페이지와 동일한 컴팩트 너비 */
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* ──────────────────────────────────────────────────────────
   2. 검색창 섹션 (Search Input Area)
   ────────────────────────────────────────────────────────── */
.search-input-section {
    width: 100%;
    margin-bottom: 45px;
    display: flex;
    justify-content: center;
}

.search-bar-wrap {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 920px;
    position: relative;
}


#searchInput {
    flex: 1;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #D6D6D6;
    border-radius: 5px;
    padding: 0 20px;
    font-size: 13px;
    color: #474747;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchInput::placeholder {
    color: #9F9F9F;
}

#searchInput:focus {
    border-color: #1C4476;
}

.main-search-btn {
    width: 78px;
    height: 40px;
    background: #1C4476;
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-search-btn:hover {
    background: #15345a;
}

.main-search-btn:active {
    transform: scale(0.97);
}

/* ──────────────────────────────────────────────────────────
   3. 퀵 링크 섹션 (최근/인기 검색어)
   ────────────────────────────────────────────────────────── */
.quick-links-section {
    display: flex;
    gap: 70px;
    margin-bottom: 20px;
}

.recent-search {
    flex: 1.8;
}

.popular-search {
    flex: 1;
}

.section-sub-title {
    font-size: 12px;
    font-weight: 500;
    color: #474747;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* 최근 검색어 태그 스타일 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    background: #F4F8FD;
    border: 1px solid #EBF4FE;
    color: #34436D;
    padding: 5.5px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-tag:hover {
    background: #eaf3ff;
}

.close-icon {
    color: #8A99C4;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
}

/* 인기 검색어 순위 리스트 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-list li {
    padding: 8px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 13px;
    color: #474747;
    display: flex;
    align-items: center;
    gap: 18px;
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-num {
    background: #EAEAEA;
    color: #474747;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   4. 가로 구분선 및 간격 교정
   ────────────────────────────────────────────────────────── */
.full-divider {
    border: none;
    border-top: 1px solid #E7E7E7;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px; 
}

/* ──────────────────────────────────────────────────────────
   5. 검색 결과 리스트 (상세 정렬 및 스타일)
   ────────────────────────────────────────────────────────── */
.results-container {
    width: 100%;
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 리스트 개별 항목*/
.search-result-list li {
    display: flex;
    justify-content: space-between; /* 단어 좌측/중앙, 버튼 우측 끝 정렬 */
    align-items: center;
    padding: 16px 25px;
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.15s ease;
}

.search-result-list li:hover {
    background-color: #FAFBFF;
}

.search-result-list li:last-child {
    border-bottom: none;
}

/* 수어 단어 텍스트: 중앙 쪽으로 위치 고정 */
.sign-word {
    font-size: 13px;
    font-weight: 500;
    color: #34436D;
    flex: 1;
    text-align: center;
}

/* 우측 버튼 묶음 */
.btn-group {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-basket {
    background: #517AAF;
    color: #FFFFFF;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, background 0.2s;
    width: 110px;      
    text-align: center;  
}

.btn-basket.in-basket {
    background: #2E5A8A;
    opacity: 0.85;
}

.btn-learn {
    background: #F0F0F0;
    color: #273356;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, background 0.2s;
}

.btn-basket:hover {
    opacity: 0.85;
    background-color: #436691;
}

.btn-learn:hover {
    background-color: #e5e5e5;
}

/* ──────────────────────────────────────────────────────────
   6. 결과 없음 상태 관리
   ────────────────────────────────────────────────────────── */
.result-state {
    display: none;
}

.result-state.active {
    display: block;
}

.no-result-msg {
    text-align: center;
    padding: 150px 0;
    color: #9F9F9F;
    font-size: 13px;
    letter-spacing: -0.01em;
}

/* ──────────────────────────────────────────────────────────
   7. 스크롤바 및 기타 디테일
   ────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
}

::-webkit-scrollbar-thumb {
    background: #d6d6d6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d3d3d3;
}

/* 포커스 상태에서의 시각적 강조 */
.search-tag:active, .rank-list li:active {
    background-color: #f0f0f0;
}

/* 애니메이션 효과 추가 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-result-list li {
    animation: fadeIn 0.3s ease forwards;
}

/* ──────────────────────────────────────────────────────────
   8. 반응형 레이아웃 보정
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .quick-links-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .sign-word {
        margin-left: 0;
        text-align: left;
    }
    
    .search-result-list li {
        padding: 14px 15px;
    }
}

#results-list {
    max-height: 600px;
    overflow-y: auto;
}

#results-list::-webkit-scrollbar {
    width: 4px;
}

#results-list::-webkit-scrollbar-track {
    background: transparent;
}

#results-list::-webkit-scrollbar-thumb {
    background: #D6D6D6;
    border-radius: 10px;
}

#results-list::-webkit-scrollbar-thumb:hover {
    background: #1C4476;
}
.click-guide {
    font-size: 11px;
    color: #9F9F9F;
    text-align: center;
    margin-bottom: 30px;
}