/* 프론트엔드 스타일 */

/* 검색 상태 표시 영역 스타일 */
.mybook-search-status {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mybook-search-current {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.search-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.search-keyword {
    background: #007cba;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.search-clear-btn {
    background: #dc3545;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.search-clear-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.search-clear-btn:active {
    transform: scale(0.95);
}
.mybook-shortcode-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* 세로 배치 */
}

.mybook-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 20px 0;
    max-width: 1200px;
    grid-auto-rows: 1fr; /* 각 행의 아이템들이 같은 높이를 가짐 */
    align-items: stretch; /* 아이템들을 그리드 셀 전체로 늘림 */
    order: 1; /* 가장 먼저 표시 */
}

/* 필터 메시지가 있을 때 그리드 레이아웃 비활성화 */
.mybook-gallery.show-filter-message {
    display: block;
}

.mybook-filter-message {
    grid-column: 1 / -1; /* 전체 너비 차지 */
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.mybook-filter-message p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.mybook-item {
    position: relative; /* 카테고리 absolute 위치의 기준점 */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;  /* 세로 배치 */
    height: 100%;  /* 부모 그리드 셀의 전체 높이 사용 */
}

.mybook-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
}

/* 헤더 영역 (제목, 저자, 출판사) */
.mybook-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 80px; /* 최소 높이 설정 */
}

/* 제목과 편집 링크를 담는 래퍼 */
.mybook-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.mybook-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    line-height: 1.3;
    flex: 1;
    word-break: break-all; /* 글자 단위로 줄바꿈 */
    overflow-wrap: break-word;
    width: 100%; /* 부모 너비 제한 */
    box-sizing: border-box;
}

.mybook-edit-link {
    font-size: 11px;
    color: #666;
    text-decoration: none;
    padding: 1px 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
    line-height: 1.2;
    height: auto;
    min-height: 16px;
}

.mybook-edit-link:hover {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.mybook-meta {
    display: flex;
    flex-direction: row;  /* 가로로 배치 */
    align-items: center;
    gap: 12px;  /* 항목 간 간격 */
    flex-wrap: wrap;  /* 공간 부족 시 줄바꿈 */
}

.mybook-category,
.mybook-author,
.mybook-publisher,
.mybook-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8e8e8e;
}

.mybook-author i,
.mybook-publisher i {
    width: 12px;
    font-size: 12px;
    color: #c7c7c7;
}

/* 별점 스타일 */
.mybook-rating {
    margin: 0;  /* 가로 배치를 위해 margin 제거 */
}

.mybook-stars {
    display: flex;
    gap: 2px;
}

.mybook-stars i {
    font-size: 12px;
    color: #ffd700;
}

.mybook-stars .far {
    color: #ddd;
}

/* 커버 이미지 컨테이너 */
.mybook-cover-container {
    position: relative; /* absolute 자식 요소의 기준점 */
    width: 100%;
    aspect-ratio: 4/5; /* 4:5 비율 설정 */
    overflow: hidden; /* 넘치는 부분 숨김 */
}

.mybook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 비율 유지하며 컨테이너 채움 */
    object-position: center; /* 중앙 정렬 */
    background: #fafafa;
}

.mybook-no-cover {
    width: 100%;
    height: 100%; /* 컨테이너 전체 높이 사용 */
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #c7c7c7;
    gap: 8px;
}

.mybook-no-cover i {
    font-size: 48px;
}

.mybook-no-cover span {
    font-size: 14px;
    font-weight: 500;
}

/* 하트 버튼 - 통합 스타일 (modal-common.css와 동일) */
.mybook-heart-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 20px;
    color: #dc3545;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.mybook-heart-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mybook-heart-btn.liked {
    color: #dc3545;
}

.mybook-heart-btn.liked i {
    color: #ff6b9d;
}

/* 문장수집 영역 - 인스타그램 캡션 스타일 */
.mybook-quotes {
    padding: 16px;
    background: transparent;
    border: none;
    flex: 1;  /* 남은 공간을 차지하도록 설정 */
    display: flex;
    flex-direction: column;
}

.mybook-quotes-content {
    font-size: 14px;
    color: #262626;
    line-height: 1.5;
    word-break: break-all;  /* 글자 단위로 줄바꿈 */
    /* 높이 제한 없이 내용에 따라 자동 조정 */
    /* line-clamp 제거하여 전체 내용 표시 */
}

