@font-face {
    font-family: 'Pretendard';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('../font/PretendardVariable.woff2') format('woff2');
}

/* [NEW CODE] CSS 변수 정의 */
:root {
    --primary-color: #0F78EC;
    --primary-color-hover: #0D68D0;
    --primary-color-rgb: 15, 120, 236;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

/* 질문 리스트 로딩 상태 시 스타일 */
.qa-question-list.loading {
    position: relative;
    min-height: 200px;
    opacity: 0.6;
}
.qa-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: var(--primary-color);
}
.qa-loading i {
    margin-right: 8px;
}

/* [NEW CODE] 2024-12-19 게스트 IP 표시 스타일 */
.qa-guest-ip {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    opacity: 0.7;
}

/* 질문 목록 페이지 */
.qa-board-list-wrap {
    max-width: 1280px;
    padding: 20px;
}


.qa-board-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* [REMOVED] 기존 인기글 슬라이더 스타일 제거 - 하단의 새로운 스타일로 대체됨 */

.qa-expert-answer-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qa-question-item .qa-stats {
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

@media (max-width: 768px) {
    .qa-question-main {
        padding-right: 0;
    }
    
    .qa-expert-answer-badge {
        position: static;
        display: inline-flex;
        margin-bottom: 8px;
    }
}

/* [MODIFIED] 2024-12-19 Q&A 리스트 레이아웃 개선 */

/* 메인 컨테이너 */
.qa-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 헤더 영역 개선 */
.qa-list-header {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3ff 100%);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e9ecef;
}

/* 기존 인기글 스타일 제거됨 - 하단의 현대적 디자인으로 대체 */

/* 검색 및 필터 섹션 */
.qa-list-filters {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.qa-list-filters h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* 검색 폼 개선 */
.qa-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    max-width: 500px;
}

.qa-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.qa-search-form input[type="text"] {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #2c3e50;
}

.qa-search-form input[type="text"]::placeholder {
    color: #6c757d;
}

.qa-search-form button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.qa-search-form button:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
}

/* 필터 래퍼 */
.qa-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 카테고리 네비게이션 */
.qa-category-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.qa-category-item {
    padding: 10px 16px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.qa-category-item:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.qa-category-item.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

/* 필터 액션 */
.qa-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* 전문가 필터 */
.qa-expert-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.qa-expert-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* 정렬 필터 */
.qa-sort-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.qa-sort-filter:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.qa-sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.qa-sort-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.qa-sort-dropdown a:hover {
    background: #f8f9fa;
}

.qa-sort-dropdown a.active {
    background: var(--primary-color);
    color: #fff;
}

/* 게시판 헤더 */
.qa-board-header {
    display: grid;
    grid-template-columns: 120px 1fr 120px 100px 180px;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.qa-board-header-item {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.qa-board-header-item.title {
    text-align: left;
}

.qa-board-header-item.stats {
    display: flex;
    justify-content: space-around;
    gap: 8px;
}

.qa-board-header-item.stats span {
    font-size: 12px;
    color: #6c757d;
}

/* 질문 목록 컨테이너 */
.qa-question-list-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f1f3f4;
}

/* 헤더 */
.qa-list-header-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px 100px 180px;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3ff 100%);
    border-bottom: 1px solid #e3e7ff;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.qa-header-category {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 카테고리는 왼쪽 정렬 */
}

.qa-header-title {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 제목은 왼쪽 정렬 */
}

.qa-header-author {
    display: flex;
    align-items: center;
    justify-content: center; /* 작성자는 중앙 정렬 */
}

.qa-header-date {
    display: flex;
    align-items: center;
    justify-content: center; /* 작성일은 중앙 정렬 */
}

.qa-header-stats {
    display: flex;
    align-items: center;
    justify-content: center; /* 통계는 중앙 정렬 */
}

/* 질문 리스트 */
.qa-question-list {
    display: flex;
    flex-direction: column;
}

