/* 모바일 친화적인 게시판 스타일 */
.mobile-friendly {
    padding: 10px;
}

/* 라디오 버튼 스타일 개선 */
.form-check-inline {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.form-check-inline .form-check-input {
    margin-right: 0.5rem;
}

.form-check-inline .form-check-label {
    font-weight: 500;
    color: #495057;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* 모바일에서 라디오 버튼 최적화 */
@media (max-width: 576px) {
    .form-check-inline {
        display: block;
        margin-right: 0;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        background-color: #f8f9fa;
        border-radius: 0.375rem;
        border: 1px solid #dee2e6;
    }
    
    .form-check-inline:hover {
        background-color: #e9ecef;
    }
    
    .form-check-inline .form-check-input:checked + .form-check-label {
        color: #007bff;
        font-weight: 600;
    }
}

/* 게시글 목록 스타일 */
.post-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: #e3f2fd; /* 밝은 하늘색 배경 */
}

.post-item:hover {
    background-color: #bbdefb; /* 호버 시 조금 더 진한 하늘색 */
}

/* 클릭 가능한 게시글 아이템 스타일 */
a .post-item {
    cursor: pointer;
}

a .post-item:hover {
    background-color: #90caf9; /* 클릭 시 더 진한 하늘색 */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2); /* 파란색 그림자 */
}

a:hover .post-item h5 {
    color: #1565c0 !important; /* 진한 파란색 제목 */
}

/* 답글 스타일 */
.reply-item {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.reply-item.admin-reply {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
}

/* 비밀답글 잠금 해제 버튼 */
.unlock-reply-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .post-content {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .reply-item {
        margin-bottom: 10px;
        padding: 15px;
    }
    
    /* 터치 친화적인 버튼 크기 */
    .btn-sm {
        min-height: 44px;
        padding: 10px 15px;
    }
    
    /* 모바일에서 텍스트 영역 크기 조정 */
    textarea {
        min-height: 120px;
    }
    
    /* 네비게이션 바 모바일 최적화 */
    .navbar-brand {
        font-size: 18px;
    }
    
    .nav-link {
        padding: 10px 15px;
    }
}

/* 애니메이션 효과 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 로딩 상태 표시 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 게시글 내용 스타일 */
.post-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 페이지네이션 모바일 최적화 */
@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        padding: 8px 12px;
        margin: 2px;
        border-radius: 4px;
    }
}

/* 첨부파일 스타일 */
.attachment-input-group {
    transition: all 0.3s ease;
}

.attachment-input-group:hover {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.25rem;
}

.attachment-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #dee2e6;
}

.attachment-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

/* 첨부파일 버튼 스타일 */
.remove-attachment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#addAttachment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 파일 입력 필드 스타일 개선 */
.form-control[type="file"] {
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-control[type="file"]:hover:not(:disabled) {
    border-color: #007bff;
}

.form-control[type="file"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 답글 첨부파일 영역 스타일 */
.reply-content .bg-light {
    border-left: 4px solid #007bff;
}

.reply-content .attachment-image {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