/* 더보기 버튼이 필요한 경우를 위한 클래스 */
.mybook-quotes-content.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 9;  /* 최대 9줄까지만 표시 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mybook-quotes-content.expanded {
    display: block;  /* 일반 블록으로 표시 */
}

.mybook-pagination {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
    order: 2; /* 검색 폼보다 위에 배치 */
}

.mybook-pagination a,
.mybook-pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    font-size: 15px;
}

.mybook-pagination a:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.mybook-pagination .current {
    background-color: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}

.mybook-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.mybook-search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mybook-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

.mybook-search-input::placeholder {
    font-size: 14px;
    color: #999;
}

.mybook-search-btn {
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    box-sizing: border-box;
}

.mybook-search-btn:hover {
    background-color: #555;
}

@media (max-width: 768px) {
    .mybook-gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    
    /* 모바일에서 mybook-meta 가로 배치 유지 */
    .mybook-meta {
        flex-direction: row;
        gap: 10px;
    }
    
    .mybook-cover-container {
        aspect-ratio: 4/5; /* 모바일에서도 4:5 비율 유지 */
    }
    
    .mybook-title {
        font-size: 16px;
        word-break: break-all;
        overflow-wrap: break-word;
    }
    
    .mybook-header {
        min-height: 100px; /* 모바일에서 조금 낮게 */
    }
    
    .mybook-search-wrapper {
        width: 100%;
    }
    
    /* 모바일에서 mybook-mention 하트 버튼 크기 조정 */
    .mybook-mention .mybook-heart-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        right: 12px;
    }
}



/* 필터 탭 래퍼 - 탭과 하트 버튼을 가로로 나란히 배치 */
.mybook-filter-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    order: 0; /* 제일 위에 배치 */
}

/* 필터 탭 스타일 - 기존 형태 유지 */
.mybook-filter-tabs {
    display: none; /* 기본적으로 숨김 */
    gap: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    justify-content: flex-start; /* 좌측 정렬 */
    width: fit-content; /* 내용물에 맞는 너비 */
    max-width: calc(100% - 60px); /* 하트 버튼 공간 확보 */
}

.mybook-filter-tabs.visible {
    display: flex; /* 카테고리가 있을 때만 표시 */
}

/* 좋아요 필터 하트 버튼 */
.mybook-liked-filter-btn {
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 18px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* 크기 고정 */
}

.mybook-liked-filter-btn:hover {
    background: white;
    border-color: #ff6b9d;
    color: #ff6b9d;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.mybook-liked-filter-btn.active {
    background: #ff6b9d;
    border-color: #ff6b9d;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

.mybook-liked-filter-btn.active:hover {
    background: #ff5a8c;
    border-color: #ff5a8c;
    transform: scale(1.1);
}

.mybook-filter-tabs.visible {
    display: flex; /* 카테고리가 있을 때만 표시 */
}

.mybook-filter-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
    position: relative;
}

.mybook-filter-tab:hover {
    color: #495057;
    background: rgba(255, 255, 255, 0.7);
}

.mybook-filter-tab.active {
    background: #495057;
    color: white;
    box-shadow: 0 1px 3px rgba(73, 80, 87, 0.3);
}

.mybook-filter-tab.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mybook-filter-tab.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.mybook-search-form {
    order: 10; /* 제일 아래로 (페이지네이션보다도 아래) */
    display: flex;
    justify-content: flex-end; /* 우측 정렬 */
    max-width: 500px; /* 최대 너비 제한 */
    margin-left: auto; /* 우측으로 이동 */
}

