/* ===========================
   표현·문구 사전 스타일
   =========================== */

/* 페이지 컨테이너 가운데 정렬 */
.page-container {
    padding: 20px;
}

.page-container .container {
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 검색 및 필터 섹션 */
.search-filter-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box i.fa-search {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.05rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-clear-search:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* 카테고리 필터 */
.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.category-filter {
    padding: 10px 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-filter i {
    font-size: 0.9rem;
}

/* 표현 목록 헤더 */
.phrase-list-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.phrase-list-header h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phrase-list-header h2 i {
    color: var(--primary-color);
}

.phrase-list-header h2 span {
    color: var(--primary-color);
    font-weight: 700;
}

/* 표현 목록 */
.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phrase-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.phrase-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.phrase-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.phrase-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.phrase-category i {
    font-size: 0.8rem;
}

.phrase-content {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 10px;
    font-weight: 500;
}

.phrase-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.phrase-usage {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.phrase-usage-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.phrase-usage-example {
    background: var(--bg-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-top: 6px;
    border-left: 3px solid var(--primary-color);
    font-style: italic;
}

/* 대체 표현 */
.phrase-alternatives {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.phrase-alternatives-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.phrase-alternatives-title i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.phrase-alternatives-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alt-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.alt-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 참고사항 */
.phrase-note {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.phrase-note i {
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* 복사 버튼 */
.btn-copy-phrase {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-phrase:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 빈 결과 */
.empty-result {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-result i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--border-color);
}

.empty-result h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-result p {
    font-size: 0.95rem;
}

/* 토스트 메시지 */
.toast-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-message i {
    font-size: 1.2rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .search-box {
        max-width: 100%;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .category-filter {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .phrase-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .toast-message {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}

/* ===== FAQ/QNA 섹션 (페이지 하단) ===== */
.faq-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    padding: 40px 32px;
    margin: 40px auto 0 auto;
    max-width: 900px;
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
}

.faq-title i {
    color: #2563eb;
    font-size: 1.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    transition: all 0.3s ease;
    width: 100%;
}

.faq-item.active,
.faq-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    background: #f8fafc;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
    width: 100%;
}

.faq-question span:not(.faq-icon) {
    flex: 1;
    word-break: keep-all;
}

.faq-icon {
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.faq-arrow {
    margin-left: auto;
    color: #64748b;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-item .faq-answer {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
    width: 100%;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    margin-bottom: 8px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: #1e293b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .faq-section {
        padding: 24px 20px;
        margin: 24px 0 0;
    }
    
    .faq-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .faq-item {
        padding: 16px 18px;
    }
    
    .faq-question {
        font-size: 1rem;
        gap: 10px;
    }
    
    .faq-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .faq-item .faq-answer {
        font-size: 0.95rem;
    }
}

