/**
 * 오빠두 보드 - 토스 스타일 CSS
 * 깔끔하고 모던한 디자인
 */


/* ================================
   1. CSS 변수 및 기본 설정
   ================================ */
:root {
    /* 색상 */
    --primary-blue: #0066FF;
    --primary-green: #00C896;
    --excel-green: #217346;
    --danger-red: #FF6B6B;
    --danger-red-hover: #FF5252;
    
    /* 텍스트 */
    --text-primary: #191F28;
    --text-secondary: #6B7684;
    
    /* 배경 및 테두리 */
    --border-color: #E5E8EB;
    --bg-gray: #F7F8FA;
    --white: #FFFFFF;
    
    /* 효과 */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-small: 8px;
    --radius-tiny: 6px;
    
    /* 애니메이션 */
    --transition: all 0.2s ease;
    
    /* 간격 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 40px;
}

/* ================================
   2. 레이아웃 및 컨테이너
   ================================ */
.oppadu-board-container {
    width: 100%;
    max-width: 1120px;
    margin: var(--spacing-xl) auto;
    padding: 0px;
}

/* 게시판 헤더 */
.board-header {
    padding: var(--spacing-2xl);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--white) 100%);
}

.board-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.board-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* ================================
   3. 공통 버튼 스타일
   ================================ */
/* 기본 버튼 */
.board-content .btn,
.board-content .btn-search,
.board-content .btn-write,
.board-content .btn-submit,
.btn-cancel,
.btn-submit-reply,
.btn-cancel-reply,
.btn-save,
.comment-submit,
.comment-edit-actions button,
.edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-small);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

/* 작은 버튼 */
.btn-small,
.btn-save,
.btn-cancel,
.btn-reply,
.btn-delete {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: var(--radius-tiny);
}

/* 버튼 색상 변형 */
.btn-primary,
.btn-search,
.btn-submit,
.comment-submit,
.btn-submit-reply,
.btn-save {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover,
.btn-search:hover,
.btn-submit:hover,
.comment-submit:hover,
.btn-submit-reply:hover,
.btn-save:hover {
    background: #0052CC !important;
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-search:active,
.btn-submit:active,
.comment-submit:active,
.btn-submit-reply:active,
.btn-save:active {
    background: #0052CC !important;
    transform: translateY(-1px);
}

.btn-success,
.write-btn {
    background: var(--excel-green);
    color: var(--white);
    border-color: var(--excel-green);
}

.btn-write {
    background: #eafaf2 !important;
    color: #2b7650 !important;
    cursor: pointer;
    border: 1px solid #e4ebf4 !important;
}

.btn-write:hover {
    background: #e5f6ee;
    color: #1A5A38;
}

.btn-success:hover,
.write-btn:hover {
    background: #1A5A38;
    transform: translateY(-1px);
    color: #fff;
}

.btn-danger,
.delete-btn,
.btn-remove-attachment {
    background: var(--danger-red);
    color: var(--white);
    border-color: var(--danger-red);
}

.btn-danger:hover,
.delete-btn:hover,
.btn-remove-attachment:hover {
    background: var(--danger-red-hover);
}

.btn-secondary,
.btn-cancel,
.btn-cancel-reply,
.edit-btn {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover,
.btn-cancel:hover,
.btn-cancel-reply:hover,
.edit-btn:hover {
    background: var(--bg-gray);
    transform: translateY(-1px);
    color: inherit;
}

/* 텍스트 버튼 */
.btn-text,
.btn-action,
.btn-reply,
.btn-delete {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: normal;
}

.btn-text:hover,
.btn-action:hover {
    color: var(--text-primary);
    border-color: var(--primary-blue);
}

.btn-comment {
    font-weight: 600;
    color: #8795a8;
    cursor: pointer;
}

/* 더보기 버튼 */
.btn-more {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
}

.btn-more:hover,
.btn-more:focus {
    color: var(--text-primary);
    background-color: inherit;
}

/* ================================
   4. 폼 요소
   ================================ */
.form-input,
.form-select,
.form-textarea,
.search-input,
.category-select,
input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.search-input:focus,
.category-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-textarea {
    min-height: 300px;
}

/* ================================
   5. 게시판 컨트롤
   ================================ */

/* 상단 컨트롤 */
.board-controls-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 카테고리 선택 */
.category-select-modern {
    padding: 8px 16px;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.category-select-modern:hover {
    border-color: #c8ccd2;
}

/* 글쓰기 버튼 */
.btn-write-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #00a86b;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-write-modern:hover {
    background: #008f5b;
    transform: translateY(-1px);
}

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

/* 전체 게시판 배지 */
.all-boards-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f7f8fa;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7684;
}

/* 목록 헤더 */
.list-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #f1f3f5;
    font-size: 13px;
    color: #868e96;
    font-weight: 500;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    gap: 1.5rem;
}

.header-item {
    min-width: 30px;
    text-align: center;
}

.header-item.date {
    width: 80px;
}

/* 게시글 목록 */
.post-list-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* 게시글 아이템 */
.post-item-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.2s;
    cursor: pointer;
}