.mybook-search-input-wrapper {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.mybook-search-input-wrapper:focus-within {
    border-color: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

/* 기존 검색 스타일 수정 */
.mybook-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    outline: none;
    background: white;
    color: #495057;
}

.mybook-search-input::placeholder {
    color: #adb5bd;
}

.mybook-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 왼쪽 모서리만 직각으로 */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.mybook-search-btn:hover {
    background: #5a6268;
}

.mybook-search-btn i {
    font-size: 14px;
}

/* 미디어 쿼리 */
@media (max-width: 768px) {
    .mybook-filter-tabs-wrapper {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .mybook-filter-tabs {
        justify-content: flex-start; /* 좌측 정렬 유지 */
    }
    
    .mybook-liked-filter-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .mybook-search-form {
        order: 10; /* 여전히 제일 아래 */
        margin: 20px 0; /* 모바일 마진 */
        max-width: 100%; /* 모바일에서 전체 너비 */
        margin-left: 0; /* 모바일에서 좌측 정렬 */
        justify-content: stretch; /* 전체 너비 사용 */
    }
    
    .mybook-search-input-wrapper {
        width: 100%; /* 모바일에서 전체 너비 */
    }
    
    .mybook-search-input {
        padding: 10px 14px; /* 패딩 약간 줄임 */
        font-size: 14px;
    }
    
    .mybook-search-btn {
        padding: 10px 14px; /* 패딩 약간 줄임 */
    }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
    .mybook-search-wrapper {
        gap: 10px;
    }
    
    .mybook-search-form {
        min-width: 150px; /* 더 작은 최소 너비 */
    }
    
    .mybook-search-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .mybook-search-btn {
        padding: 8px 12px;
    }
    
    .mybook-search-btn i {
        font-size: 13px;
    }
}

/* 좋아요 수 스타일 */
.mybook-likes-count {
    margin-left: 4px;
    color: #ff6b9d;
    font-weight: 600;
    font-size: 0.85em;
    background: rgba(255, 107, 157, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    line-height: 1;
}

/* 하트 버튼 좋아요 상태 */
.mybook-heart-btn.liked i {
    color: #ff6b9d;
}

/* 추천 영역 스타일 */
.mybook-no-results {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto 30px auto;
    order: 1; /* 갤러리와 비슷한 순서 */
}

.mybook-no-results-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    width: 100%;
}

.mybook-recommendations-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
    width: 100%;
}

.mybook-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* mybook-recommendation 클래스 제거하고 일반 mybook-item 스타일 사용 */

/* 모바일 반응형 조정 */
@media (max-width: 768px) {
    .mybook-recommendations-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mybook-no-results {
        padding: 30px 15px;
    }
    
    .mybook-no-results-message {
        font-size: 16px;
    }
    
    .mybook-recommendations-title {
        font-size: 14px;
    }
}

/* 필터 결과 메시지 */
.mybook-filter-message {
    width: 100%;
    margin: 20px 0;
}

/* 검색 결과 문장 수집 중앙 정렬 문제 해결 */
.mybook-quotes {
    text-align: left !important;
}

.mybook-quotes-content {
    text-align: left !important;
}



/* 책 언급 링크 스타일 - mybook-item 스타일 적용 */
.mybook-mention {
    position: relative;
    display: flex;
    align-items: center;  /* 세로 중앙 정렬 */
    gap: 30px;  /* 갭을 30px로 확대 */
    background: white;
    overflow: hidden;
    padding: 16px;
    padding-right: 70px; /* 하트 버튼 공간 확보 */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.mybook-mention-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

/* 왼쪽 커버 이미지 영역 */
.mybook-mention .mybook-cover-container {
    position: relative; /* absolute 자식 요소의 기준점 */
    width: 120px;
    height: 150px;
    flex-shrink: 0;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

.mybook-mention .mybook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 비율 유지하며 컨테이너 채움 */
    object-position: center; /* 중앙 정렬 */
    background: #fafafa;
}

.mybook-mention .mybook-no-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #c7c7c7;
    gap: 8px;
}

.mybook-mention .mybook-no-cover i {
    font-size: 32px;
}

.mybook-mention .mybook-no-cover span {
    font-size: 12px;
    font-weight: 500;
}

/* 오른쪽 헤더 영역 (제목, 저자, 출판사) - 세로 중앙 정렬 */
.mybook-mention .mybook-header {
    flex: 1;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 세로 중앙 정렬 */
    gap: 12px;
    min-height: auto; /* mention에서는 자동 높이 */
}

/* 메타 정보 가로 배치 */
.mybook-mention .mybook-meta {
    display: flex;
    flex-direction: row;  /* 가로 배치 */
    align-items: center;
    gap: 20px;  /* 항목 간 간격 */
    flex-wrap: wrap;  /* 공간 부족 시 줄바꿈 */
}

.mybook-mention .mybook-author,
.mybook-mention .mybook-publisher,
.mybook-mention .mybook-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8e8e8e;
    margin: 0;  /* 마진 제거 */
}

