.view-wrap {
    max-width: 950px;
    /*margin: 60px auto 80px;*/
    padding: 0 12px;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 제목 */
.view-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 11px;
}

/* 정보 영역 */
.view-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
}
.view-info .bar {
    color: #bbb;
}

/* 본문 */
.view-content {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    min-height: 200px;
}

/* 버튼 영역 */
.view-buttons {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;   /* ⭐ 가운데 정렬 */
    gap: 8px;
}
.view-buttons button {
    padding: 7px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f8f8;
    font-size: 13px;
    cursor: pointer;
}
.view-buttons button:hover {
    background: #e9e9e9;
}
.btn-list {
    background-color: #4a90e2;
    color: #fff;
    border: 1px solid #4a90e2;
}
.btn-list:hover {
    background-color: #357ac8;
}

/******** 다크모드 ********/
body.dark-mode .view-title { color: #f5f5f5; }
body.dark-mode .view-info { color: #aaa; }
body.dark-mode .view-info .bar { color: #555; }
body.dark-mode .view-content {
    color: #ddd;
    border-color: #333;
}
body.dark-mode .view-files { color: #ccc; }
body.dark-mode .file-link { color: #6aa8ff; }
body.dark-mode .view-buttons button {
    background-color: #1f1f1f;
    border-color: #444;
    color: #ccc;
}
body.dark-mode .view-buttons button:hover {
    background-color: #2a2a2a;
}
body.dark-mode .btn-list {
    background-color: #357ac8;
    border-color: #357ac8;
}

/* 본문 내부 이미지 사이즈 제한 */
.view-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto; /* 선택: 중앙 정렬 + 위아래 여백 */
}

/* iframe 반응형 컨테이너 */
.view-content .iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    margin: 12px 0;
}

/* iframe 내부 */
.view-content .iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/*추천 비추천*/
.like-dislike-box {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    user-select: none;
}

.like-dislike-box div {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 추천 카운트 색 */
.like-count {
    color: #10a000;  /* 초록 */
    font-weight: 700;
}

/* 비추천 카운트 색 */
.dislike-count {
    color: #e60000; /* 빨강 */
    font-weight: 700;
}

/* 구분자 */
.divider {
    color: #999;
}

/* 클릭 이펙트 */
.like-area:active, .dislike-area:active {
    transform: scale(0.93);
}

/* 다크모드 */
body.dark-mode .divider {
    color: #666;
}
body.dark-mode .like-count {
    color: #1aff1a;
}
body.dark-mode .dislike-count {
    color: #ff4d4d;
}

/* PC 기본: 한 줄로 */
.view-info {
    display: inline-flex;    /* ⭐ 한 줄 유지 */
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    color: #666;
    font-size: 13px;
    flex-wrap: wrap;         /* 너무 길면 자동 줄 이동 */
}

.view-info .info-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* 모바일: 두 줄로 강제 */
@media (max-width: 768px) {

    .view-info {
        display: flex;              /* column 모드 */
        flex-direction: column;     /* ⭐ 두 줄로 분리 */
        align-items: flex-start;
        gap: 2px;
        font-size: 12px;
    }

    .view-info .info-line {
        display: flex;
        width: 100%;
        white-space: nowrap;
        gap: 4px;
    }

    .bar {
        margin: 0 2px;
    }
}

.view-buttons .btn-edit:hover {
    background-color: #e6f0ff !important;
    color: #333 !important;
    transition: 0.2s;
}

.view-buttons .btn-delete:hover {
    background-color: #ffe6e6 !important;
    color: #333 !important;
    transition: 0.2s;
}

/*공지사항용*/
.notice-view-badge {
    display: inline-block;
    background: #ffe8b6;
    color: #d35400;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 15px;
}

/*2025-11-17*/
/* ✅ 댓글 영역 전체 간격 */
.comment-wrap {
    margin-top: 30px;
}

/* ✅ 댓글 리스트 간격 */
.comment-list {
    margin-top: 15px;
}


/* 프로필 쪽 정렬 */
.comment-profile {
    flex-shrink: 0;
}

.comment-profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* 본문 영역이 꽉 차게 */
.comment-body {
    flex: 1;
}

/* 닉네임 / 날짜 한 줄 정렬 */
.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-header .nickname {
    font-weight: 600;
    font-size: 14px;
}

.comment-header .comment-date {
    font-size: 12px;
    color: #888;
}

/* 댓글 내용 */
.comment-content {
    font-size: 14px;
    margin: 4px 0 8px;
    white-space: pre-wrap;
}

/* 수정 / 삭제 / 답글 버튼 줄 */
.comment-actions {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.comment-actions span {
    cursor: pointer;
}

.comment-actions span:hover {
    text-decoration: underline;
}

/* ✅ 답글 입력 박스도 카드처럼 */
.reply-box {
    margin: 8px 0 10px 46px;  /* 프로필 이미지만큼 들여쓰기 */
    padding: 10px;
    /*border: 1px solid #e0e0e0;*/
    border-radius: 6px;
    /*background-color: #fafafa;*/
}

.reply-box textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    margin-bottom: 6px;
}

/* -------------------------------------- */
/* ✅ 다크모드 - 댓글 전체 영역 */
/* -------------------------------------- */
body.dark-mode .comment-wrap {
    color: #e5e5e5;
}

/* 대댓글 박스 */
body.dark-mode .comment-item.reply-item {
    background-color: #242424;
    /*border-color: #555;*/
}

/* 닉네임 */
body.dark-mode .comment-header .nickname {
    color: #f2f2f2;
}

/* 날짜 */
body.dark-mode .comment-header .comment-date {
    color: #bbbbbb;
}

/* 댓글 내용 */
body.dark-mode .comment-content {
    color: #e0e0e0;
}

/* 수정 / 삭제 / 답글 버튼 */
body.dark-mode .comment-actions span {
    color: #cccccc;
}

body.dark-mode .comment-actions span:hover {
    color: #fff;
    text-decoration: underline;
}

/* -------------------------------------- */
/* 답글 입력 박스 */
/* -------------------------------------- */

body.dark-mode .reply-box textarea {
    background: #111;
    color: #eee;
    border: 1px solid #444;
}

/* 댓글 입력 박스 */
body.dark-mode .comment-write-box textarea {
    background: #111;
    color: #eee;
    border: 1px solid #444;
}

body.dark-mode .btn-comment {
    background: #333;
    color: #f0f0f0;
    border: 1px solid #555;
}

body.dark-mode .btn-comment:hover {
    background: #444;
}

/* 프로필 이미지 훨씬 작게 */
.comment-profile-img {
    width: 22px; /* 기존 36px → 22px */
    height: 22px;
    border-radius: 50%;
}

/* 대댓글 */
.comment-item.reply-item {
    margin-left: 15px; /* 기존 30px → 18px */
    /*background-color: #fafafa;*/
}

/* 닉네임 / 날짜 */
.comment-header {
    gap: 6px;
    margin-bottom: 2px;
}
.comment-header .nickname {
    font-size: 12px; /* 기존 14px → 12px */
}
.comment-header .comment-date {
    font-size: 10px; /* 기존 12px → 10px */
    color: #999;
}

/* 댓글 내용 */
.comment-content {
    font-size: 12px; /* 기존 14px → 12px */
    margin: 2px 0 5px;
    line-height: 1.4;
}

/* 수정/삭제/답글 버튼 */
.comment-actions {
    font-size: 10.5px; /* 기존 12px → 10.5px */
    gap: 6px;
}

/* 답글 입력창 */
.reply-box {
    margin: 5px 0 6px 28px;
    padding: 6px;
}
.reply-box textarea {
    min-height: 40px;
    font-size: 12px;
}

.comment-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    margin-bottom: 0;               /* 아래 여백 제거 (밑줄로만 구분) */
    border: none;                   /* 전체 테두리 제거 */
    border-bottom: 1px solid #e0e0e0; /* ✅ 밑줄만 유지 */
    background-color: transparent;  /* 흰 배경 제거로 자연스러움 */
}


/* ✅ 모바일일 때 댓글 더 작게 */
@media (max-width: 768px) {
    .comment-item {
        padding: 3px 6px;         /* 내부 여백 줄이기 */
        gap: 5px;
        margin-bottom: 5px;
    }

    .comment-profile-img {
        width: 18px;              /* 프로필 이미지 더 작게 */
        height: 18px;
    }

    .comment-header .nickname {
        font-size: 11px;          /* 폰트 전체 축소 */
    }

    .comment-header .comment-date {
        font-size: 9px;
    }

    .comment-content {
        font-size: 11px;
        line-height: 1.35;        /* 줄 간격도 살짝 줄임 */
    }

    .comment-actions {
        font-size: 9.5px;
        gap: 5px;
    }

    .reply-box {
        margin: 4px 0 6px 24px;   /* 들여쓰기 줄임 */
        padding: 5px;
    }

    .reply-box textarea {
        min-height: 36px;
        font-size: 11px;
    }
}
/* ✅ 대댓글 앞에 'ㄴ' 표시 추가 */
.comment-item.reply-item::before {
    content: "";
    display: inline-block;
    width: 14px;                /* 이미지 크기 직접 지정 */
    height: 14px;
    margin-right: 4px;
    background-image: url("/img/답글.png");
    background-size: contain;   /* 이미지 비율 유지 */
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(-1px); /* 세로 위치 보정 */
    vertical-align: middle;
    opacity: 0.85;              /* 살짝 투명하게 (자연스러움) */
}

body.dark-mode .comment-item.reply-item::before {
    filter: brightness(0) invert(1);
}
.comment-header {
    position: relative;        /* 날짜를 절대 위치시킬 기준 */
    /*display: flex;*/
    /*align-items: center;*/
    /*gap: 6px;*/
    /*margin-bottom: 2px;*/
}
.comment-header .comment-date {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    color: #888;
}

/*댓글수정용*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-family: 'Noto Sans KR', sans-serif;
}

.modal h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal textarea {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-buttons button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#btnSaveEdit {
    background-color: #4a90e2;
    color: #fff;
}
#btnSaveEdit:hover {
    background-color: #357ac8;
}
#btnCancelEdit {
    background-color: #ddd;
}
/* 🌙 다크모드 지원 */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal {
    background: #2a2a2a;
    color: #f1f1f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body.dark-mode .modal textarea {
    background: #1e1e1e;
    border: 1px solid #555;
    color: #f1f1f1;
}

body.dark-mode .modal textarea::placeholder {
    color: #aaa;
}

body.dark-mode .modal-buttons button {
    color: #f1f1f1;
}

body.dark-mode #btnSaveEdit {
    background-color: #3b82f6;
}

body.dark-mode #btnSaveEdit:hover {
    background-color: #2563eb;
}

body.dark-mode #btnCancelEdit {
    background-color: #444;
}