/* 질문 아이템 */
.qa-question-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f1f3f4;
    position: relative;
}

.qa-question-item:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.qa-question-item:last-child {
    border-bottom: none;
}

/* 질문 내용 */
.qa-question-content {
    display: grid;
    grid-template-columns: 100px 1fr 120px 100px 180px;
    gap: 16px;
    padding: 20px 24px;
    align-items: center;
    min-height: 70px;
}

/* 카테고리 */
.qa-category-col {
    display: flex;
    justify-content: flex-start; /* 헤더와 동일하게 왼쪽 정렬 */
    align-items: center;
}

.qa-category-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.2);
}

/* 제목 - 핵심 수정 부분 */
.qa-title-col {
    min-width: 0; /* 핵심: flex 아이템이 축소될 수 있도록 */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 헤더와 동일하게 왼쪽 정렬 */
}

.qa-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0; /* 핵심: 내부 요소들이 축소될 수 있도록 */
}

.qa-title-heading {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    min-width: 0; /* 핵심: 제목이 축소될 수 있도록 */
}

.qa-title-link {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    /* 핵심: 제목 오버플로우 처리 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-title-link:hover {
    color: var(--primary-color);
    text-shadow: 0 1px 2px rgba(var(--primary-color-rgb), 0.1);
}

.qa-expert-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0; /* 핵심: 뱃지는 축소되지 않도록 */
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

/* 작성자 */
.qa-author-col {
    display: flex;
    justify-content: center; /* 헤더와 동일하게 중앙 정렬 */
    align-items: center;
}

.qa-author-name {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* [NEW CODE] 2024-12-19 사용자 배지 스타일 */
.qa-author-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.qa-guest-badge {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.qa-member-badge {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.qa-expert-badge {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.qa-admin-badge {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

/* 게스트 IP 스타일 */
.qa-guest-ip {
    font-size: 10px;
    color: #9ca3af;
    font-weight: normal;
    margin-left: 2px;
}

/* 작성일 */
.qa-date-col {
    display: flex;
    justify-content: center; /* 헤더와 동일하게 중앙 정렬 */
    align-items: center;
}

.qa-date-time {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
}

/* 통계 */
.qa-stats-col {
    display: flex;
    justify-content: center; /* 헤더와 동일하게 중앙 정렬 */
    align-items: center;
}

.qa-stats-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.qa-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.qa-stat-item:hover {
    transform: translateY(-1px);
}

.qa-stat-item i {
    font-size: 11px;
}

.qa-likes i {
    color: #e74c3c;
}

.qa-views i {
    color: #17a2b8;
}

.qa-answers i {
    color: #28a745;
}

/* 빈 상태 */
.qa-no-questions {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.qa-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.qa-empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 8px;
}

.qa-empty-state h4 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.qa-empty-state p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* 스크린 리더 전용 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 페이지네이션 */
.qa-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.qa-pagination .page-numbers {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.qa-pagination .page-numbers li {
    list-style: none;
}

.qa-pagination .page-numbers a,
.qa-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.qa-pagination .page-numbers a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.qa-pagination .page-numbers .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .qa-list-container {
        padding: 16px;
        margin: 0 16px;
    }
    
    .qa-list-header {
        padding: 20px 16px;
    }
    
    .qa-filter-wrap {
        gap: 12px;
    }
    
    .qa-filter-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    /* 헤더 숨김 */
    .qa-list-header-row {
        display: none;
    }
    
    /* 카드 형태로 변경 */
    .qa-question-list-container {
        border-radius: 8px;
        margin: 0 -8px;
    }
    
    .qa-question-item {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .qa-question-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.1);
    }
    
    .qa-question-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        grid-template-columns: none;
    }
    
    /* 모바일 레이아웃 */
    .qa-category-col {
        order: 1;
        justify-content: flex-start;
    }
    
    .qa-title-col {
        order: 2;
        margin-bottom: 8px;
    }
    
    .qa-title-heading {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .qa-title-link {
        font-size: 14px;
        /* 모바일에서는 2줄까지 허용 */
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .qa-expert-badge {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .qa-category-badge {
        font-size: 10px;
    padding: 4px 8px;
    }
    
    /* 하단 정보 */
    .qa-author-col,
    .qa-date-col,
    .qa-stats-col {
        order: 3;
    }
    
    .qa-author-col,
    .qa-date-col {
        display: inline-block;
        margin-right: 16px;
    }
    
    .qa-author-name {
    font-size: 12px;
        display: inline;
    }
    
    .qa-date-time {
        font-size: 11px;
        display: inline;
    }
    
    .qa-stats-col {
        display: inline-block;
        float: right;
    }
    
    .qa-stats-wrapper {
        gap: 8px;
        justify-content: flex-end;
    }
    
    .qa-stat-item {
        font-size: 11px;
    }
    
    .qa-stat-item i {
        font-size: 10px;
    }
    
    .qa-search-form {
        max-width: none;
    }
    
    .qa-category-nav {
        padding: 10px;
    }
    
    .qa-category-item {
        padding: 6px 10px;
    font-size: 12px;
    }
}

@media (max-width: 480px) {
    .qa-list-container {
        margin: 0 8px;
        padding: 10px;
    }
    
    .qa-list-header {
        padding: 16px 12px;
    }
    
    .qa-list-filters h2 {
        font-size: 18px;
    }
    
    .qa-search-form {
    flex-direction: column;
        gap: 6px;
}

    .qa-search-form button {
    width: 100%;
    }
    
    .qa-question-list-container {
        margin: 0 -4px;
    }
    
    .qa-question-item {
        margin-bottom: 12px;
    }
    
    .qa-question-content {
        padding: 12px;
    gap: 10px;
    }
    
    .qa-title-heading {
        font-size: 13px;
    }
    
    .qa-title-link {
        font-size: 13px;
    }
    
    .qa-category-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .qa-expert-badge {
        font-size: 7px;
        padding: 2px 4px;
    }
    
    .qa-author-name {
        font-size: 11px;
    }
    
    .qa-date-time {
        font-size: 10px;
    }
    
    .qa-stats-wrapper {
        gap: 6px;
    }
    
    .qa-stat-item {
        font-size: 10px;
    }
    
    .qa-stat-item i {
        font-size: 9px;
    }
}

/* [MODIFIED] 2024-12-19 중복된 스타일 제거 - 하단의 BEST 디자인으로 통합 관리 */

/* [REMOVED] 구버전 스타일들 제거 - 최신 BEST 디자인으로 대체됨 */

/* [NEW CODE] 2024-12-19 팝업 열릴 때 스크롤 방지 */
body.popup-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 질문하기 팝업 오버레이 */
.qa-ask-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important; /* 최상위 레이어로 설정 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px); /* 배경 블러 효과 */
}

.qa-ask-popup.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 팝업 컨텐츠 */
.qa-ask-popup-content {
    background: #fff !important;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative !important;
    z-index: 1000000 !important; /* 컨텐츠도 최상위 */
}

/* 팝업 헤더 */
.qa-ask-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.qa-ask-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.qa-ask-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.qa-ask-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* 팝업 폼 */
#qa-ask-form {
    padding: 24px;
}

.qa-form-group {
    margin-bottom: 20px;
}

.qa-form-group:last-child {
    margin-bottom: 0;
}

/* 입력 필드 */
.qa-form-group input[type="text"],
.qa-form-group input[type="password"],
.qa-form-group select,
.qa-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.qa-form-group input[type="text"]:focus,
.qa-form-group input[type="password"]:focus,
.qa-form-group select:focus,
.qa-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.qa-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* 도움말 텍스트 */
.qa-form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

/* 글자 수 카운터 */
.qa-char-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.qa-char-counter-error {
    color: #dc3545;
}

/* 제출 버튼 */
#qa-ask-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#qa-ask-submit:hover:not(:disabled) {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
}

#qa-ask-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Powered by 링크 */
.qa-powered-by {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

.qa-powered-by a {
    color: var(--primary-color);
    text-decoration: none;
}

.qa-powered-by a:hover {
    text-decoration: underline;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .qa-ask-popup-content {
        width: 95%;
        max-height: 95vh;
        margin: 0 10px;
    }
    
    .qa-ask-popup-header {
        padding: 16px 20px;
    }
    
    .qa-ask-popup-header h3 {
        font-size: 18px;
    }
    
    #qa-ask-form {
        padding: 20px;
    }
    
    .qa-form-group input[type="text"],
    .qa-form-group input[type="password"],
    .qa-form-group select,
    .qa-form-group textarea {
        padding: 10px 14px;
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    .qa-form-group textarea {
        min-height: 100px;
    }
    
    #qa-ask-submit {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-ask-popup.show .qa-ask-popup-content {
    animation: fadeInUp 0.3s ease;
}

/* 스크롤바 스타일 (웹킷 브라우저) */
.qa-ask-popup-content::-webkit-scrollbar {
    width: 6px;
}

.qa-ask-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.qa-ask-popup-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.qa-ask-popup-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* [NEW CODE] 2024-12-19 질문하기 버튼 스타일 추가 */

/* 질문 작성 버튼 */
.qa-ask-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.qa-ask-button:hover {
    background: var(--primary-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.4);
}

.qa-ask-button:active {
    transform: translateY(0);
}

.qa-ask-button i {
    font-size: 20px;
}

/* 모바일에서 버튼 텍스트 숨기기 */
@media (max-width: 768px) {
    .qa-ask-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 0; /* 텍스트 숨기기 */
    }
    
    .qa-ask-button i {
        font-size: 18px;
    }
}

/* 태블릿에서 버튼 크기 조정 */
@media (min-width: 769px) and (max-width: 1024px) {
    .qa-ask-button {
        bottom: 25px;
        right: 25px;
        width: 58px;
        height: 58px;
        font-size: 14px;
    }
}

/* 큰 화면에서 버튼 스타일 */
@media (min-width: 1025px) {
    .qa-ask-button {
    width: 120px;
        height: 60px;
        border-radius: 30px;
        font-size: 14px;
        flex-direction: row;
        gap: 8px;
    }
    
    .qa-ask-button i {
        font-size: 16px;
    }
}

/* 접근성 개선 */
.qa-ask-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.3);
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .qa-ask-button {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .qa-ask-button:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

.qa-ask-popup.show .qa-ask-popup-content {
    transform: translateY(0);
}

/* [NEW CODE] 2024-12-19 BEST 1,2,3 컴팩트 디자인으로 수정 */

/* [MODIFIED] 2024-12-19 BEST 질문 섹션 폰트 크기 개선 */

/* 인기글 섹션 - 크기 축소 */
.qa-popular-section {
    margin-bottom: 24px; /* 40px에서 24px로 축소 */
    background: #fff;
    border-radius: 12px; /* 16px에서 12px로 축소 */
    padding: 20px; /* 32px에서 20px로 축소 */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); /* 그림자 축소 */
    border: 1px solid #e9ecef;
}

.qa-popular-title {
    font-size: 20px; /* 18px에서 20px로 확대 */
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 16px; /* 24px에서 16px로 축소 */
    display: flex;
    align-items: center;
    gap: 8px; /* 10px에서 8px로 축소 */
    padding-bottom: 12px; /* 16px에서 12px로 축소 */
    border-bottom: 2px solid #f8f9fa;
}

.qa-popular-title i {
    color: #ff6b35;
    font-size: 18px; /* 16px에서 18px로 확대 */
}

/* BEST 목록 컨테이너 - 간격 축소 */
.qa-best-list {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 12px에서 8px로 축소 */
}

/* BEST 아이템 - 전체적으로 컴팩트하게 */
.qa-best-item {
    display: flex;
    align-items: center;
    gap: 12px; /* 16px에서 12px로 축소 */
    padding: 12px; /* 16px에서 12px로 축소 */
    background: #f8f9fa;
    border-radius: 8px; /* 12px에서 8px로 축소 */
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    min-height: 60px; /* 80px에서 60px로 축소 */
}

.qa-best-item:hover {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(var(--primary-color-rgb), 0.08); /* 그림자 축소 */
    transform: translateY(-1px); /* -2px에서 -1px로 축소 */
}

/* BEST 순위 - 크기 축소 */
.qa-best-rank {
    flex-shrink: 0;
    width: 48px; /* 40px에서 32px로 축소 */
    height: 48px; /* 40px에서 32px로 축소 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px; /* 14px에서 16px로 확대 */
    font-weight: 800;
    color: #fff;
    position: relative;
}

.qa-best-rank::before {
    content: '';
    position: absolute;
    top: -1px; /* -2px에서 -1px로 축소 */
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    z-index: -1;
}

.qa-best-item:nth-child(1) .qa-best-rank {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3); /* 그림자 축소 */
}

.qa-best-item:nth-child(2) .qa-best-rank {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3); /* 그림자 축소 */
}

.qa-best-item:nth-child(3) .qa-best-rank {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3); /* 그림자 축소 */
}

