* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
}

/* ── 헤더 ── */
.header {
    background: #2c3e50;
    color: white;
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { font-size: 1.3rem; font-weight: bold; text-decoration: none; color: white; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav a:hover { background: rgba(255,255,255,0.15); color: white; }
.nav a.btn-nav {
    background: #4a90d9;
    color: white;
    padding: 6px 14px;
}
.nav .user-name { color: #f0f0f0; font-size: 0.88rem; }

/* ── 컨테이너 ── */
.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 40px 20px; }

/* ── 카드 ── */
.card {
    background: white;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* ── 버튼 ── */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary   { background: #4a90d9; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-success   { background: #27ae60; color: white; }
.btn-danger    { background: #e74c3c; color: white; }
.btn-outline   { background: white; color: #4a90d9; border: 1px solid #4a90d9; }
.btn-kakao     { background: #FEE500; color: #3c1e1e; font-weight: bold; width: 100%; padding: 12px; font-size: 0.95rem; }
.btn-google    { background: white; color: #333; border: 1px solid #ddd; width: 100%; padding: 12px; font-size: 0.95rem; }
.btn-sm        { padding: 5px 10px; font-size: 0.8rem; }
.btn-block     { display: block; width: 100%; padding: 12px; font-size: 0.95rem; }

/* ── 폼 ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.88rem; color: #555; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: #4a90d9; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── 이미지 플레이스홀더 ── */
.img-placeholder {
    background: #e0e0e0;
    border: 2px dashed #bbb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
}

/* ── 지도 플레이스홀더 ── */
.map-placeholder {
    background: #e8f0e8;
    border: 2px dashed #a0c0a0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6a9a6a;
    gap: 8px;
}
.map-placeholder .map-icon { font-size: 2.5rem; }
.map-placeholder span { font-size: 0.9rem; }

/* ── 별점 ── */
.stars { color: #f39c12; font-size: 1.1rem; letter-spacing: 2px; }
.stars-sm { color: #f39c12; font-size: 0.9rem; }
.rating-input { display: flex; gap: 6px; }
.rating-input span {
    font-size: 1.6rem;
    cursor: pointer;
    color: #ddd;
    transition: color 0.1s;
}
.rating-input span.active { color: #f39c12; }

/* ── 게시글 목록 카드 ── */
.post-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    display: flex;
    gap: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.post-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.post-thumb { width: 100px; height: 80px; flex-shrink: 0; border-radius: 6px; }
.post-info { flex: 1; }
.post-title { font-size: 1rem; font-weight: bold; margin-bottom: 4px; }
.post-meta { font-size: 0.8rem; color: #888; margin-bottom: 6px; }
.post-footer { display: flex; align-items: center; justify-content: space-between; }
.post-stats { font-size: 0.8rem; color: #aaa; display: flex; gap: 12px; }

/* ── 댓글 ── */
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-author { font-weight: bold; font-size: 0.88rem; }
.comment-date { font-size: 0.78rem; color: #aaa; }
.comment-body { font-size: 0.9rem; color: #444; line-height: 1.5; }

/* ── 페이지네이션 ── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn {
    width: 34px; height: 34px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
    color: #555;
}
.page-btn:hover, .page-btn.active { background: #4a90d9; color: white; border-color: #4a90d9; }

/* ── 검색 바 ── */
.search-bar { display: flex; gap: 8px; margin-bottom: 24px; }
.search-bar .form-control { flex: 1; }

/* ── 구분선 ── */
.divider { border: none; border-top: 1px solid #eee; margin: 20px 0; }
.divider-text {
    text-align: center;
    position: relative;
    margin: 20px 0;
    color: #aaa;
    font-size: 0.85rem;
}
.divider-text::before, .divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #ddd;
}
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ── 배지 ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}
.badge-primary { background: #e8f0fb; color: #4a90d9; }
.badge-danger  { background: #fdecea; color: #e74c3c; }
.badge-admin   { background: #e8f5e9; color: #27ae60; }

/* 탭 버튼 위의 작은 숫자 배지(탈퇴 신청 건수 표시용) */
.tab-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 9px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    line-height: 18px;
    text-align: center;
}

/* 관리자 탭 콘텐츠 — active 가 붙은 탭만 표시(나머지는 숨김) */
/* 이 규칙이 없으면 탭 4개의 내용이 화면에 한꺼번에 모두 나타남 */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── 좋아요 버튼 ── */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.like-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.like-btn.liked { background: #fdecea; border-color: #e74c3c; color: #e74c3c; }

/* ── 프로필 ── */
.profile-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #d0d0d0;
    border: 2px dashed #bbb;
    display: flex; align-items: center; justify-content: center;
    color: #999; font-size: 0.8rem;
}

/* ── 테이블 ── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid #eee; text-align: left; font-size: 0.88rem; }
.table th { background: #f8f9fa; font-weight: 600; color: #555; }
.table tr:hover td { background: #fafafa; }

/* ── 푸터 ── */
.footer {
    background: #2c3e50;
    color: #8899aa;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
    font-size: 0.82rem;
}

/* ── 유틸 ── */
.text-center { text-align: center; }
.text-muted  { color: #888; }
.text-sm     { font-size: 0.82rem; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.page-title { font-size: 1.4rem; font-weight: bold; margin-bottom: 24px; color: #2c3e50; }