body.dark-mode #btnCancelEdit:hover {
    background-color: #555;
}

/*임티*/
.comment-write-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.comment-write-box textarea {
    /*width: 100%;*/
    min-height: 35px;
    resize: vertical;
    margin-bottom: 5px;
}

/* 🔹 개미티콘 버튼 */
.ant-emoji-toggle {
    font-size: 12px;
    color: #888;
    margin-top: -3px;
    align-self: flex-end;
    cursor: pointer;
}
.ant-emoji-toggle:hover {
    color: #4a90e2;
}

/* 🔹 개미티콘 패널 (댓글창 바로 밑에) */
.ant-emoji-panel {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    /*margin-top: 6px;*/
    width: 97%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ant-emoji-panel img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: transform 0.15s;
}
.ant-emoji-panel img:hover {
    transform: scale(1.2);
}

.no-emoji {
    font-size: 12px;
    color: #999;
}

/* 다크모드 */
body.dark-mode .ant-emoji-panel {
    background: #1e1e1e;
    border-color: #444;
}
body.dark-mode .ant-emoji-toggle {
    color: #aaa;
}
body.dark-mode .ant-emoji-toggle:hover {
    color: #6aa8ff;
}

/* ✅ 개미티콘 관련 영역 다크모드 */
body.dark-mode .no-emoji {
    background-color: #1e1e1e;
    color: #ccc;
}

body.dark-mode .ant-emoji-toggle {
    background-color: #2a2a2a;
    color: #eee;
}

body.dark-mode .ant-emoji-toggle:hover {
    background-color: #3a3a3a;
    color: #fff;
}

/*팝업*/
.user-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: none;
    width: 130px;
    font-size: 13px;
    z-index: 99999;
}
.user-menu ul {
    list-style: none;
    margin: 0;
    padding: 5px 0;
}
.user-menu li {
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.user-menu li:hover {
    background-color: #f2f2f2;
}
body.dark-mode .user-menu {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .user-menu li:hover {
    background-color: #333;
}

/*팝업*/
.user-menu {
    position: fixed; /* ✅ 화면 기준으로 고정 */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: none;
    z-index: 2000;
}

.user-menu ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.user-menu li {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
}

.user-menu li:hover {
    background: #f0f0f0;
}
[data-userid] {
    cursor: pointer;
}

body.dark-mode .user-menu {
    background: #2b2b2b;
    border: 1px solid #444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

body.dark-mode .user-menu li {
    color: #f5f5f5;
}

body.dark-mode .user-menu li:hover {
    background: #3a3a3a;
}

.user-menu {
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.user-menu li {
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}
