/* ==============================================
   게시글 보기 페이지 전용 스타일 - 세련된 디자인
   ============================================== */

/* CSS 변수 정의 */
:root {
    /* 새로운 컬러 팔레트 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* 글래스모피즘 */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* 그림자 */
    --shadow-elegant: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-pressed: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 뷰 컨테이너 */
.view-container {
    flex: 1;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-elegant);
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    min-height: auto; /* 세로로 자유롭게 늘어나도록 */
}

/* 상단 네비게이션 바 */
.top-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-back-btn:hover {
    color: #5a67d8;
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-separator {
    color: #cbd5e0;
    font-weight: 300;
}

.nav-category {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-write-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 12px;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-write-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 하단 액션 바 */
.bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.action-left, .action-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-list {
    background: var(--info-gradient);
    color: white;
}

.btn-list:hover {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-write {
    background: var(--primary-gradient);
    color: white;
}

.btn-write:hover {
    background: linear-gradient(135deg, #5a67d8, #553c9a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.view-container.notice-post {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--primary-gradient) border-box;
    position: relative;
}

.view-container.notice-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 1;
}

/* 게시글 헤더 */
.post-header {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-elegant);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.post-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 25px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    word-break: break-word; /* 긴 제목도 자동 줄바꿈 */
}

/* 새로운 메타 정보 레이아웃 */
.post-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.post-meta-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.post-meta-item i {
    color: #667eea;
    font-size: 14px;
    width: 16px;
}

.message-btn {
    background: var(--info-gradient);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.message-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* 우측 뱃지들 */
.post-meta-right {
    display: flex;
    align-items: center;
}

.post-stats-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.stat-badge.views {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.stat-badge.likes {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.stat-badge.comments {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.stat-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 관리자 뱃지 */
.admin-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge.notice-active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.admin-badge.notice-inactive {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.admin-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* 게시글 내용 */
.post-content {
    padding: 50px;
    line-height: 1.8;
    font-size: 16px;
    color: #2d3748;
    word-break: break-word;
    min-height: auto; /* 자유롭게 세로 확장 */
    max-width: none; /* 가로 제한 없음 */
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.post-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: #1a202c;
    font-weight: 600;
}

/* 태그 */
.post-tags {
    padding: 25px 50px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-item {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tag-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

/* 첨부파일 - 새로운 디자인 */
.attachments {
    padding: 25px 50px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.attachments-header {
    margin-bottom: 20px;
}

.attachments-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.attachments-title i {
    color: #667eea;
    font-size: 20px;
}

.file-count-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.attachment-card:hover {
    border-color: #d0d7de;
}

.attachment-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 16px;
}

.attachment-meta {
    display: flex;
    gap: 8px;
}

.file-size-badge,
.file-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.file-size-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.file-type-badge {
    background: #f3e5f5;
    color: #7b1fa2;
}

.download-badge {
    background: #6c757d;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-badge:hover {
    background: #5a6268;
    text-decoration: none;
    color: white;
}

/* 게시글 액션 버튼 */
.post-actions {
    padding: 30px 50px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.action-left, .action-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn-like {
    background: #f8f9fa;
    color: #6c757d;
    border: 1.5px solid #e9ecef;
}

.btn-like:hover,
.btn-like.active {
    background: #fff5f5;
    color: #e53e3e;
    border-color: #fed7d7;
}

.btn-bookmark {
    background: #f8f9fa;
    color: #6c757d;
    border: 1.5px solid #e9ecef;
}

.btn-bookmark:hover,
.btn-bookmark.active {
    background: #fffbf0;
    color: #d69e2e;
    border-color: #feebc8;
}

.btn-report {
    background: #f8f9fa;
    color: #6c757d;
    border: 1.5px solid #e9ecef;
}

.btn-report:hover {
    background: #fef5e7;
    color: #dd6b20;
    border-color: #fbd38d;
}

/* 새로운 액션 버튼들 - 좌측 배치용 */
.btn-edit {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-login {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.btn-login:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* 사이드바 빠른 액션 버튼들 */
.list-btn {
    background: white !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--notebook-border) !important;
}

.list-btn:hover {
    background: #f8f9fa !important;
    border-color: var(--primary-color) !important;
}

.edit-btn {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6) !important;
    color: white !important;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}

.delete-btn {
    background: linear-gradient(135deg, #f87171, #ef4444) !important;
    color: white !important;
    border: none !important;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.login-btn {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    color: white !important;
}

.login-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* 댓글 헤더와 액션 버튼을 같은 라인에 배치 */
.comment-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 0;
}

.comment-header-with-actions .comment-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.comment-header-with-actions .comment-title i {
    font-size: 22px;
    color: #667eea;
}

.comment-header-with-actions .comment-count {
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 700;
}

.comment-header-with-actions .post-actions {
    padding: 0;
    border-top: none;
    background: none;
    margin: 0;
}

/* 댓글 섹션 */
.comment-section {
    background: white;
    border-top: 1px solid #e9ecef;
    min-height: auto; /* 댓글 수에 따라 자유롭게 확장 */
    text-indent: 0 !important; /* 들여쓰기 강제 방지 */
    text-align: left !important; /* 왼쪽 정렬 강제 */
}

/* 댓글 텍스트 들여쓰기 완전 방지 */
.comment-content,
.comment-content p,
.comment-content div {
    text-indent: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-align: left !important;
}

/* 모든 댓글 관련 요소에 들여쓰기 방지 */
.comment-item * {
    text-indent: 0 !important;
}

.comment-header {
    padding: 40px 50px 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.comment-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-title i {
    color: #667eea;
    font-size: 22px;
}

.comment-count {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

/* 댓글 목록 */
.comment-list {
    padding: 30px 50px;
    min-height: auto;
    max-height: 600px; /* 댓글 리스트 최대 높이 제한 */
    overflow-y: auto; /* 세로 스크롤 추가 */
    overflow-x: hidden; /* 가로 스크롤 숨김 */
    padding-right: 40px; /* 스크롤바 여백 */
    text-indent: 0; /* 들여쓰기 방지 */
    text-align: left; /* 왼쪽 정렬 */
}

/* 스크롤바 스타일링 */
.comment-list::-webkit-scrollbar {
    width: 8px;
}

.comment-list::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 10px;
    margin: 10px 0;
}

.comment-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c1c8e4, #a5b3d9);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.comment-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a5b3d9, #8fa1d4);
}

/* 댓글 리스트 스크롤 그라데이션 효과 */
.comment-list::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 1), rgba(248, 249, 250, 0));
    z-index: 1;
    pointer-events: none;
}

.comment-list::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(248, 249, 250, 1), rgba(248, 249, 250, 0));
    z-index: 1;
    pointer-events: none;
}

/* 댓글이 많을 때 스크롤 힌트 */
.comment-list.has-scroll {
    border-top: 2px solid #e9ecef;
    border-bottom: 2px solid #e9ecef;
}

/* 댓글 영역이 스크롤 가능할 때 표시 */
.comment-scroll-indicator {
    display: none;
    text-align: center;
    padding: 10px;
    color: #718096;
    font-size: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-scroll-indicator.active {
    display: block;
}

.comment-scroll-indicator i {
    margin-right: 5px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.comment-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 18px; /* 태블릿에서 패딩 조정 */
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-indent: 0; /* 들여쓰기 방지 */
    text-align: left; /* 왼쪽 정렬 확실히 */
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.comment-item.reply {
    margin-left: 25px;
    padding: 15px; /* 답글 패딩도 조정 */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
}

.comment-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 6px; /* 아이콘과 이름 사이 간격 줄임 */
}

.comment-date {
    font-size: 12px;
    color: #718096;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 10px;
}

.comment-content {
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 15px;
    overflow-wrap: break-word; /* word-break 대신 overflow-wrap 사용 */
    word-wrap: break-word; /* 구형 브라우저 호환성 */
    white-space: pre-wrap; /* 줄바꿈 유지 */
    padding: 0; /* 패딩 제거 */
    margin-left: 0; /* 왼쪽 마진 제거 */
    text-indent: 0; /* 들여쓰기 제거 */
    hyphens: none; /* 하이픈 자동 삽입 방지 */
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.comment-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 12px;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.comment-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-1px);
}

/* 댓글 작성 폼 - 완전히 새로운 디자인 */
.comment-form-modern {
    padding: 40px 50px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.user-avatar-comment {
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.comment-form-info {
    flex: 1;
}

.commenting-as {
    display: block;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 4px;
}

.current-user {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.comment-input-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.comment-input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.comment-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
    color: #2d3748;
    font-family: inherit;
    resize: vertical;
    min-height: 120px; /* 기본 높이 */
    max-height: 400px; /* 최대 높이 제한 */
    background: transparent;
    box-sizing: border-box;
}

.comment-textarea::placeholder {
    color: #a0aec0;
    line-height: 1.5;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.comment-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 13px;
}

.comment-tips i {
    color: #f6ad55;
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-cancel:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-submit {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 로그인 프롬프트 */
.comment-form-login {
    padding: 40px 50px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-prompt-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 35px;
}

.login-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.login-content p {
    color: #718096;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-button {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

/* 빈 상태 메시지 */
.empty-comments {
    text-align: center;
    padding: 60px 40px;
    color: #718096;
}

.empty-comments i {
    font-size: 60px;
    color: #e9ecef;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-comments p {
    font-size: 16px;
    margin: 0;
}

/* 모달 스타일 개선 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .post-header,
    .post-content,
    .post-tags,
    .attachments,
    .post-actions,
    .comment-header,
    .comment-list,
    .comment-form-modern,
    .comment-form-login {
        padding: 25px;
    }
    
    .comment-list {
        max-height: 450px; /* 태블릿에서 댓글 높이 감소 */
        padding-right: 30px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-stats-badges {
        justify-content: flex-start;
    }
    
    .comment-item.reply {
        margin-left: 25px;
    }
    
    .comment-item {
        padding: 18px; /* 태블릿에서 패딩 조정 */
    }
    
    .comment-item.reply {
        margin-left: 25px;
        padding: 15px; /* 답글 패딩도 조정 */
    }
    
    .attachment-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .comment-form-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .comment-actions {
        justify-content: center;
    }
    
    .reply-form-container {
        padding: 15px;
    }
    
    .reply-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .reply-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* 태블릿 상단 네비게이션 */
    .top-navigation {
        padding: 25px 30px;
    }

    .nav-back-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .nav-category {
        font-size: 14px;
    }

    .nav-write-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* 태블릿 하단 액션 바 */
    .bottom-actions {
        padding: 25px 30px;
    }

    .bottom-actions .action-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* 모바일 전용 최적화 - 공간 활용 극대화 */
    
    /* 모바일 상단 네비게이션 */
    .top-navigation {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-left {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    .nav-back-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .nav-separator {
        font-size: 12px;
    }

    .nav-category {
        font-size: 12px;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-right {
        align-self: flex-end;
        margin-top: -8px;
    }

    .nav-write-btn {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
    }

    /* 모바일 하단 액션 바 */
    .bottom-actions {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .action-left,
    .action-right {
        width: 100%;
        justify-content: center;
    }

    .action-left {
        order: 2;
    }

    .action-right {
        order: 1;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bottom-actions .action-btn {
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 8px;
        min-width: 80px;
        text-align: center;
    }

    .btn-list {
        width: 100%;
        justify-content: center;
    }
    
    .post-header {
        padding: 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }
    
    .post-content {
        padding: 15px;
        font-size: 15px; /* 14px → 15px (+1pt) */
        line-height: 1.6;
    }
    
    .post-tags,
    .attachments,
    .post-actions,
    .comment-header,
    .comment-form-modern,
    .comment-form-login {
        padding: 15px;
    }
    
    .comment-list {
        max-height: 400px; /* 모바일에서 댓글 영역 확보 */
        padding: 10px 15px;
    }
    
    /* 공지사항 뱃지 - 컴팩트한 뱃지 형태 */
    .notice-badge {
        padding: 4px 10px;
        font-size: 10px;
        margin-bottom: 8px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        max-width: fit-content;
        border-radius: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px; /* 최대 너비 제한으로 뱃지 형태 유지 */
    }
    
    /* 제목 - 3행 제한, 폰트 크기 증가 */
    .post-title {
        font-size: 17px; /* 16px → 17px (+1pt) */
        font-weight: 600;
        margin-bottom: 12px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: 4.05em; /* 3행 제한 (17px * 1.3 * 3) */
    }
    
    /* 메타 정보 - 1행 배치 */
    .post-meta-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .post-meta-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        font-size: 12px; /* 11px → 12px (+1pt) */
        max-width: 50%;
    }
    
    .post-meta-item {
        font-size: 12px; /* 11px → 12px (+1pt) */
        gap: 3px;
        white-space: nowrap;
        display: flex;
        align-items: center;
    }
    
    .post-meta-item i {
        font-size: 11px; /* 10px → 11px (+1pt) */
        width: 12px;
        flex-shrink: 0;
    }
    
    /* 닉네임과 날짜를 더 컴팩트하게 */
    .post-meta-item span {
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 날짜 형식 간소화 */
    .post-meta-item:nth-child(2) span {
        max-width: 80px;
    }
    
    /* 우측 뱃지들 - 1행 배치 */
    .post-meta-right {
        flex-shrink: 0;
    }
    
    .post-stats-badges {
        display: flex;
        align-items: center;
        gap: 3px;
        flex-wrap: nowrap;
    }
    
    /* 뱃지 크기 최적화, 폰트 크기 증가 */
    .stat-badge,
    .admin-badge {
        font-size: 10px; /* 9px → 10px (+1pt) */
        padding: 2px 5px;
        border-radius: 10px;
        white-space: nowrap;
    }
    
    .stat-badge i {
        font-size: 9px; /* 8px → 9px (+1pt) */
    }
    
    /* 메시지 버튼 모바일에서 숨김 */
    .message-btn {
        display: none;
    }
    
    /* 메타 정보를 한 줄로 더 컴팩트하게 */
    .post-meta-left .post-meta-item:first-child::after {
        content: "•";
        margin: 0 6px;
        color: #9ca3af;
        font-size: 10px;
    }
    
    /* 아이콘 간소화 */
    .post-meta-item i {
        display: none;
    }
    
    /* 닉네임과 날짜를 한 줄로 표시 */
    .post-meta-left {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 댓글 헤더 1행 정렬 - 모바일 최적화 */
    .comment-header-with-actions {
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .comment-header-with-actions .comment-title {
        font-size: 17px; /* 16px → 17px (+1pt) */
        gap: 6px;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .comment-header-with-actions .comment-title i {
        font-size: 17px; /* 16px → 17px (+1pt) */
    }
    
    .comment-header-with-actions .comment-count {
        padding: 3px 8px;
        font-size: 12px; /* 11px → 12px (+1pt) */
        border-radius: 10px;
    }
    
    .comment-header-with-actions .post-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .comment-header-with-actions .action-btn {
        padding: 6px 8px;
        font-size: 12px; /* 11px → 12px (+1pt) */
        border-radius: 12px;
        white-space: nowrap;
        min-width: auto;
    }
    
    .comment-header-with-actions .action-btn i {
        font-size: 11px; /* 10px → 11px (+1pt) */
        margin-right: 3px;
    }
    
    /* 좋아요 카운트 숨김 (공간 절약) */
    .comment-header-with-actions .like-count {
        display: none;
    }
    
    /* 댓글 영역 최적화 */
    .comment-item {
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .comment-item.reply {
        margin-left: 10px;
        padding: 8px;
    }
    
    .comment-header-info {
        margin-bottom: 8px;
    }
    
    .comment-author {
        font-size: 14px; /* 13px → 14px (+1pt) */
        font-weight: 600;
    }
    
    .comment-date {
        font-size: 12px; /* 11px → 12px (+1pt) */
    }
    
    .comment-content {
        font-size: 14px; /* 13px → 14px (+1pt) */
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .comment-actions {
        gap: 8px;
    }
    
    .comment-btn {
        padding: 4px 8px;
        font-size: 12px; /* 11px → 12px (+1pt) */
    }
    
    /* 답글 폼 최적화 */
    .reply-form-container {
        padding: 10px;
        margin-top: 10px;
    }
    
    .reply-textarea {
        min-height: 50px;
        padding: 10px;
        font-size: 14px; /* 13px → 14px (+1pt) */
    }
    
    .reply-buttons {
        gap: 8px;
        margin-top: 10px;
    }
    
    .reply-buttons .btn {
        padding: 6px 12px;
        font-size: 12px; /* 11px → 12px (+1pt) */
    }
    
    /* 액션 버튼 최적화, 폰트 크기 증가 */
    .action-btn {
        padding: 8px 12px;
        font-size: 12px; /* 11px → 12px (+1pt) */
    }
    
    .post-actions {
        gap: 8px;
    }
    
    /* 첨부파일 영역 최적화, 폰트 크기 증가 */
    .attachment-card {
        padding: 10px;
        font-size: 13px; /* 12px → 13px (+1pt) */
    }
    
    .attachment-name {
        font-size: 13px; /* 12px → 13px (+1pt) */
    }
    
    .attachment-meta {
        font-size: 11px; /* 10px → 11px (+1pt) */
    }
    
    /* 댓글 입력 폼 최적화 */
    .comment-form-modern {
        border-radius: 12px;
    }
    
    .comment-textarea {
        min-height: 60px;
        padding: 10px;
        font-size: 14px; /* 13px → 14px (+1pt) */
    }
    
    .comment-form-footer {
        padding: 10px 15px;
        gap: 8px;
    }
    
    .comment-tips {
        font-size: 12px; /* 11px → 12px (+1pt) */
    }
    
    .btn-cancel,
    .btn-submit {
        padding: 8px 16px;
        font-size: 13px; /* 12px → 13px (+1pt) */
    }
    
    /* 태그 영역 최적화, 폰트 크기 증가 */
    .tag-item {
        padding: 4px 8px;
        font-size: 11px; /* 10px → 11px (+1pt) */
    }
    
    /* 공지사항 뱃지 최적화, 폰트 크기 증가 */
    .notice-badge {
        padding: 5px 12px;
        font-size: 11px; /* 10px → 11px (+1pt) */
        margin-bottom: 10px;
    }
    
    /* 메시지 버튼 최적화 */
    .message-btn {
        padding: 3px 6px;
        font-size: 9px;
    }
}

/* view.php 전용 board-container 클래스 - 세로 길이 제한 없음 */
.view-board-container {
    flex: 1;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: visible; /* overflow 제한 제거 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: auto; /* 자동 높이 */
    max-height: none; /* 최대 높이 제한 완전 제거 */
    display: flex;
    flex-direction: column;
    min-height: auto; /* 최소 높이도 자동으로 */
}

/* 반응형에서도 세로 길이 제한 없음 */
@media (max-width: 768px) {
    .view-board-container {
        height: auto;
        max-height: none;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .view-board-container {
        height: auto;
        max-height: none;
        min-height: auto;
    }
}

/* 댓글 기능 개선을 위한 추가 스타일 */
.edit-comment-form .edit-textarea {
    transition: border-color 0.3s ease;
}

.edit-comment-form .edit-textarea:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.edit-buttons button {
    transition: all 0.3s ease;
    padding: 6px 12px !important; /* 인라인 스타일 오버라이드 */
    font-size: 12px !important;
    border-radius: 8px !important;
    font-weight: 500;
}

.edit-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.reply-form-container {
    animation: slideDown 0.3s ease-out;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 답글 텍스트 영역 스타일 */
.reply-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
    font-family: inherit;
    resize: vertical;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.reply-textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* 답글 버튼 컨테이너 */
.reply-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: flex-end;
}

/* 답글 버튼 스타일 */
.reply-buttons .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reply-buttons .btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.reply-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.reply-buttons .btn-secondary {
    background: #6c757d;
    color: white;
}

.reply-buttons .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.reply-buttons .btn:active {
    transform: translateY(0);
}

.reply-buttons .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-submit:disabled,
.btn-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.reply-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    background: white;
    transition: all 0.3s ease;
}
