/* view_item_style.css - 게시글 상세보기 스타일 */

.view-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    max-width: 1000px;
    margin: 30px auto;
    text-align: left;

}
.post-header h1 {
    font-size: 28px;
    margin: 0 0 10px 0;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    color: #606770;
    font-size: 14px;
}
.post-meta .author, .post-meta .details {
    display: flex;
    align-items: center;
}
.post-meta span {
    margin-right: 15px;
}
.post-meta .status-badge-current {
    margin-left: -5px;
    vertical-align: middle;
    padding: 4px 10px;
}

/* 작성자 액션 버튼 (상태 변경) */
.author-actions {
    background-color: #fff9f2;
    border: 1px solid #ffe8d6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}
.author-actions .label {
    font-weight: 600;
    color: #333;
}
.status-badge-current {
    padding: 6px 12px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    font-size: 14px;
}
.status-판매중 { background-color: #28a745; }
.status-예약중 { background-color: #ff9f43; }
.status-판매완료 { background-color: #6c757d; }

.status-change-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-status-change {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-status-change:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}
.for-sale { background-color: #28a745; }
.in-progress { background-color: #ff9f43; }
.sold-no-rating { background-color: #6c757d; }
.sold-with-rating { background-color: #ff7e36; }

/* 추천하기 버튼 섹션 */
.recommend-section {
    text-align: center;
    margin: 1px 0;
    padding: 1px 0;
    border-top: 0px solid #eee;
    border-bottom: 0px solid #eee;
}
.btn-recommend {
    padding: 10px 25px;
}

.post-body {
    padding: 20px 0;
    min-height: 200px;
    line-height: 1.8;
    font-size: 16px;
    border-bottom: 1px solid #dddfe2;
    margin-bottom: 30px;
}
.post-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.post-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 15px 0;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.price-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.price-value {
    font-size: 26px;
    font-weight: 700;
    color: #ff7e36;
}

/* 약품 정보 섹션 스타일 - 컴팩트 버전 */
.medicine-info-section {
    background: #ffffff;
    border: 2px solid #ff7e36;
    border-radius: 8px;
    padding: 0;
    margin: 15px 0;
    overflow: hidden;
}

.medicine-info-header {
    background: linear-gradient(135deg, #ff7e36 0%, #ff9854 100%);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.medicine-icon {
    font-size: 16px;
}

.medicine-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.medicine-info-content {
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 약품 이미지 썸네일 */
.medicine-image-container {
    flex-shrink: 0;
}

.medicine-image-thumbnail {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.medicine-image-thumbnail:hover {
    transform: scale(1.05);
    border-color: #ff7e36;
    box-shadow: 0 4px 12px rgba(255, 126, 54, 0.2);
}

.image-zoom-hint {
    font-size: 9px;
    color: #6b7280;
    margin-top: 3px;
    text-align: center;
}

/* 약품 정보 - 인라인 스타일 */
.medicine-details-grid {
    flex: 1;
}

.medicine-info-card {
    margin-bottom: 0;
}

.medicine-card-label {
    display: none;
}

.medicine-card-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    line-height: 1.8;
    margin-bottom: 4px;
}

.medicine-card-value:last-child {
    margin-bottom: 0;
}

.medicine-size-grid {
    display: inline;
}

.size-item {
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

.size-item:not(:last-child)::after {
    content: " | ";
    color: #999;
}

.size-item strong {
    color: #4f46e5;
    font-weight: 700;
}

.medicine-code {
    font-family: 'Courier New', monospace;
    color: #4f46e5;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 약품 이미지 확대 모달 */
.medicine-modal {
    display: none;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.medicine-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.medicine-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.medicine-modal-close:hover,
.medicine-modal-close:focus {
    color: #bbb;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.button-group {
    text-align: center;
    margin-top: 30px;
}
.button-group a, .button-group button {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin: 0 5px;
    cursor: pointer;
}
.btn-list {
    background-color: #fff5ee;
    color: #d96824;
    border: 1px solid #ffe8d6;
}
.btn-edit {
    background-color: #e66a26;
    color: white;
    border: none;
}
.btn-delete {
    background-color: #cc5500;
    color: white;
    border: none;
}
.btn-comment {
    background-color: #ff7e36;
    color: white;
    border: none;
}
.btn-message {
    background-color: #ff9f43;
    color: white;
    border: none;
}
.btn-report {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 댓글 영역 래퍼 */
.comment-area-wrapper {
    margin-top: 5px;
    padding: 10px 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #f8f9fa;
}
.comment-area-wrapper h2 {
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
/* 댓글 폼 */

.comment-input-wrapper textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    min-height: 80px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 500;
    color: #1c1e21;
    transition: border-color 0.2s ease-in-out;
}
.comment-input-wrapper textarea:focus {
    outline: none;
    border-color: #ff7e36;
}
.comment-input-wrapper button {
    flex-shrink: 0;
    width: 100px;
    background-color: #ff7e36;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}
/* 댓글 목록 */
.comment-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}
.comment-item {
    background-color: #ffffff;
    padding: 8px 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}
.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #606770;
    margin-bottom: 5px;
}
.comment-author {
    font-weight: 700;
    color: #333;
    margin-right: 8px;
}
.reply-icon {
    color: #666;
    font-size: 14px;
    margin-right: 4px;
    font-weight: normal;
}
.comment-content-wrapper {
    padding: 5px 0;
}
.comment-text {
    margin: 0;
    line-height: 1.7;
}
.comment-actions {
    font-size: 13px;
}
.comment-actions button, .comment-actions a {
    background: none;
    border: none;
    color: #1877f2;
    cursor: pointer;
    font-size: 13px;
    padding: 0 5px;
    text-decoration: none;
}
.no-comments {
    text-align: center;
    color: #606770;

}
/* 댓글 페이지네이션 스타일 */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.pagination .page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    text-decoration: none;
    color: #606770;
    background-color: #fff;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}
.pagination .page-link.active {
    background-color: #ff7e36;
    color: white;
    border-color: #ff7e36;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.pagination .page-link:hover:not(.active) {
    border-color: #ff7e36;
    color: #ff7e36;
}
.comment-pagination {
    margin-top: 20px;
}

/* --- 쪽지 보기 페이지 스타일 --- */
.view-message-container {
    max-width: 800px;
    margin: 30px auto;
}
.message-header {
    border-bottom: 1px solid #dddfe2;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.message-header h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
}
.message-meta {
    color: #606770;
    font-size: 14px;
    line-height: 1.6;
}
.message-content {
    padding: 20px 0;
    min-height: 150px;
    line-height: 1.8;
}
.view-message-container .button-group a, 
.view-message-container .button-group button {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin: 0 5px;
    cursor: pointer;
    border: none;
}
.view-message-container .btn-list {
    background-color: #6c757d;
    color: white;
}
.view-message-container .btn-reply {
    background-color: #ff7e36;
    color: white;
}
.view-message-container .btn-delete {
    background-color: #e66a26;
    color: white;
}
.view-message-container .btn-report {
    background-color: #ffc107;
    color: #212529;
}

/* --- 반응형 디자인 (모바일 767px 이하) --- */
@media (max-width: 767px) {
    .view-container {
        padding: 20px 15px;
        margin: 15px auto;
    }

    .post-header h1 {
        font-size: 22px;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .author-actions {
        padding: 10px;
    }

    .post-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .price-value {
        font-size: 22px;
    }

    /* 모바일 약품 정보 스타일 */
    .medicine-info-section {
        margin: 12px 0;
        border-radius: 8px;
    }

    .medicine-info-header {
        padding: 8px 12px;
    }

    .medicine-icon {
        font-size: 14px;
    }

    .medicine-info-title {
        font-size: 12px;
    }

    .medicine-info-content {
        padding: 12px;
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .medicine-image-container {
        flex-shrink: 0;
    }

    .medicine-image-thumbnail {
        width: 60px;
        height: 60px;
    }

    .image-zoom-hint {
        font-size: 8px;
        margin-top: 2px;
    }

    .medicine-details-grid {
        flex: 1;
    }

    .medicine-card-value {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 3px;
    }

    .size-item {
        font-size: 11px;
    }

    .medicine-modal-close {
        top: 10px;
        right: 20px;
        font-size: 35px;
    }

    .medicine-modal-content {
        max-width: 95%;
        max-height: 85%;
    }

    .post-body {
        font-size: 15px;
        min-height: 150px;
    }

    .button-group {
        display: grid;
        grid-auto-flow: column;
        gap: 10px;
    }

    .button-group a, .button-group button {
        padding: 12px 5px;
        font-size: 15px;
        margin: 0;
    }

    .button-group .btn-list {
        background-color: #6c757d;
        color: white;
        border: none;
    }

    .button-group .btn-message {
        background-color: #007bff;
        color: white;
        border: none;
    }

    .button-group .btn-edit {
        background-color: #ff7e36;
        color: white;
        border: none;
    }

    .button-group .btn-delete {
        background-color: #e66a26;
        color: white;
        border: none;
    }

    .button-group .btn-report {
        background-color: #dc3545;
        color: white;
        border: none;
    }

    .comment-pagination {
        margin-top: 15px;
    }

    .comment-form {
        margin-top: 0;
    }

    .reply-form {
        margin-top: 15px;
        padding: 12px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        display: none !important;
    }

    .reply-form.show {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }

    .reply-form textarea {
        width: 100%;
        min-height: 70px;
        padding: 12px;
        border: 1px solid #ced4da;
        border-radius: 8px;
        font-size: 14px;
        resize: vertical;
        box-sizing: border-box;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
        background: #ffffff;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .reply-form textarea:focus {
        outline: none;
        border-color: #ff7e36;
        box-shadow: 0 0 0 2px rgba(255, 126, 54, 0.1);
    }

    .reply-form textarea::placeholder {
        color: #6c757d;
        font-style: italic;
    }

    .reply-form button {
        padding: 10px 18px;
        background: linear-gradient(135deg, #ff7e36 0%, #ff9f5a 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
        box-shadow: 0 2px 4px rgba(255, 126, 54, 0.2);
    }

    .reply-form button:hover {
        background: linear-gradient(135deg, #e66a2b 0%, #ff8c42 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(255, 126, 54, 0.3);
    }

    .reply-form button:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(255, 126, 54, 0.2);
    }

    /* 모바일 댓글 입력창 - 수직 정렬 */
    .comment-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .comment-input-wrapper textarea {
        min-height: 80px;
        padding-right: 10px;
    }

    .comment-input-wrapper button {
        width: 100px;
        padding: 12px 0;
        height: auto;
        position: static;
    }

    /* --- 쪽지 보기 페이지 반응형 --- */
    .view-message-container {
        padding: 20px 15px;
        box-sizing: border-box;
        margin: 15px auto;
    }

    .message-header h1 {
        font-size: 20px;
    }

    .message-content {
        font-size: 15px;
        min-height: 120px;
    }

    .view-message-container .button-group {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- 데스크톱 전용 스타일 (768px 이상) --- */
@media (min-width: 768px) {
    body.view-item .main-container {
        flex: 1;
        width: calc(100% - 284px);
        padding: 20px;
        margin: 0;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    body.view-item .post-header {
        padding: 0 0 16px 0;
        border-bottom: 2px solid #f0f0f0;
        margin-bottom: 16px;
    }

    body.view-item .post-header h1 {
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 12px 0;
        line-height: 1.4;
    }

    body.view-item .status-badge {
        font-size: 12px;
        padding: 4px 10px;
        margin-right: 8px;
        display: inline-block;
        vertical-align: middle;
    }

    body.view-item .post-meta {
        display: flex;
        gap: 20px;
        font-size: 14px;
        color: #666;
        margin-bottom: 12px;
    }

    body.view-item .post-body {
        padding: 20px 0;
        font-size: 16px;
        line-height: 1.8;
    }

    body.view-item .price-block {
        padding: 16px;
        margin: 16px 0;
        background: #f9f9f9;
        border-left: 4px solid #ff7e36;
        border-radius: 4px;
    }

    body.view-item .image-gallery {
        margin: 20px 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    body.view-item .image-gallery img {
        width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: contain;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
    }

    body.view-item .post-actions {
        display: flex;
        gap: 12px;
        padding: 20px 0;
        border-top: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
        margin: 20px 0;
    }

    body.view-item .post-footer-actions {
        margin-top: 20px;
        padding-top: 16px;
        border-top: 1px solid #f0f0f0;
        display: flex;
        gap: 12px;
        justify-content: flex-end;
    }

    body.view-item .comments-section {
        margin-top: 40px;
        padding-top: 20px;
        border-top: 2px solid #f0f0f0;
    }

    body.view-item .comments-section h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 0 0 20px 0;
    }

    body.view-item .reply-form {
        margin-top: 0px;
        padding: 16px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        display: none !important;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }

    body.view-item .reply-form.show {
        display: block !important;
    }

    body.view-item .reply-form.show .reply-input-wrapper {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 0px;
        width: 100%;
    }

    body.view-item .reply-form.show .reply-input-wrapper textarea {
        flex: 1 !important;
        min-width: 400px !important;
        width: 100% !important;
        min-height: 60px;
        font-size: 14px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        resize: vertical;
        margin-bottom: 0;
        box-sizing: border-box;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Segoe UI', Roboto, sans-serif;
        line-height: 1.5;
    }

    body.view-item .reply-form.show .reply-input-wrapper textarea:focus {
        outline: none;
        border-color: #ff7e36;
        box-shadow: 0 0 0 2px rgba(255, 126, 54, 0.1);
    }

    body.view-item .reply-form.show .reply-input-wrapper textarea::placeholder {
        color: #6c757d;
        font-style: normal;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Segoe UI', Roboto, sans-serif;
    }

    body.view-item .reply-form.show .reply-input-wrapper button {
        padding: 12px 20px;
        background: linear-gradient(135deg, #ff7e36 0%, #ff9f5a 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Segoe UI', Roboto, sans-serif;
        box-shadow: 0 2px 4px rgba(255, 126, 54, 0.2);
        align-self: stretch;
        white-space: nowrap;
        min-width: 80px;
        margin-left: 0;
    }

    body.view-item .reply-form.show .reply-input-wrapper button:hover {
        background: linear-gradient(135deg, #e66a2b 0%, #ff8c42 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(255, 126, 54, 0.3);
    }

    body.view-item .reply-form.show .reply-input-wrapper button:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(255, 126, 54, 0.2);
    }

    body.view-item .comment-input-wrapper {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 0px;
        width: 100%;
    }

    body.view-item .comment-input-wrapper textarea {
        width: 100%;
        min-height: 60px;
        font-size: 14px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        resize: vertical;
        margin-bottom: 0;
        box-sizing: border-box;
    }

    body.view-item .comment-input-wrapper .btn-comment,
    body.view-item .comment-form button {
        width: 100px;
        padding: 12px 0;
        font-size: 14px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        float: none;
        margin-left: 0;
        margin-bottom: 0;
        align-self: stretch;
    }

    body.view-item .comment {
        padding: 16px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    body.view-item .comment:last-child {
        border-bottom: none;
    }

    body.view-item .comment-pagination {
        margin-top: 24px;
        text-align: center;
    }

    body.view-item .comment-pagination a {
        padding: 8px 12px;
        margin: 0 4px;
        background: #f0f0f0;
        border-radius: 4px;
        text-decoration: none;
        color: #333;
        font-size: 14px;
    }

    body.view-item .comment-pagination a:hover,
    body.view-item .comment-pagination a.active {
        background: #ff7e36;
        color: white;
    }

    body.view-item table {
        width: 100%;
        border-collapse: collapse;
        margin: 16px 0;
    }

    body.view-item table th,
    body.view-item table td {
        border: 1px solid #e0e0e0;
        padding: 12px;
        text-align: left;
    }

    body.view-item table th {
        background: #f5f5f5;
        font-weight: 600;
    }
}

/* --- 모바일에서 불필요한 요소 숨김 --- */
@media (max-width: 767px) {
    .reply-icon {
        display: none;
    }

    /* --- 모바일 댓글 창 디자인 개선 --- */
    .comment-area-wrapper {
        padding: 15px;
        margin: 15px 0;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .comment-area-wrapper h2 {
        font-size: 18px;
        margin-bottom: 15px;
        color: #333;
        font-weight: 600;
    }

    .comment-input-wrapper {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .comment-input-wrapper textarea {
        min-height: 80px;
        padding: 14px;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        font-size: 16px; /* iOS 줌 방지 */
        line-height: 1.4;
        resize: vertical;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
        background: #ffffff;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .comment-input-wrapper textarea:focus {
        outline: none;
        border-color: #ff7e36;
        box-shadow: 0 0 0 3px rgba(255, 126, 54, 0.1);
    }

    .comment-input-wrapper .btn-comment {
        align-self: flex-end;
        padding: 12px 24px;
        background: linear-gradient(135deg, #ff7e36 0%, #e66a26 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        min-height: 44px; /* 터치 친화적 크기 */
    }

    .comment-input-wrapper .btn-comment:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 126, 54, 0.3);
    }

    .comment-input-wrapper .btn-comment:active {
        transform: translateY(0);
    }

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

    .comment-item {
        padding: 8px;
        margin-bottom: 12px;
        background: #f8f9fa;
        border-radius: 10px;
        border-left: 0px solid #ff7e36;
        position: relative;
    }

    .comment-item.reply {
        margin-left: 20px;
        background: #ffffff;
        border-left-color: #6c757d;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }


    .comment-author {
        font-weight: 600;
        color: #333;
        font-size: 15px;
    }

    .comment-meta span {
        color: #6c757d;
        font-size: 13px;
    }

    .comment-text {
        color: #333;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .comment-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .comment-actions button, .comment-actions a {
        padding: 6px 12px;
        font-size: 13px;
        border: 1px solid #dee2e6;
        background: #ffffff;
        color: #495057;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .comment-actions button:hover, .comment-actions a:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .comment-actions .btn-edit-comment {
        background: #fff3cd;
        border-color: #ffeaa7;
        color: #856404;
    }

    .comment-actions .btn-reply-toggle {
        background: #d1ecf1;
        border-color: #bee5eb;
        color: #0c5460;
    }

    .reply-form {
        margin-top: 12px;
        padding: 14px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        display: none;
    }

    .reply-form.show {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .reply-form textarea {
        min-height: 70px;
        padding: 12px;
        border: 2px solid #ced4da;
        border-radius: 8px;
        font-size: 16px;
        resize: vertical;
        font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
        background: #ffffff;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .reply-form textarea:focus {
        outline: none;
        border-color: #ff7e36;
        box-shadow: 0 0 0 2px rgba(255, 126, 54, 0.1);
    }

    .reply-form button {
        align-self: flex-end;
        padding: 10px 20px;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.2s;
        min-height: 40px;
    }

    .reply-form button:hover {
        transform: translateY(-1px);
    }

    .reply-form button:active {
        transform: translateY(0);
    }

    .no-comments {
        text-align: center;
        padding: 30px 20px;
        color: #6c757d;
        font-style: italic;
        background: #f8f9fa;
        border-radius: 10px;
        margin: 20px 0;
    }

    .comment-pagination {
        margin-top: 20px;
        text-align: center;
    }

    .comment-pagination .page-link {
        padding: 8px 12px;
        margin: 0 2px;
        border: 1px solid #dee2e6;
        background: #ffffff;
        color: #495057;
        text-decoration: none;
        border-radius: 6px;
        transition: all 0.2s;
        min-width: 36px;
        display: inline-block;
        text-align: center;
        line-height: 1.2;
    }

    .comment-pagination .page-link:hover,
    .comment-pagination .page-link.active {
        background: #ff7e36;
        color: white;
        border-color: #ff7e36;
    }
}

/* 뒤로가기 버튼 */
.mobile-back-button {
    position: fixed;
    top: 75%; /* 화면 아래에서 25% 지점 */
    left: 10px; /* 햄버거 버튼과 같은 가로 위치 */
    z-index: 1001;
    background: linear-gradient(135deg, #ff7e36 0%, #e66a26 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 126, 54, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
}

.mobile-back-button:active {
    transform: scale(0.95);
}