
.board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.board-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 먹튀제보 카드 썸네일 */
.card-thumbnail {
    position: relative;
    width: calc(100% + var(--spacing-md) * 2);
    margin: calc(var(--spacing-md) * -1) calc(var(--spacing-md) * -1) var(--spacing-md);
    aspect-ratio: 16 / 9;
    background: #fcfcfc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-thumbnail.no-image,
.card-thumbnail .no-image-label {
    color: #6e7a88;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 먹튀제보 전용 카드 */
.board-card-report {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.board-card-report .card-thumbnail {
    margin: 0;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

/* 엑셀 셀 스타일 테이블 */
.report-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #333333;
    table-layout: fixed;
}

.report-card-table th,
.report-card-table td {
    padding: 9px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-card-table th {
    width: 90px;
    font-weight: 600;
    color: #777;
    background: rgba(0, 0, 0, 0.03);
    font-size: 0.78rem;
}

.report-card-table td {
    font-weight: 600;
}

.report-card-table .td-url {
    color: #e52955;
}

.report-card-table .td-damage {
    color: #d83d44;
    font-weight: 700;
}

.board-card-report .report-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.78rem;
    color: #777;
}

.board-card-report .footer-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.board-card-report .footer-date {
    margin-left: auto;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.card-category {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.card-category.danger {
    background: var(--danger);
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-title {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.card-title .title-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title .comment-count,
.card-title .new-badge,
.card-title .lock-badge {
    flex-shrink: 0;
}

.card-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.card-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.title-cell {
    text-align: left;
}

.comment-count {
    color: var(--primary);
    font-size: 0.85rem;
    margin-left: 4px;
}

/* 본문에 이미지가 있을 때 표시되는 배지 (댓글수 좌측) */
.img-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    color: #38bdf8;
    vertical-align: middle;
    flex-shrink: 0;
}
.img-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 제목 셀 안쪽 flex 컨테이너: 제목만 ellipsis로 잘리고 댓글 수/NEW 배지는 항상 보이도록 */
.board-table .title-cell .title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.board-table .title-cell .title-row .title-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-table .title-cell .title-row .comment-count,
.board-table .title-cell .title-row .new-badge,
.board-table .title-cell .title-row .lock-badge,
.board-table .title-cell .title-row .notice-badge {
    flex-shrink: 0;
}

/* 모바일: title-row 안의 title-text는 인라인 flex item으로 유지 (style.css의 display:block 오버라이드) */
@media (max-width: 768px) {
    .board-table .title-cell .title-row .title-text {
        display: inline-block;
        margin-bottom: 0;
    }
}

/* 새글 N 표시 */
.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    animation: newBadgePulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.4);
}

@keyframes newBadgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* 작성자 뱃지 스타일 */
.author-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.level-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 3px;
}

.level-icon-small {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 2px;
}

.author-name {
    color: var(--text-primary);
}

/* 공지사항 스타일 */
.notice-row {
    background: rgba(20, 184, 166, 0.08) !important;
}

.notice-row:hover {
    background: rgba(30, 164, 89, 0.06) !important;
    transition: 0.15s ease;
}

/* 공지/이벤트 뱃지는 글로벌 .notice-badge / .notice-badge.badge-event 사용 (전역 통일) */

/* 관리자 전용 — 공지글 순서 변경 버튼 */
.notice-order-ctrl {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    margin: 0 6px 0 4px;
    vertical-align: middle;
    line-height: 1;
}
.notice-move-btn {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-primary, #1ea459);
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 3px;
    width: 18px;
    height: 12px;
    padding: 0;
    font-size: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.notice-move-btn:hover {
    background: rgba(20, 184, 166, 0.3);
}
.notice-move-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.empty-content {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: var(--text-dark);
}

.empty-content p {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

@media (max-width: 1024px) {
    .board-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .board-grid {
        grid-template-columns: 1fr;
    }
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-link.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
    font-weight: 600;
}

.page-first, .page-last,
.page-prev, .page-next {
    font-weight: bold;
}

@media (max-width: 768px) {
    .pagination {
        gap: 2px;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 13px;
    }
}

/* 번호 컬럼 — 행 앞 순번 (공지는 '공지' 라벨) */
.board-table .col-num {
    text-align: center;
    white-space: nowrap;
    color: var(--text-secondary, #888888);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    width: 55px;
}
.board-table .col-num .num-notice {
    color: var(--accent-primary, #1ea459);
    font-weight: 700;
    font-size: 12px;
}
/* 모바일: 번호 컬럼 숨김 (작성자/작성일과 동일 정책 — 제목 셀에 메타 표시) */
@media (max-width: 768px) {
    .board-table .col-num { display: none !important; }
}

/* 포인트 거래 — 판매포인트 셀 */
.board-table .col-trade-points {
    text-align: center;
    white-space: nowrap;
    min-width: 140px;
    padding-left: 6px;
    padding-right: 6px;
}
.trade-pill {
    display: inline-block;
    font-size: 15px;            /* 가독성 위해 키움 */
    font-weight: 800;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.5;
}
.trade-pill.trade-open { color: #1ea459; }
.trade-pill.trade-done { color: #888888; }
.trade-pill.trade-na   { color: #999999; }

/* 모바일에서는 판매포인트 컬럼 숨김 (제목 셀에 모바일용 메타가 따로 표시됨) */
@media (max-width: 768px) {
    .board-table .col-trade-points { display: none !important; }
}