.mybook-mention .mybook-author i,
.mybook-mention .mybook-publisher i {
    width: 12px;
    font-size: 12px;
    color: #c7c7c7;
}

/* 별점 스타일 */
.mybook-mention .mybook-rating {
    margin: 0;  /* 상단 마진 제거 */
}

.mybook-mention .mybook-stars {
    display: flex;
    gap: 2px;
}

.mybook-mention .mybook-stars i {
    font-size: 12px;
    color: #ffd700;
}

.mybook-mention .mybook-stars .far {
    color: #ddd;
}

/* mybook-mention 하트 버튼 */
.mybook-mention .mybook-heart-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    z-index: 2;
}

.mybook-mention .mybook-heart-btn:hover {
    background: white;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .mybook-mention {
        gap: 20px;  /* 모바일에서는 20px로 조정 */
        padding: 12px;
        padding-right: 60px; /* 모바일에서 하트 버튼 공간 */
    }
    
    .mybook-mention .mybook-cover-container {
        width: 80px;
        height: 100px;
    }
    
    .mybook-mention .mybook-header {
        gap: 8px;
    }
    
    .mybook-mention .mybook-title {
        font-size: 18px;
    }
    
    .mybook-mention .mybook-meta {
        gap: 12px;  /* 모바일에서 간격 조정 */
        flex-direction: row;  /* 가로 배치 유지 */
    }
    
    .mybook-mention .mybook-author,
    .mybook-mention .mybook-publisher,
    .mybook-mention .mybook-rating {
        font-size: 13px;
    }
    
    .mybook-mention .mybook-no-cover i {
        font-size: 24px;
    }
    
    .mybook-mention .mybook-no-cover span {
        font-size: 10px;
    }
    
    /* 모바일에서 mybook-mention 하트 버튼 크기 조정 */
    .mybook-mention .mybook-heart-btn {
        width: 36px;
        height: 36px;
        right: 12px;
    }
    
    .mybook-mention .mybook-heart-btn i {
        font-size: 16px;
    }
}

/* 아주 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    .mybook-mention .mybook-meta {
        gap: 10px;  /* 더 작은 간격 */
    }
    
    .mybook-mention .mybook-author,
    .mybook-mention .mybook-publisher,
    .mybook-mention .mybook-rating {
        font-size: 12px;
    }
}

/* 관리자용 포스트 연결/해제 버튼 스타일 */
.mybook-admin-controls {
    border-top: 1px solid #e0e0e0;
}

.mybook-toggle-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mybook-toggle-post-btn:active {
    transform: translateY(0);
}

/* 연결 상태별 스타일 */
.mybook-toggle-post-btn.disconnected {
    background-color: #007cba;
    color: white;
}

.mybook-toggle-post-btn.disconnected:hover {
    background-color: #005a87;
}

.mybook-toggle-post-btn.connected {
    background-color: #dc3545;
    color: white;
}

.mybook-toggle-post-btn.connected:hover {
    background-color: #c82333;
}