/* 1등 특별 효과 - 크기 축소 */
.qa-best-item:nth-child(1) .qa-best-rank::after {
    content: '👑';
    position: absolute;
    top: -4px; /* -6px에서 -4px로 축소 */
    right: -4px; /* -6px에서 -4px로 축소 */
    font-size: 14px; /* 12px에서 14px로 확대 */
    animation: crown-bounce 2s infinite;
}

@keyframes crown-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); } /* -3px에서 -2px로 축소 */
}

/* BEST 콘텐츠 - 간격 축소 */
.qa-best-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px; /* 6px에서 4px로 축소 */
}

.qa-best-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px; /* 9px에서 11px로 확대 */
    font-weight: 600;
    padding: 2px 6px; /* 3px 8px에서 2px 6px로 축소 */
    border-radius: 8px; /* 10px에서 8px로 축소 */
    margin-bottom: 2px; /* 4px에서 2px로 축소 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.qa-best-title {
    font-size: 15px; /* 13px에서 15px로 확대 */
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 4px; /* 6px에서 4px로 축소 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 최대 2줄 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-best-item:hover .qa-best-title {
    color: var(--primary-color);
}

.qa-best-meta {
    display: flex;
    align-items: center;
    gap: 8px; /* 12px에서 8px로 축소 */
    font-size: 13px; /* 11px에서 13px로 확대 */
    color: #6c757d;
}