.post-item-modern:hover {
    background: #fafbfc;
}

.post-item-modern:last-child {
    border-bottom: none;
}

/* 왼쪽 영역 */
.post-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-right: 2.5rem;
}

/* 카테고리 라벨 */
.category-label {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 48px;
}

/* 카테고리별 색상 */
.category-column { background: #e7f5ff; color: #1971c2; }
.category-hospital { background: #fff0f6; color: #e64980; }
.category-info { background: #f3f0ff; color: #7048e8; }
.category-cafe { background: #fff5f5; color: #fa5252; }
.category-instagram { background: #f8f0fc; color: #da77f2; }
.category-blog { background: #e6fcf5; color: #0ca678; }
.category-general { background: #f8f9fa; color: #495057; }
.category-question { background: #fff8dc; color: #f08c00; }
.category-notice { background: #ffe8e8; color: #e03131; }
.category-free { background: #e8f5e9; color: #2e7d32; }
.category-default { background: #f1f3f5; color: #868e96; }

/* 제목 영역 */
.post-title-wrapper {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.post-title-modern {
    font-size: 0.9rem;
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.post-title-modern:hover {
    color: #0066ff;
}

/* 메타 정보 */
.post-meta-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.9rem;
    color: #868e96;
}

.meta-icon {
    font-size: 14px;
    width: max-content;
}

.comment-badge {
    color: #0066ff;
    font-weight: bold;
    font-size: 15px;
    top: -3px;
    position: relative;
}

.board-name {
    padding: 2px 8px;
    background: #f1f3f5;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

/* 오른쪽 영역 */
.post-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 작성자 정보 */
.board-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100px;
}

.board-author-info:hover {
    font-weight: 500;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 0.9rem;
    color: #495057;
    min-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 통계 정보 */
.post-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #868e96;
}

.stat-item {
    min-width: 30px;
    text-align: center;
}

.stat-item.date {
    width: 80px;
}

.stat-item.view {
    width: 40px;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    color: #868e96;
}

/* 검색 영역 */
.search-section-modern {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.search-form-modern {
    max-width: 800px;
    margin: 0 auto;
}

.search-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-select-modern {
    padding: 12px 16px;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.search-input-modern {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 350px;
}

.search-input-modern:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.btn-search-modern {
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #0066ff;
    border: 1px solid #0066ff;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-search-modern:hover {
    background: #0052cc;
}

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

/* 반응형 */
@media (max-width: 768px) {
    .list-header-modern {
        display: none;
    }

    .post-left {
        padding-right: 0px;
    }
    
    .post-item-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .post-title-wrapper {
        width: 100%;
    }
    
    .post-meta-modern {
        position: relative;
    }

    .meta-icon {
        width: 1.1rem;
    }

    .stat-item {
        display: flex;
        gap: 0.5rem;
        min-width: 60px;
    }

    .stat-item.date {
        width: 70px;
    }

    .stat-item.answer-complete {
        font-weight: 500;
        color: #3e6cff;
    }

    .post-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .post-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .board-author-info {
        order: 2;
    }
    
    .post-stats {
        order: 1;
        gap: 0.5rem;
    }
    
    .search-inputs {
        flex-wrap: wrap;
    }
    
    .search-select-modern,
    .search-input-modern,
    .btn-search-modern {
        width: 100%;
    }

    .search-select-modern.board {
        display: none;
    }
    
    .header-right {
        display: none;
    }
}

/* 검색 폼 */
.board-search-form {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    width: 100%;
    max-width: 800px;
}

/* 검색 관련 select 박스 */
.search-select {
    min-width: 120px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    font-size: 15px;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.search-select:hover {
    border-color: var(--primary-blue);
}

.search-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* 검색 입력창 - 확장 */
.board-search-form .search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    font-size: 15px;
    transition: var(--transition);
}

.board-search-form .search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-input {
    flex: 1;
}

/* ================================
   게시글 상세 페이지 내 목록
   ================================ */
.board-list-in-view {
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 2px solid var(--border-color);
}

.list-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.list-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.list-page-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* list.php와 동일한 스타일 적용, in-view 클래스로 구분 */
.post-list-modern.in-view {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 현재 보고 있는 게시글 하이라이트 */
.post-item-modern.current-viewing {
    background: #e8f4ff;
    position: relative;
}

.post-item-modern.current-viewing::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-blue);
}

.post-item-modern.current-viewing .post-title-modern {
    font-weight: 600;
    color: var(--primary-blue);
}

/* 목록 페이지네이션 */
.list-pagination-wrapper {
    margin-top: 24px;
}

/* 목록 하단 액션 */
.list-bottom-actions {
    margin-top: 16px;
    text-align: right;
}

/* 반응형 - 기존 list.php 스타일 상속 */
@media (max-width: 768px) {
    .board-list-in-view {
        margin-top: 40px;
        padding: 30px 0 20px;
    }
    
    .list-section-header {
        padding: 0;
    }
    
    .list-section-title {
        font-size: 18px;
    }
}

/* ================================
   Q&A 게시판 답변 채택 스타일
   ================================ */

/* 답변 완료 배지 */
.answer-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f0f9ff;
    color: #0066ff;
    border: 1px solid #e0f2ff;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.answer-complete-badge.large {
    font-size: 14px;
    padding: 6px 14px;
}

.answer-complete-badge i {
    color: #fbbf24;
}

.answer-complete-text {
    color: #3e6cff;
}

/* 채택된 답변 스타일 */
.comment-wrapper.selected-answer {
    background: #f0f9ff;
    border: 2px solid #0066ff;
    border-radius: 12px;
    padding: 1.8rem 1.2rem !important;
    margin: 16px 0;
    position: relative;
    padding-top: 2rem;
}

.selected-answer-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #0066ff;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.selected-answer-badge i {
    font-size: 14px;
}

/* 답변 채택 버튼 */
.btn-comment.select-answer {
    background: #10b981;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-comment.select-answer:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-comment.select-answer i {
    margin-right: 4px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .answer-complete-badge {
        display: none;
        margin: 8px 0 0 0;
        width: fit-content;
    }
    
    .comment-item.selected-answer {
        padding: 12px;
    }
}

/* ================================
   6. 테이블
   ================================ */

/* 전체 게시판 검색 알림 */
.all-boards-notice {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-gray);
    border-radius: var(--radius-small);
    font-size: 14px;
    color: var(--text-secondary);
}


/* 모바일 반응형 */
@media (max-width: 768px) {
    .category-select {
        width: 100%;
    }
    
    .btn-write {
        width: 100%;
        text-align: center;
    }
    
    /* 하단 검색 폼 */
    .board-search-form {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .search-select {
        width: 100%;
        min-width: 0;
    }
    
    .board-search-form .search-input {
        width: 100%;
        min-width: 0;
    }
    
    .btn-search {
        width: 100%;
    }
}

/* 태블릿 반응형 */
@media (max-width: 1024px) and (min-width: 769px) {
    .board-search-form {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-select:first-child {
        flex: 0 0 calc(50% - var(--spacing-sm)/2);
    }
    
    .search-select:nth-child(2) {
        flex: 0 0 calc(50% - var(--spacing-sm)/2);
    }
    
    .board-search-form .search-input {
        flex: 1 1 auto;
        min-width: 250px;
    }
    
    .btn-search {
        flex: 0 0 auto;
    }
}


/* ================================
   7. 게시글 스타일
   ================================ */

/* 상세보기 */
.post-view {
    padding: var(--spacing-lg);
}

.post-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.post-view-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-lg) 0;
}

.post-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-content {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

/* 사용자 레벨 표시 */
.user-level {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.comment-author .user-level {
    padding-left: 0.2rem;
}

.comment-user-name {
    cursor: pointer;
}

/* 작성자 아바타 (게시글 헤더) */
.author-with-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5rem;
    cursor: pointer;
}

.author-with-avatar:hover {
    font-weight: 500;
}

.author-avatar-small {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.1rem;
}


/* ================================
   8. 카테고리 및 배지
   ================================ */
.post-category,
.user-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.post-category {
    background: var(--primary-green);
    color: var(--white);
}

.author-badge,
.badge-author {
    background: #eafaf2;
    color: #2b7650;
    font-weight: 400;
    border-radius: 0.5rem;
    display: inline-block;
    padding: 0rem 0.5rem;
    font-size: 0.8em;
    margin-left: 0.5rem;
}

.badge-admin {
    background: var(--primary-blue);
    color: var(--white);
}

.badge-editor {
    background: var(--primary-green);
    color: var(--white);
}

/* ================================
   9. 액션 버튼 그룹
   ================================ */
.action-button-group {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.action-btn-group {
    display: flex;
}

.action-btn-group.right {
    margin-left: auto;
}

.action-button-group .action-btn:first-child {
    padding-left: 0.5rem;
}

.action-btn .icon {
    font-size: 1.15em;
    top: -1px;
    position: relative;
}

.like-btn .icon,
.btn-comment.like i {
    color: #ef413d;
}

/* ================================
   10. 댓글 시스템
   ================================ */
.comment-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* 댓글 목록 */
.comment-list {
    display: flex;
    flex-direction: column;
}

.comment-item {
    position: relative;
    border-top: 1px solid #efefef;
}

.comment-wrapper {
    display: flex;
    gap: var(--spacing-md);
    padding: 1.2rem 0px;
}

.comment-replies {
    background: #fcfcfc;
}

/* 프로필 이미지 */
.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img,
img.comment-avatar-mob {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ebebeb;
}

img.comment-avatar-mob {
    display: none;
}

.comment-content-wrapper {
    flex: 1;
    min-width: 0;
}

/* 댓글 헤더 */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.comment-date {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 댓글 내용 */
.comment-body {
    margin-bottom: var(--spacing-sm);
    padding: 0.5rem 0px;
    padding-right: 0.5rem;
}

.comment-text {
    font-size: 0.92rem;
    line-height: 2.2em;
    color: var(--text-primary);
    word-break: break-word;
}

.comment-text ul, .comment-text ol {
    margin: 0 1.5rem;
}
.post-content p {
    margin-bottom: 1rem;
}

.comment-text p {
    margin-bottom: 0px;
}

/* 댓글 멘션 스타일 */
.comment-mention-name {
    color: #2e81ff;
    display: inline-block;
    font-weight: 700;
}

/* p 태그와 함께 사용 시 */
.comment-text .comment-mention {
    margin-right: 8px;
}

/* 댓글 액션 */
.comment-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 14px;
}

/* 더보기 메뉴 */
.comment-more-menu {
    position: relative;
}

.comment-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-hover);
    min-width: 100px;
    z-index: 10;
}

.comment-menu-dropdown button {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-menu-dropdown button:hover {
    background: var(--bg-gray);
}

/* depth 1 이상 모든 댓글 스타일 */
.comment-depth-1,
.comment-depth-2,
.comment-depth-3,
.comment-depth-4,
.comment-depth-5,
.comment-depth-6,
.comment-depth-7,
.comment-depth-8,
.comment-depth-9,
.comment-depth-10 {
    padding-left: 3rem;
}

/* 엔터키 기호 */
.comment-depth-1::before,
.comment-depth-2::before,
.comment-depth-3::before,
.comment-depth-4::before,
.comment-depth-5::before,
.comment-depth-6::before,
.comment-depth-7::before,
.comment-depth-8::before,
.comment-depth-9::before,
.comment-depth-10::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 7v8a2 2 0 0 0 2 2h8m0 0l-3-3m3 3l-3 3' stroke='%23868e96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* 반응형 */
@media (max-width: 768px) {
    .comment-depth-1,
    .comment-depth-2,
    .comment-depth-3,
    .comment-depth-4,
    .comment-depth-5,
    .comment-depth-6,
    .comment-depth-7,
    .comment-depth-8,
    .comment-depth-9,
    .comment-depth-10 {
        padding-left: 0px;
    }

    .comment-depth-1::before,
    .comment-depth-2::before,
    .comment-depth-3::before,
    .comment-depth-4::before,
    .comment-depth-5::before,
    .comment-depth-6::before,
    .comment-depth-7::before,
    .comment-depth-8::before,
    .comment-depth-9::before,
    .comment-depth-10::before {
        display: none;
    }

    .comment-wrapper {
        display: block;
    }
}

/* 삭제된 댓글 */
.deleted-comment .comment-wrapper {
    background: var(--bg-gray);
    padding: var(--spacing-sm);
    border-radius: var(--radius-small);
}

.deleted-user,
.deleted-message {
    color: var(--text-secondary);
    font-style: italic;
}

/* 댓글 폼 */
.comment-form,
.reply-form-wrapper,
.comment-edit-form {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
}

.comment-form {
    margin-top: 1rem;
}

.reply-form-wrapper,
.comment-edit-form {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-gray);
    border-radius: var(--radius-small);
    border-top: none;
}

/* 댓글 에디터 */
.comment-editor-container,
.reply-editor-container {
    margin-bottom: var(--spacing-sm);
}

/* WordPress 에디터 스타일 */
.comment-form .wp-editor-wrap,
.reply-form .wp-editor-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    overflow: hidden;
}

.comment-form .wp-editor-tabs,
.reply-form .wp-editor-tabs {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border-color);
}

.comment-form .wp-editor-container,
.reply-form .wp-editor-container {
    border: none;
}

/* 에디터 높이 */
.oppadu-comment-editor iframe {
    min-height: 100px !important;
}

/* ================================
   댓글 파일 첨부 - 토스 스타일
   ================================ */
.reply-form-actions {
    margin-left: auto;
}

.comment-action-container {
    margin-top: 0.8rem;
    display: flex;
    align-items: start;
}

.comment-edit-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* 파일 업로드 영역 */
.file-upload-area {
    position: relative;
    display: inline-block;
}

.file-upload-area.hidden {
    display: none;
}

/* 파일 입력 숨김 */
.comment-attachment-input,
.reply-attachment-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* 업로드 라벨 (버튼 스타일) */
.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #FFFFFF;
    border: 1px solid #E5E8EB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7684;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-label:hover {
    background: #F7F8FA;
    border-color: #D3D7DC;
    color: #191F28;
}

.upload-icon {
    width: 16px;
    height: 16px;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

/* 기존 첨부파일 표시 */
.existing-attachment {
    margin-bottom: 12px;
    background: #FFFFFF;
    border: 1px solid #E5E8EB;
    border-radius: 12px;
    padding: 12px 16px;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.attachment-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.existing-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.existing-file-icon {
    font-size: 18px;
    line-height: 1;
}

.existing-file-name {
    font-size: 14px;
    color: #191F28;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 기존 파일 삭제 버튼 */
.btn-remove-attachment {
    padding: 6px 12px;
    background: #FFFFFF;
    border: 1px solid #E5E8EB;
    border-radius: 6px;
    font-size: 13px;
    color: #6B7684;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-remove-attachment:hover {
    background: #FFF5F5;
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.btn-remove-attachment i {
    font-size: 11px;
}

/* 댓글 첨부파일 표시 영역 개선 */
.comment-attachments {
    margin-top: 12px;
    margin-right: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.comment-attachments .attachment-item {
    padding: 6px 12px;
    background: #F7F8FA;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.comment-attachments .attachment-item a {
    color: #2e81ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    gap: 6px;
}

.comment-attachments .attachment-item a:hover {
    color: #0066FF;
}

/* 반응형 */
@media (max-width: 768px) {
    .upload-label {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .existing-attachment {
        padding: 10px 14px;
    }
    
    .existing-file-name {
        max-width: 150px;
    }
}

/* 댓글 작성 버튼과의 간격 조정 */
.comment-form .comment-submit {
    margin-left: auto;
    padding: 12px 24px;
}

/* ================================
   10-1. js append CSS 를 style 로 옮김
   ================================ */

 /* 포커스 효과 */
.board-search.focused {
    transform: translateY(-2px);
    transition: transform 0.2s;
}

/* 파일 미리보기 */
.file-preview {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 문자 수 카운터 */
.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 로딩 화면 */
.oppadu-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 투표 버튼 애니메이션 */
.btn-vote.voted {
    transform: scale(0.95);
    transition: transform 0.2s;
}

/* 모바일 반응형 추가 */
@media (max-width: 768px) {
    .oppadu-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .oppadu-notification.show {
        transform: translateY(0);
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* ================================
   11. 페이지네이션
   ================================ */
.board-pagination-container {
    display: flex;
    align-items: end;
    justify-content: center;
    position: relative;   
}

.oppadu-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
}

.oppadu-pagination a,
.oppadu-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.oppadu-pagination a:hover {
    background: var(--bg-gray);
    border-color: var(--primary-blue);
}

.oppadu-pagination span.page-current {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.btn-write-box {
    position: absolute;
    right: 0;
    margin-bottom: var(--spacing-lg);
}

/* 반응형 */
@media (max-width: 768px) {
    .board-pagination-container {
        display: block;
    }

    .btn-write-box {
        position: relative;
    }

    .oppadu-pagination {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        width: 100%;
    }

    .footer-ads {
        width: 100%;
        overflow-x: auto;
    }
}

/* 페이지네이션 - 점 추가 */
.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ================================
   12. 컨텐츠 스타일 (게시글/댓글)
   ================================ */
.post-content img,
.comment-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-small);
    display: block;
    margin-bottom: 1.5rem;
}

.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.comment-body img {
    max-height: 400px;
    cursor: pointer;
}

.comment-body img:hover {
    opacity: 0.9;
}

/* 코드 스타일 */
.post-content code,
.comment-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #d73a49;
}

.post-content pre,
.comment-body pre {
    background: #f5f5f5;
    padding: 1.45rem 1rem;
    border-radius: var(--radius-small);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
    border: 1px solid #e1e4e8;
    line-height: 1.45;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.post-content pre code,
.comment-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 인용문 */
.post-content blockquote,
.comment-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* 테이블 */
.post-content table,
.comment-content table {
    border-collapse: collapse;
    width: 100%;
    margin: var(--spacing-md) 0;
}

.post-content table th,
.post-content table td,
.comment-content table th,
.comment-content table td {
    border: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
}

.post-content table th,
.comment-content table th {
    background: var(--bg-gray);
    font-weight: 600;
}

/* ================================
   13. 폼 스타일
   ================================ */
.write-form {
    padding: var(--spacing-2xl);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

/* ================================
   14. 유틸리티
   ================================ */
/* 버튼 그룹 */
.post-edit-actions-container {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.post-edit-actions-container {
    border-bottom: 1px solid var(--border-color);
}

.edit-button-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.edit-btn-group {
    display: flex;
    gap: 0.2rem;
}

.edit-btn-group.right {
    margin-left: auto;
}

/* 좋아요 카운트 */
.count,
.comment-count {
    font-weight: 600;
    color: var(--primary-blue);
}

/* TinyMCE 스타일 */
.tox-tinymce {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-small) !important;
}

.tox .tox-toolbar__primary {
    background: var(--bg-gray) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.tox .tox-tbtn {
    color: var(--text-primary) !important;
}

.tox .tox-tbtn:hover {
    background-color: var(--border-color) !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn:active {
    background-color: var(--primary-blue) !important;
    color: var(--white) !important;
}

/* ================================
   15. 반응형 디자인
   ================================ */
@media (max-width: 768px) {
    /* 레이아웃 */
    .oppadu-board-container {
        padding: 0px;
        margin: 20px auto;
    }
    
    .board-header,
    .post-view,
    .write-form {
        padding: 0px 15px;
    }
    
    .board-title {
        font-size: 24px;
    }
    
    .post-view-title {
        font-size: 1.7rem;
    }
    
    /* 버튼 */
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
    
    .action-button-group {
        flex-wrap: wrap;
    }
    
    .action-btn {
        border-radius: 0 !important;
        /* border-right: 1px solid var(--border-color) !important; */
        font-size: 0.8em;
        padding: 10px;
    }

    .action-button-group .action-btn:first-child {
        padding-left: 0px;
    }

    .edit-button-group {
        justify-content: flex-start;
    }
    
    .edit-btn {
        white-space: nowrap;
        flex: 1 1 auto !important;
        font-size: 0.9rem !important;
        padding: var(--spacing-sm) var(--spacing-md) !important;
    }
    
    /* 댓글 */
    .comment-avatar {
        display: none;
    }

    .comment-author {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    img.comment-avatar-mob {
        width: 2rem;
        height: 2rem;
        display: inline;
    }

    .author-badge, .badge-author {
        margin-left: 0.2rem;
    }

    .comment-author .user-level {
        top: 2px;
        position: relative;
    }
    
    /* 에디터 */
    .comment-form .wp-editor-wrap,
    .reply-form .wp-editor-wrap {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
    }
    
    .reply-form-wrapper {
        margin-left: -20px;
        margin-right: -20px;
        padding: var(--spacing-md);
        border-radius: 0;
    }
    
    /* TinyMCE */
    .tox-tinymce-aux {
        z-index: 9999 !important;
    }
    
    .tox .tox-toolbar__primary {
        flex-wrap: wrap;
    }
}

/* ================================
   16. 특수 효과 및 애니메이션
   ================================ */
/* 호버 효과 */
.btn:hover,
.edit-btn:hover,
.action-btn:hover {
    transform: translateY(-1px);
}

/* 로딩 */
.oppadu-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 알림 */
.oppadu-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.oppadu-notification.show {
    transform: translateX(0);
}

.oppadu-notification.success {
    border-left: 4px solid var(--primary-green);
}

.oppadu-notification.error {
    border-left: 4px solid var(--danger-red);
}

/* 라이트박스 */
.oppadu-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.2);
    background: none;
}

/* ================================
   17. 게시판 옵션 스타일
   ================================ */
   
/* 옵션 섹션 */
.board-options-section {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    background: var(--bg-gray);
    border-radius: var(--radius);
}

.board-options-section.top-options {
    margin-top: var(--spacing-lg);
}

.board-options-section.bottom-options {
    margin-bottom: var(--spacing-lg);
}

/* 옵션 필드 */
.option-field {
    margin-bottom: var(--spacing-md);
}

.option-field:last-child {
    margin-bottom: 0;
}

/* 필수 표시 */
.required {
    color: var(--danger-red);
    font-weight: bold;
}

/* 라디오/체크박스 그룹 */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.radio-label,
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-primary);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* 게시글 보기 - 옵션 표시 */
.post-options-display {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-gray);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-blue);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    font-size: 0.9rem;
}

.option-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    flex-shrink: 0;
}

.option-value {
    color: var(--text-primary);
    word-break: break-word;
}

.checkbox-values {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

/* Boolean 체크박스 스타일 */
.boolean-checkbox {
    margin-top: var(--spacing-sm);
}

.boolean-checkbox .checkbox-label {
    font-weight: normal;
}

/* URL 입력 필드 스타일 */
input[type="url"] {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

/* 숫자 입력 필드 스타일 */
input[type="number"] {
    max-width: 200px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .board-options-section {
        padding: var(--spacing-md);
        margin: var(--spacing-md) -20px;
        border-radius: 0;
    }
    
    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .post-options-display {
        padding: var(--spacing-md);
        border-radius: 0;
    }
    
    .option-label {
        min-width: auto;
    }
}

/* 옵션 필드 hover 효과 */
.option-field:hover .form-input,
.option-field:hover .form-select,
.option-field:hover .form-textarea {
    border-color: var(--primary-blue);
}

/* 관리자 옵션 구분 */
.option-field.admin-option {
    background: #fff3cd;
    padding: var(--spacing-md);
    border-radius: var(--radius-small);
    border: 1px solid #ffeeba;
}

.option-field.admin-option .form-label::before {
    content: '🔒 ';
}

/* ================================
   게시글 첨부파일 - 심플 버전
   ================================ */
.post-attachments-simple {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
}

.post-attachments-simple .attachments-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

.post-attachments-simple .attachment-item {
    margin-bottom: var(--spacing-sm);
    font-size: 0.88rem;
    background: #f7f8fa;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-weight: 500;
}

.post-attachments-simple .attachment-item a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

.post-attachments-simple .attachment-item a:hover {
    text-decoration: underline;
    color: #0052CC;
}

/* 또는 댓글과 완전히 동일한 스타일을 원한다면 */
.post-attachments-inline {
    margin: var(--spacing-lg) 0;
}

.post-attachments-inline .attachments-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.post-attachments-inline .attachment-item {
    display: inline-block;
    margin-right: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.post-attachments-inline .attachment-item a {
    color: var(--primary-blue);
    text-decoration: none;
}

.post-attachments-inline .attachment-item a:hover {
    text-decoration: underline;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .post-attachments-simple,
    .post-attachments-inline {
        font-size: 13px;
    }
    
    .post-attachments-inline .attachment-item {
        display: block;
        margin-right: 0;
    }
}

/* ================================
   18. 파일 업로드 개선
   ================================ */
   
/* 파일 업로드 관련 스타일 */
.file-input-hidden {
    display: none;
}

.selected-files-container {
    margin-bottom: 15px;
    overflow-y: auto;
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-tiny);
    margin-bottom: 8px;
    transition: var(--transition);
}

.selected-file-item:hover {
    background: #f0f1f3;
}

/* 기존 파일 구분 */
.selected-file-item.existing-file {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-icon {
    font-size: 18px;
    color: var(--text-secondary);
}

.file-name {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.file-size {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--danger-red);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-tiny);
    transition: var(--transition);
}

.btn-remove-file:hover {
    background: #ffe8e8;
}

.btn-add-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-tiny);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-primary);
}

.btn-add-file:hover {
    background: #eef0f2;
    border-color: #d1d5db;
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.existing-attachments {
    margin-bottom: 15px;
}

.existing-attachments strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

/* 모바일 반응형 숨김 CSS */

.mob-only {
    display: none;
}

@media (max-width: 768px) {
    .mob-only {
        display: block;
    }

    .mob-hidden {
        display: none;
    }
}

/* ================================
   게시글 작성자 활동 섹션
   ================================ */
.author-activity-section {
    margin: 40px 0;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.activity-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* 좌측 광고 영역 */
.activity-left {
    flex-shrink: 0;
}

.square-ad-placeholder {
    position: sticky;
    top: 20px;
}

/* 우측 활동 내역 */
.activity-right {
    flex: 1;
    min-width: 0;
}

/* 작성자 정보 헤더 */
.activity-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.activity-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e8eb;
}

.activity-author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.activity-author-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 탭 버튼 영역 */
.activity-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.activity-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.activity-tab:hover {
    color: var(--text-primary);
}

.activity-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* 인라인 작성자 표시 */
.activity-author-inline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 8px;
    padding-bottom: 2px;
}

.activity-author-inline strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 활동 콘텐츠 */
.activity-content {
    display: none;
}

.activity-content.active {
    display: block;
}

.activity-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 활동 목록 */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #fafbfc;
}

.activity-item:last-child {
    border-bottom: none;
}

/* 현재 보고 있는 게시글 하이라이트 */
.activity-item.current-viewing {
    background: #e8f4ff;
}

.activity-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    text-decoration: none;
    color: var(--text-primary);
}

/* 게시판명 배지 */
.activity-board {
    flex-shrink: 0;
    padding: 2px 8px;
    background: #f1f3f5;
    border-radius: 4px;
    font-size: 11px;
    color: #868e96;
    font-weight: 600;
    white-space: nowrap;
}

/* 제목/댓글 내용 */
.activity-title,
.activity-content-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 댓글 수 */
.activity-comment-count {
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 날짜 */
.activity-date {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: auto;
}

/* 모바일 토글 헤더 (기본 숨김) */
.activity-mobile-header {
    display: none;
}

.activity-toggle-btn {
    width: 100%;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.activity-toggle-btn:hover {
    background: #f1f3f5;
}

.toggle-text {
    font-size: 14px;
    color: var(--text-primary);
}

.toggle-text strong {
    font-weight: 600;
    color: var(--primary-blue);
}

.toggle-icon {
    color: var(--text-secondary);
    transition: transform 0.3s;
}

/* 펼쳐진 상태 아이콘 회전 */
.activity-expanded .toggle-icon {
    transform: rotate(180deg);
}

/* 태블릿 반응형 */
@media (max-width: 1024px) and (min-width: 769px) {
    .activity-container {
        gap: 30px;
    }
    
    .square-ad-placeholder {
        position: static;
        margin-bottom: 20px;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    /* 광고 영역 숨김 */
    .activity-left {
        display: none;
    }
    
    /* 모바일 헤더 표시 */
    .activity-mobile-header {
        display: block;
        margin-bottom: 16px;
    }
    
    /* 데스크톱 작성자 이름 숨김 */
    .activity-author-inline {
        display: none;
    }
    
    /* 접을 수 있는 콘텐츠 */
    .activity-collapsible {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    /* 펼쳐진 상태 */
    .activity-expanded .activity-collapsible {
        max-height: 2000px;
        transition: max-height 0.5s ease-in;
    }
    
    /* 활동 섹션 패딩 조정 */
    .author-activity-section {
        margin: 30px 0;
        padding: 20px 0;
    }
    
    .activity-container {
        flex-direction: column;
        gap: 0;
    }
    
    .activity-right {
        width: 100%;
    }
    
    .activity-header {
        padding: 12px;
        font-size: 14px;
    }
    
    /* 탭 스타일 조정 */
    .activity-tabs {
        flex-wrap: nowrap;
        gap: 0;
        margin-bottom: 16px;
    }
    
    .activity-tab {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* 목록 아이템 조정 */
    .activity-item a {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .activity-board {
        margin-bottom: 4px;
        font-size: 10px;
    }
    
    .activity-title,
    .activity-content-text {
        flex: 1 1 100%;
        order: 2;
        margin-top: 4px;
        font-size: 13px;
    }
    
    .activity-comment-count {
        order: 3;
        font-size: 12px;
    }
    
    .activity-date {
        order: 4;
        margin-left: auto;
        font-size: 12px;
    }
}

/* ================================
   범용 광고 플레이스홀더 스타일
   ================================ */
   
/* 기본 광고 플레이스홀더 */
.ad-placeholder,
.square-ad-placeholder,
.banner-ad-placeholder,
.rectangle-ad-placeholder {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100px;
}

/* 광고 래퍼 */
.ad-placeholder .ad-wrapper,
.square-ad-placeholder .ad-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 로딩/빈 상태 메시지 */
.ad-placeholder::before,
.square-ad-placeholder::before,
.banner-ad-placeholder::before,
.rectangle-ad-placeholder::before {
    content: attr(data-loading-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 13px;
    z-index: 0;
    pointer-events: none;
}

/* 로딩 중 상태 */
.ad-loading::before {
    content: attr(data-loading-text) !important;
}

/* 광고 없음 상태 */
.ad-unfilled::before {
    content: attr(data-empty-text) !important;
    color: #ccc;
}

/* 광고 로드 완료 */
.ad-loaded::before {
    display: none;
}

/* AdSense 광고 스타일 */
.ad-placeholder ins.adsbygoogle,
.square-ad-placeholder ins.adsbygoogle {
    z-index: 1;
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

/* 특정 크기별 스타일 */
.square-ad-placeholder {
    width: 300px;
    height: 300px;
}

.banner-ad-placeholder {
    width: 728px;
    height: 90px;
}

.rectangle-ad-placeholder {
    width: 336px;
    height: 280px;
}

/* sticky 광고용 */
.square-ad-placeholder.sticky {
    position: sticky;
    top: 20px;
}

/* 반응형 광고 */
@media (max-width: 768px) {
    .square-ad-placeholder,
    .banner-ad-placeholder,
    .rectangle-ad-placeholder {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .banner-ad-placeholder {
        height: auto;
        min-height: 50px;
    }
}