/* 로딩 상태 */
.mybook-toggle-post-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.mybook-toggle-post-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .mybook-toggle-post-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .mybook-admin-controls {
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* 성공/에러 메시지 스타일 */
.mybook-admin-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.mybook-admin-message.success {
    background-color: #28a745;
}

.mybook-admin-message.error {
    background-color: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* mybook-mention 스타일 */
.mybook-mention-wrapper {
    margin: 16px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    overflow: hidden;
}

.mybook-mention-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
}

.mybook-mention {
    display: flex;
    align-items: center;  /* 세로 중앙 정렬 */
    background: white;
    position: relative;
    padding: 16px;
    gap: 20px;
}

.mybook-mention .mybook-cover-container {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.mybook-mention .mybook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mybook-mention .mybook-header {
    flex: 1;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 세로 중앙 정렬 */
    gap: 12px;
}

.mybook-mention .mybook-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    line-height: 1.3;
    word-break: break-all;
    overflow-wrap: break-word;
}

.mybook-mention .mybook-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.mybook-mention .mybook-author,
.mybook-mention .mybook-publisher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mybook-mention .mybook-heart-btn {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

/* mybook-admin-controls 스타일 - 편집 버튼 최소 너비, 토글 버튼 나머지 공간 차지 */
.mybook-admin-controls {
    display: flex;
    background: white;
    border-top: none;
}

.mybook-toggle-post-btn {
    flex: 1; /* 나머지 공간 모두 차지 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-right: 1px solid #e1e8ed;
}

.mybook-admin-edit-link {
    flex: 0 0 auto; /* 최소 너비로 설정 (내용에 맞게) */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
    min-width: fit-content; /* 컨텐츠에 맞는 최소 너비 */
}

/* 토글 버튼 스타일 */
.mybook-toggle-post-btn.disconnected {
    background-color: #007cba;
    color: white;
}

.mybook-toggle-post-btn.disconnected:hover {
    background-color: #005a87;
}

.mybook-toggle-post-btn.connected {
    background-color: #dc3545;
    color: white;
}

.mybook-toggle-post-btn.connected:hover {
    background-color: #c82333;
}

/* 편집 링크 스타일 */
.mybook-admin-edit-link {
    background-color: #f8f9fa;
    color: #666;
}

.mybook-admin-edit-link:hover {
    background-color: #e9ecef;
    color: #333;
    text-decoration: none;
}

/* 카테고리 스타일 수정 - 아이콘에만 색상 적용 */
.mybook-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8e8e8e;
    /* 배경색 제거 */
}

.mybook-modal-category {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #6c757d;
    /* 배경색 제거 */
}

.mybook-category i {
    width: 12px;
    font-size: 12px;
    /* 기본 색상은 회색으로 설정, 동적 CSS에서 덮어씀 */
    color: #c7c7c7;
}

.mybook-modal-category i {
    width: 14px;
    font-size: 13px;
    /* 기본 색상은 회색으로 설정, 동적 CSS에서 덮어씀 */
    color: #6c757d;
}

/* 빈 카테고리는 숨김 */
.mybook-category:empty {
    display: none;
}

/* ========================================
   비공개 책 스타일
   ======================================== */

/* 비공개 책 자물쇠 아이콘 */
.mybook-private-indicator {
    color: #f39c12;
    margin-right: 6px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* 비공개 책 아이템 스타일 */
.mybook-item.private {
    opacity: 0.85;
    background: rgba(243, 156, 18, 0.02);
}

.mybook-item.private .mybook-title {
    color: #e67e22;
}

/* 모달에서의 비공개 표시 */
.mybook-modal-title .mybook-private-indicator {
    margin-right: 8px;
    font-size: 0.85em;
}

/* mention에서의 비공개 표시 */
.mybook-mention.private {
    background: rgba(243, 156, 18, 0.05);
}

.mybook-mention.private .mybook-title {
    color: #e67e22;
}

/* 비공개 책 hover 효과 */
.mybook-item.private:hover {
    border-color: #e67e22;
    background: rgba(243, 156, 18, 0.05);
}

.mybook-mention.private:hover {
    border-color: #e67e22;
    background: rgba(243, 156, 18, 0.08);
}

/* ========================================
   공유 기능 스타일
   ======================================== */

/* 공유 모드 헤더 */
.mybook-shared-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mybook-shared-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.mybook-shared-info i {
    font-size: 18px;
    opacity: 0.9;
}

.mybook-shared-actions {
    display: flex;
    gap: 10px;
}

/* 내 관심으로 저장 버튼 */
.mybook-save-to-my-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mybook-save-to-my-list-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.mybook-save-to-my-list-btn .diff-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* 공유 버튼 영역 */
.mybook-bottom-actions {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.mybook-share-container {
    max-width: 600px;
    margin: 0 auto;
}

/* 공유 버튼 */
.mybook-share-liked-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.mybook-share-liked-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.mybook-share-liked-btn:active {
    transform: translateY(0);
}

.mybook-share-liked-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.mybook-share-liked-btn i {
    font-size: 16px;
}

/* 알림 시스템 */
.mybook-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mybook-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* 알림 타입별 스타일 */
.mybook-notification-success {
    background: rgba(40, 167, 69, 0.95);
    color: white;
    border-left: 4px solid #28a745;
}

.mybook-notification-error {
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border-left: 4px solid #dc3545;
}

.mybook-notification-info {
    background: rgba(23, 162, 184, 0.95);
    color: white;
    border-left: 4px solid #17a2b8;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .mybook-shared-mode-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mybook-shared-info {
        justify-content: center;
    }
    
    .mybook-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .mybook-notification.show {
        transform: translateY(0);
    }
    
    .mybook-share-liked-btn {
        width: 100%;
        justify-content: center;
    }
}