.qa-best-author {
    display: flex;
    align-items: center;
    gap: 4px; /* 6px에서 4px로 축소 */
}

/* [MODIFIED] 2024-12-19 프로필 이미지 축소 */
.qa-best-author-avatar {
    width: 18px; /* 16px에서 18px로 확대 */
    height: 18px; /* 16px에서 18px로 확대 */
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px; /* 8px에서 9px로 확대 */
    font-weight: 600;
    flex-shrink: 0;
}

.qa-best-author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* [MODIFIED] 2024-12-19 Verification 이미지 축소 */
.qa-best-verification {
    width: 14px; /* 12px에서 14px로 확대 */
    height: 14px; /* 12px에서 14px로 확대 */
    flex-shrink: 0;
    margin-left: 2px; /* 4px에서 2px로 축소 */
}

.qa-best-verification.admin {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 7px; /* 6px에서 7px로 확대 */
}

.qa-best-verification.expert {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 2px; /* 3px에서 2px로 축소 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 7px; /* 6px에서 7px로 확대 */
}

.qa-best-author-name {
    font-weight: 500;
    max-width: 60px; /* 80px에서 60px로 축소 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BEST 통계 - 크기 축소 */
.qa-best-stats {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* 6px에서 4px로 축소 */
    padding-left: 12px; /* 16px에서 12px로 축소 */
    border-left: 1px solid #e9ecef;
    min-width: 50px; /* 60px에서 50px로 축소 */
}

.qa-best-stat {
    display: flex;
    align-items: center;
    gap: 2px; /* 3px에서 2px로 축소 */
    font-size: 12px; /* 10px에서 12px로 확대 */
    color: #6c757d;
    font-weight: 500;
}

.qa-best-stat i {
    font-size: 11px; /* 9px에서 11px로 확대 */
}

.qa-best-stat.views i {
    color: #17a2b8;
}

.qa-best-stat.likes i {
    color: #e74c3c;
}

.qa-best-stat.answers i {
    color: #28a745;
}

/* 전문가 뱃지 - 크기 축소 */
.qa-best-expert-badge {
    position: absolute;
    top: 8px; /* 10px에서 8px로 축소 */
    right: 8px; /* 10px에서 8px로 축소 */
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    font-size: 9px; /* 8px에서 9px로 확대 */
    font-weight: 600;
    padding: 2px 4px; /* 3px 6px에서 2px 4px로 축소 */
    border-radius: 4px; /* 6px에서 4px로 축소 */
    box-shadow: 0 1px 4px rgba(40, 167, 69, 0.2); /* 그림자 축소 */
    z-index: 1;
}

/* 빈 상태 - 크기 축소 */
.qa-best-empty {
    text-align: center;
    padding: 20px 16px; /* 40px 20px에서 20px 16px로 축소 */
    color: #6c757d;
    font-size: 14px; /* 12px에서 14px로 확대 */
}

.qa-best-empty i {
    font-size: 24px; /* 40px에서 24px로 축소 */
    margin-bottom: 8px; /* 12px에서 8px로 축소 */
    color: #dee2e6;
}

/* [MODIFIED] 2024-12-19 로딩 상태 스타일 축소 */
.qa-best-loading {
    text-align: center;
    padding: 20px 16px; /* 40px 20px에서 20px 16px로 축소 */
    color: #6c757d;
    font-size: 14px; /* 12px에서 14px로 확대 */
}

.qa-best-loading i {
    font-size: 20px; /* 28px에서 20px로 축소 */
    margin-bottom: 8px; /* 12px에서 8px로 축소 */
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

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

/* 반응형 디자인 - 모바일에서 더 컴팩트하게 */
@media (max-width: 768px) {
    .qa-popular-section {
        padding: 16px 12px; /* 20px 16px에서 16px 12px로 축소 */
        margin-bottom: 20px; /* 28px에서 20px로 축소 */
    }
    
    .qa-popular-title {
        font-size: 18px; /* 16px에서 18px로 확대 */
        margin-bottom: 12px; /* 16px에서 12px로 축소 */
    }
    
    .qa-best-list {
        gap: 6px; /* 10px에서 6px로 축소 */
    }
    
    .qa-best-item {
        flex-direction: column;
        gap: 8px; /* 12px에서 8px로 축소 */
        padding: 10px; /* 12px에서 10px로 축소 */
        text-align: center;
        min-height: auto; /* 모바일에서는 자동 높이 */
    }
    
    .qa-best-rank {
        width: 28px; /* 36px에서 28px로 축소 */
        height: 28px; /* 36px에서 28px로 축소 */
        font-size: 14px; /* 12px에서 14px로 확대 */
    }
    
    .qa-best-rank::after {
        top: -3px;
        right: -3px;
        font-size: 12px; /* 10px에서 12px로 확대 */
    }
    
    .qa-best-content {
        text-align: center;
        gap: 3px; /* 4px에서 3px로 축소 */
    }
    
    .qa-best-title {
        font-size: 14px; /* 12px에서 14px로 확대 */
        height: auto; /* 모바일에서는 자동 높이 */
        -webkit-line-clamp: 2; /* 2줄 유지 */
        margin-bottom: 3px; /* 4px에서 3px로 축소 */
    }
    
    .qa-best-meta {
        justify-content: center;
        gap: 6px; /* 8px에서 6px로 축소 */
    }
    
    .qa-best-author-avatar {
        width: 16px; /* 14px에서 16px로 확대 */
        height: 16px; /* 14px에서 16px로 확대 */
        font-size: 8px; /* 7px에서 8px로 확대 */
    }
    
    .qa-best-verification {
        width: 12px; /* 10px에서 12px로 확대 */
        height: 12px; /* 10px에서 12px로 확대 */
    }
    
    .qa-best-stats {
        flex-direction: row;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e9ecef;
        padding-top: 6px; /* 8px에서 6px로 축소 */
        justify-content: center;
        gap: 8px; /* 12px에서 8px로 축소 */
        min-width: auto;
    }
    
    .qa-best-expert-badge {
        top: 6px; /* 8px에서 6px로 축소 */
        right: 6px; /* 8px에서 6px로 축소 */
        font-size: 8px; /* 7px에서 8px로 확대 */
        padding: 1px 3px; /* 2px 4px에서 1px 3px로 축소 */
    }
}

@media (max-width: 480px) {
    .qa-popular-section {
        padding: 12px 10px; /* 16px 12px에서 12px 10px로 축소 */
        border-radius: 8px; /* 10px에서 8px로 축소 */
    }
    
    .qa-popular-title {
        font-size: 16px; /* 14px에서 16px로 확대 */
        margin-bottom: 10px; /* 12px에서 10px로 축소 */
    }
    
    .qa-best-list {
        gap: 5px; /* 8px에서 5px로 축소 */
    }
    
    .qa-best-item {
        padding: 8px; /* 10px에서 8px로 축소 */
        gap: 6px; /* 10px에서 6px로 축소 */
    }
    
    .qa-best-rank {
        width: 24px; /* 32px에서 24px로 축소 */
        height: 24px; /* 32px에서 24px로 축소 */
        font-size: 12px; /* 10px에서 12px로 확대 */
    }
    
    .qa-best-title {
        font-size: 13px; /* 11px에서 13px로 확대 */
        -webkit-line-clamp: 2; /* 2줄 유지 */
    }
    
    .qa-best-meta {
        font-size: 11px; /* 10px에서 11px로 확대 */
        gap: 4px; /* 6px에서 4px로 축소 */
    }
    
    .qa-best-author-avatar {
        width: 14px; /* 12px에서 14px로 확대 */
        height: 14px; /* 12px에서 14px로 확대 */
        font-size: 7px; /* 6px에서 7px로 확대 */
    }
    
    .qa-best-verification {
        width: 10px; /* 8px에서 10px로 확대 */
        height: 10px; /* 8px에서 10px로 확대 */
    }
    
    .qa-best-stats {
        gap: 6px; /* 8px에서 6px로 축소 */
        padding-top: 4px; /* 6px에서 4px로 축소 */
    }
    
    .qa-best-stat {
        font-size: 10px; /* 9px에서 10px로 확대 */
    }
    
    .qa-best-expert-badge {
        font-size: 7px; /* 6px에서 7px로 확대 */
        padding: 1px 2px; /* 2px 3px에서 1px 2px로 축소 */
    }
}

/* 검색 결과 정보 */
.qa-search-result-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #495057;
}

.qa-search-result-info p {
    margin: 0;
    font-weight: 500;
}

.qa-result-count {
    color: var(--primary-color);
    font-weight: 600;
}
