@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/PretendardVariable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f8f8;
    --bg-hover: #f9f9f9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-inverse: #ffffff;
    --border-primary: #e0e0e0;
    --border-secondary: #e5e8eb;
    --border-tertiary: #f0f0f0;
    --accent-red: #dc2626;
    --accent-green: #22c55e;
    --accent-blue: #3182f6;
    --accent-orange: #f59e0b;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --input-bg: #f2f4f6;
    --modal-overlay: rgba(0,0,0,0.3);
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --bg-hover: #2a2a2a;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-inverse: #000000;
    --border-primary: #27272a;
    --border-secondary: #3f3f46;
    --border-tertiary: #27272a;
    --accent-red: #f87171;
    --accent-green: #4ade80;
    --accent-blue: #60a5fa;
    --accent-orange: #fb923c;
    --header-bg: #18181b;
    --card-bg: #18181b;
    --input-bg: #27272a;
    --modal-overlay: rgba(0,0,0,0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: none;
    overflow-x: hidden;
}
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-primary);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    /* transition removed for instant theme change */
}
[data-theme="dark"] .header {
    background: linear-gradient(to bottom, #1a1a1a, #18181b);
    border-bottom: 1px solid #27272a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo {
    font-size: 20px;
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-write {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.btn-write:hover { background: #333; }
[data-theme="dark"] .btn-write {
    background: #fff;
    color: #000;
}
[data-theme="dark"] .btn-write:hover {
    background: #e0e0e0;
}
.panel-button-complete:hover {
    background: #059669 !important;
    transform: translateY(-1px);
}
.panel-button-complete:active {
    transform: translateY(0);
}
.panel-button-danger:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
}
.panel-button-danger:active {
    transform: translateY(0);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.tutorial-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tutorial-text {
    display: inline;
}
.tutorial-icon {
    font-size: 16px;
}
.btn-logout {
    padding: 8px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-primary);
}
.container {
    max-width: 1440px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 사이드바 기본 너비 */
.sidebar-container {
    width: 280px;
}

/* PC에서는 공지사항 한 줄로 */
.announcement-list {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .header {
        padding: 8px !important;
    }

    .header-inner {
        padding: 0 !important;
    }

    /* 공지사항과 실시간 매칭 패널 숨기기 */
    .announcement-panel,
    .live-status-panel {
        display: none !important;
    }

    /* 상세 패널 기본 숨기기 */
    .detail-panel {
        display: none !important;
    }

    /* 상세 패널 열렸을 때만 보이기 */
    .detail-panel.open {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: 9999 !important;
    }

    /* 로고 영역 */
    .header-left .logo-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }

    .logo-text {
        font-size: 14px !important;  /* 텍스트 크기 줄이기 */
    }

    /* 헤더 오른쪽 */
    .header-right {
        gap: 4px !important;
    }

    /* 관리자, 로그아웃 버튼 숨기기 */
    .header-right > a[href="admin.php"],
    .header-right > a[href="logout.php"] {
        display: none !important;
    }

    /* 버튼들 크기 줄이기 */
    #theme-toggle {
        padding: 6px !important;
        font-size: 14px !important;
    }

    .btn-write {
        padding: 5px 8px !important;
        font-size: 12px !important;
    }

    /* 알림 버튼 */
    .header-right > button[onclick*="showNotifications"] {
        padding: 5px 8px !important;
        font-size: 12px !important;
    }

    /* 사용자 정보 - 아바타만 표시 */
    .user-info {
        padding: 2px !important;
        background: transparent !important;
    }

    .user-avatar {
        width: 28px !important;
        height: 28px !important;
    }

    .user-name {
        display: none !important;
    }

    /* 튜토리얼 버튼 모바일 스타일 */
    .tutorial-btn {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
        color: #fff !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
        padding: 8px 12px !important;
    }
    .tutorial-text {
        display: none !important;
    }
    .tutorial-icon {
        font-size: 16px;
    }

    .container {
        padding: 0 12px;
        margin: 12px auto;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .post-card {
        padding: 14px !important;
        margin-bottom: 10px !important;
    }

    .post-header {
        flex-direction: row;  /* 모바일에서도 가로 정렬 유지 */
        gap: 8px;
        flex-wrap: wrap;  /* 공간이 부족하면 줄바꿈 */
    }

    .post-title {
        font-size: 14px !important;
    }

    .post-meta {
        font-size: 11px !important;
    }

    .post-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px;
    }

    .detail-label {
        font-size: 10px !important;
    }

    .detail-value {
        font-size: 13px !important;
    }

    .post-footer {
        margin-top: 12px !important;
    }

    .post-time {
        font-size: 10px !important;
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
        padding: 12px !important;
    }

    .stat-item {
        font-size: 13px;
    }

    /* 메인 레이아웃 모바일 조정 */
    .container[style*="flex"] {
        flex-direction: column !important;
    }

    /* 필터 패널 - 모바일에서 가로 스크롤 */
    .container > div:first-child[style*="width: 220px"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        margin-bottom: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 메인 콘텐츠 전체 너비 */
    .container > div:last-child {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 상세 패널 모바일 최적화 */
    .detail-panel {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        border-radius: 0 !important;
    }

    .detail-header {
        padding: 12px !important;
    }

    .detail-panel h2 {
        font-size: 16px !important;
    }

    .detail-content {
        padding: 16px !important;
    }

    .detail-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .stat-box {
        padding: 10px !important;
    }

    .stat-box-label {
        font-size: 10px !important;
    }

    .stat-box-value {
        font-size: 14px !important;
    }

    .info-boxes {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .info-box {
        padding: 10px !important;
        font-size: 12px !important;
    }

    /* 로딩 오버레이 */
    #loading-overlay {
        padding: 16px !important;
    }

    /* 글쓰기 버튼 모바일 */
    .btn-write {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* 빈 상태 */
    .empty-state {
        padding: 40px 20px !important;
    }
}

/* 중간 화면 (481px ~ 768px) - 가로형 레이아웃 */
@media (min-width: 481px) and (max-width: 768px) {
    /* 좌측 사이드바 전체 너비 */
    .sidebar-container {
        width: 100% !important;
        margin-bottom: 16px !important;
    }

    /* 공지사항과 실시간 매칭을 가로로 배치 */
    .announcement-panel {
        display: inline-block !important;
        width: calc(55% - 8px) !important;
        vertical-align: top !important;
        margin-right: 12px !important;
        margin-bottom: 12px !important;
    }

    .live-status-panel {
        display: inline-block !important;
        width: calc(45% - 8px) !important;
        vertical-align: top !important;
    }

    /* 태블릿에서 공지사항 여러 개 표시 */
    .announcement-list {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }

    .announcement-item {
        display: block !important;
        margin-bottom: 6px !important;
        padding: 4px 0 !important;
        border-bottom: 1px solid rgba(251, 191, 36, 0.3) !important;
    }

    .announcement-item:last-child {
        border-bottom: none !important;
        margin-bottom: 0 !important;
    }

    /* 태블릿에서 실시간 매칭 높이 줄이기 */
    #live-matches {
        height: 70px !important;
    }

    /* 필터 패널 가로형 레이아웃 */
    .filter-panel {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        position: static !important;
    }

    /* 필터 섹션들을 가로로 배치 */
    .filter-panel > div {
        flex: 1 1 auto !important;
        min-width: 120px !important;
        margin-bottom: 0 !important;
    }

    /* 필터 헤더 숨기기 */
    .filter-panel > div:first-child[style*="border-bottom"] {
        display: none !important;
    }

    /* 레벨/메용 필터는 더 좁게 */
    .filter-level,
    .filter-meyong {
        max-width: 150px !important;
    }

    /* 빠른 선택 버튼 숨기기 */
    .filter-panel button[onclick*="Range"] {
        display: none !important;
    }

    /* 체크박스 가로 정렬 */
    .filter-condition .filter-checkboxes {
        flex-direction: row !important;
    }

    /* 리셋 버튼 위치 조정 */
    .filter-panel > div:last-child {
        width: 100% !important;
        margin-top: 8px !important;
    }
}

/* 작은 모바일 (480px 이하) - 필터 가로 최적화 */
@media (max-width: 480px) {
    /* 필터를 포함한 전체 컨테이너 */
    .sidebar-container {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* 공지사항과 실시간 매칭 패널 숨기기 */
    .announcement-panel,
    .live-status-panel {
        display: none !important;
    }

    /* 필터 패널을 가로 스크롤 가능하게 */
    .filter-panel {
        position: static !important;
        display: flex !important;
        gap: 8px !important;
        padding: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* 필터 헤더 숨기기 */
    .filter-panel > div:first-child[style*="border-bottom"] {
        display: none !important;
    }

    /* 각 필터 섹션을 인라인 블록으로 */
    .filter-panel > div {
        display: inline-block !important;
        vertical-align: top !important;
        margin-bottom: 0 !important;
        margin-right: 8px !important;
        min-width: auto !important;
    }

    /* 빠른 선택 버튼들 숨기기 (모바일에서는 공간이 부족) */
    .filter-panel button[onclick*="setLevelRange"],
    .filter-panel button[onclick*="setMeyongRange"] {
        display: none !important;
    }

    /* 라벨 숨기기 */
    .filter-panel label[style*="text-transform: uppercase"] {
        display: none !important;
    }

    /* 셀렉트 박스 크기 조정 */
    .filter-panel select {
        width: 80px !important;
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    /* 숫자 입력 필드 크기 조정 */
    .filter-panel input[type="number"] {
        width: 50px !important;
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    /* 레벨/메용 범위 컨테이너 */
    .filter-panel div[style*="display: flex"][style*="gap: 6px"] {
        display: inline-flex !important;
        width: auto !important;
    }

    /* 체크박스 컨테이너 */
    .filter-panel div[style*="flex-direction: column"] {
        flex-direction: row !important;
        display: inline-flex !important;
    }

    /* 체크박스 라벨 */
    .filter-panel label[style*="padding: 9px"] {
        padding: 6px 8px !important;
        font-size: 10px !important;
        margin: 0 !important;
    }

    /* 초기화 버튼 */
    .filter-panel button[onclick="resetFilters()"] {
        width: auto !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        display: inline-block !important;
    }
}

/* 아주 작은 화면 (380px 이하) */
@media (max-width: 380px) {
    /* 헤더 최소화 */
    .header {
        padding: 6px !important;
    }

    #theme-toggle span {
        display: none !important;
    }

    #theme-toggle::after {
        content: '🌙';
    }

    [data-theme="dark"] #theme-toggle::after {
        content: '☀️';
    }

    /* 알림 버튼 텍스트 숨기기 */
    .header-right > button[onclick*="showNotifications"] {
        font-size: 0 !important;
        padding: 5px 6px !important;
    }

    .header-right > button[onclick*="showNotifications"]::after {
        content: '🔔';
        font-size: 14px;
    }

    /* 글쓰기 버튼 아이콘만 */
    .btn-write {
        font-size: 0 !important;
        padding: 5px 6px !important;
    }

    .btn-write::after {
        content: '✏️';
        font-size: 14px;
    }

    /* 포스트 상세 - 2x2 그리드 유지 */
    .post-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .post-meta span {
        display: none;
    }

    .post-meta span:first-child,
    .post-meta span:nth-child(2) {
        display: inline;
    }
}
.stats-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* transition: all 0.3s; - removed for instant theme change */
}
[data-theme="dark"] .stats-bar {
    background: linear-gradient(to right, #1a1a1a, #18181b);
    border: 1px solid #27272a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.stat-item {
    font-size: 14px;
    color: var(--text-secondary);
}
.stat-value {
    font-weight: 700;
    color: var(--text-primary);
}
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    position: relative;
}
.tab {
    padding: 7px 12px;
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-primary);
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.tab:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
[data-theme="dark"] .tab.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}
.mode-toggle-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}
.mode-toggle-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}
.mode-toggle-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
[data-theme="dark"] .mode-toggle-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}
.mode-toggle-btn.jobseeker-mode {
    background: #3182f6;
    color: #fff;
    border-color: #3182f6;
    box-shadow: 0 2px 6px rgba(49, 130, 246, 0.3);
}
[data-theme="dark"] .mode-toggle-btn.jobseeker-mode {
    background: #60a5fa;
    color: #000;
    border-color: #60a5fa;
}
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.post-card:hover {
    border-color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
[data-theme="dark"] .post-card {
    background: linear-gradient(to bottom, #1a1a1a, #18181b);
    border: 1px solid #27272a;
}
[data-theme="dark"] .post-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
    background: linear-gradient(to bottom, #1e1e1e, #1a1a1a);
}

/* 완료된 글 망사 오버레이 */
.post-card.completed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(100, 100, 100, 0.4) 0px,
            rgba(100, 100, 100, 0.4) 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(100, 100, 100, 0.4) 0px,
            rgba(100, 100, 100, 0.4) 2px,
            transparent 2px,
            transparent 4px
        );
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

.post-card.completed::after {
    content: '완료';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 42px;
    font-weight: 900;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border: 4px solid #dc2626;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 3;
    letter-spacing: 2px;
    font-family: 'Pretendard', sans-serif;
}

.post-card.completed {
    opacity: 0.8;
}

.post-card.completed > * {
    position: relative;
    z-index: 2;
}

[data-theme="light"] .post-card.completed::before {
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(150, 150, 150, 0.25) 0px,
            rgba(150, 150, 150, 0.25) 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(150, 150, 150, 0.25) 0px,
            rgba(150, 150, 150, 0.25) 2px,
            transparent 2px,
            transparent 4px
        );
}

[data-theme="light"] .post-card.completed::after {
    background: rgba(220, 38, 38, 0.05);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .post-card.completed::after {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.post-title-section {
    flex: 1;
}
.post-sword-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}
.post-status-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-now {
    background: #000;
    color: #fff;
}
.badge-reservation {
    background: #22c55e;
    color: #fff;
}
.post-role-info {
    font-size: 13px;
    color: #666;
}
.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.author-info {
    flex: 1;
}
.author-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}
.author-rating {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}
.post-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.detail-item {
    padding: 8px 10px;
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 6px;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid var(--border-primary);
}
[data-theme="dark"] .detail-item {
    background: rgba(39, 39, 42, 0.5);
    border: 1px solid rgba(63, 63, 70, 0.3);
}
[data-theme="dark"] .detail-item:hover {
    background: rgba(39, 39, 42, 0.8);
    border-color: rgba(63, 63, 70, 0.5);
}
.detail-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
}
.detail-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.post-time-info {
    padding: 10px 12px;
    background: #f0f7ff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3182f6;
    margin-top: 10px;
}
.post-memo {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-now {
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
[data-theme="dark"] .dot-now {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}
.dot-reservation {
    background: #3182f6;
    box-shadow: 0 0 0 0 rgba(49, 130, 246, 0.5);
}
[data-theme="dark"] .dot-reservation {
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}
.dot-completed {
    background: #999;
}
[data-theme="dark"] .dot-completed {
    background: #52525b;
}
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}
.post-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}
.role-text-left {
    color: var(--accent-red);
    font-weight: 700;
}
[data-theme="dark"] .role-text-left {
    color: #f87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}
.role-text-right {
    color: var(--text-primary);
    font-weight: 700;
}
[data-theme="dark"] .role-text-right {
    color: #e4e4e7;
    text-shadow: 0 0 8px rgba(228, 228, 231, 0.2);
}
.post-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}
.empty-state {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 80px 20px;
    text-align: center;
}
[data-theme="dark"] .empty-state {
    background: linear-gradient(135deg, #18181b, #1a1a1a);
    border: 1px solid #27272a;
}
/* 필터 패널 다크모드 */
[data-theme="dark"] .filter-panel {
    background: linear-gradient(to bottom, #1a1a1a, #18181b) !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
/* 필터 빠른 선택 버튼 다크모드 */
[data-theme="dark"] .filter-panel button[onclick*="Range"] {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #a1a1aa !important;
}
[data-theme="dark"] .filter-panel button[onclick*="Range"]:hover {
    background: #3f3f46 !important;
    color: #e4e4e7 !important;
}
[data-theme="dark"] select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="range"] {
    background: #27272a !important;
    color: #e4e4e7 !important;
    border: 1px solid #3f3f46 !important;
}
[data-theme="dark"] select:hover,
[data-theme="dark"] input[type="text"]:hover {
    background: #2d2d30 !important;
    border-color: #52525b !important;
}
[data-theme="dark"] select:focus,
[data-theme="dark"] input[type="text"]:focus {
    outline: 2px solid rgba(96, 165, 250, 0.5);
    outline-offset: 1px;
}
[data-theme="dark"] option {
    background: #27272a;
    color: #e4e4e7;
}
/* 로고 다크모드 */
[data-theme="dark"] .logo-icon {
    background: linear-gradient(135deg, #f87171 0%, #27272a 100%) !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.4) !important;
}
[data-theme="dark"] .logo-text {
    background: linear-gradient(to right, #f87171, #e4e4e7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 작성자 정보 다크모드 */
[data-theme="dark"] .post-author {
    background: rgba(39, 39, 42, 0.3);
    border-radius: 8px;
}
[data-theme="dark"] .author-name {
    color: #e4e4e7;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
[data-theme="dark"] .author-rating {
    color: #a1a1aa;
}
/* 상세 패널 다크모드 */
[data-theme="dark"] .detail-panel {
    background: linear-gradient(to bottom, #1a1a1a, #18181b) !important;
    box-shadow: -4px 0 16px rgba(0,0,0,0.5);
}
[data-theme="dark"] .panel-info-box {
    background: rgba(39, 39, 42, 0.5) !important;
    border: 1px solid #3f3f46 !important;
}
[data-theme="dark"] .panel-stat-box {
    background: rgba(39, 39, 42, 0.5) !important;
    border: 1px solid #3f3f46 !important;
}
[data-theme="dark"] .panel-stat-box:hover {
    background: rgba(39, 39, 42, 0.8) !important;
    border-color: #52525b !important;
}
[data-theme="dark"] .panel-memo-box {
    background: rgba(39, 39, 42, 0.3) !important;
    border: 1px solid #3f3f46 !important;
}
[data-theme="dark"] .panel-time-box {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
[data-theme="dark"] .panel-time-box div {
    color: #60a5fa !important;
}
[data-theme="dark"] .panel-button-primary {
    background: linear-gradient(to right, #60a5fa, #3b82f6) !important;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3) !important;
}
[data-theme="dark"] .panel-button-danger {
    background: linear-gradient(to right, #f87171, #dc2626) !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3) !important;
}
/* 우측 상세 패널 */
.detail-panel {
    position: fixed;
    right: -500px;
    top: 0;
    width: 500px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}
[data-theme="dark"] .detail-panel {
    box-shadow: -4px 0 16px rgba(255,255,255,0.05);
}
.detail-panel.open {
    right: 0;
}
.detail-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
    /* transition: all 0.3s; - removed for instant theme change */
}
[data-theme="dark"] .detail-panel-header {
    background: linear-gradient(to bottom, #1e1e1e, #1a1a1a);
    border-bottom: 1px solid #27272a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.detail-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
[data-theme="dark"] .detail-panel-title {
    background: linear-gradient(to right, #f87171, #e4e4e7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.btn-close-panel {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.btn-close-panel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}
.detail-panel-content {
    padding: 20px;
}
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 199;
}
.panel-overlay.show {
    display: block;
}
/* Pulse 애니메이션 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 실시간 매칭 슬라이드 애니메이션 */
@keyframes liveMatchScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.live-matches-wrapper {
    animation: liveMatchScroll 20s linear infinite;
}

.live-matches-wrapper:hover {
    animation-play-state: paused;
}

/* 카카오톡 배너 다크모드 */
[data-theme="dark"] .kakao-banner {
    background: linear-gradient(135deg, #FFE812, #FDD835) !important;
    border: 1px solid #FBC02D !important;
}

[data-theme="dark"] .kakao-banner .kakao-icon {
    background: #3C1E1E !important;
}

[data-theme="dark"] .kakao-banner .kakao-title {
    color: #3C1E1E !important;
}

[data-theme="dark"] .kakao-banner .kakao-desc {
    color: #5C3E1E !important;
}

[data-theme="dark"] .kakao-banner svg {
    fill: #FFE812 !important;
}

/* 실시간 매칭 스크롤바 스타일 */
#live-matches::-webkit-scrollbar {
    width: 4px;
}

#live-matches::-webkit-scrollbar-track {
    background: transparent;
}

#live-matches::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 2px;
}

#live-matches::-webkit-scrollbar-thumb:hover {
    background: var(--border-primary);
}

/* 토스트 알림 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10100;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    white-space: pre-line;
}

/* 모바일에서 토스트 위치 조정 */
@media (max-width: 768px) {
    .toast {
        top: auto;
        bottom: 80px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 90%;
    }
}
.toast.success {
    border-left: 4px solid #22c55e;
}
.toast.error {
    border-left: 4px solid #dc2626;
}
.toast.info {
    border-left: 4px solid #3182f6;
}
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}
/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-overlay.show {
    display: flex;
}
.loading-spinner {
    background: #fff;
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 빠른신청 버튼 */
.quick-apply-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    animation: gradientFlow 3s ease infinite;
    position: relative;
    overflow: hidden;
}
.quick-apply-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2.5s infinite;
}
.quick-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.quick-apply-btn:active {
    transform: translateY(0);
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

[data-theme="dark"] .quick-apply-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    background-size: 200% 200%;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
[data-theme="dark"] .quick-apply-btn:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 손님 스토리 애니메이션 */
@keyframes storyPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 손님 스토리 스크롤바 */
#jobseeker-stories-list::-webkit-scrollbar {
    height: 6px;
}

#jobseeker-stories-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

#jobseeker-stories-list::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

#jobseeker-stories-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-primary);
}


/* ==================== 커스텀 스크롤바 ==================== */
/* 전체 페이지 스크롤바 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* 다크모드 스크롤바 */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0f0f0f;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-color: #0f0f0f;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* 스펙 모달 스크롤바 */
.spec-modal-content::-webkit-scrollbar {
    width: 8px;
}

.spec-modal-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.spec-modal-content::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

.spec-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ==================== 리스트 뷰 스타일 ==================== */

/* 카드 뷰 (기본): 리스트 뷰용 요소 숨기기 */
#posts-list:not(.list-view) .post-role-icon,
#posts-list:not(.list-view) .post-main-info {
    display: none !important;
}

/* 리스트 뷰 컨테이너 */
#posts-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 리스트 뷰 - 포스트 카드 (2줄 구조) */
#posts-list.list-view .post-card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid var(--border-primary) !important;
    padding: 10px 16px !important;
    margin-bottom: 0 !important;
    cursor: pointer;
    transition: background 0.15s ease;
    display: grid !important;
    grid-template-columns: 45px 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: 2px 12px !important;
    align-items: center !important;
}

#posts-list.list-view .post-card:hover {
    background: var(--bg-hover) !important;
    border-left: 3px solid var(--accent-blue) !important;
    padding-left: 17px !important;
}

#posts-list.list-view .post-card:first-child {
    border-top: 1px solid var(--border-primary) !important;
    border-radius: 12px 12px 0 0 !important;
}

#posts-list.list-view .post-card:last-child {
    border-radius: 0 0 12px 12px !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

/* 리스트 뷰 - 왼쪽 역할 아이콘 (1행, 2행 세로로 병합) */
#posts-list.list-view .post-role-icon {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 45px;
    height: 45px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

#posts-list.list-view .post-role-icon img {
    width: 28px;
    height: 28px;
}

/* 리스트 뷰 - 메인 정보 영역 (1행, 2열) */
#posts-list.list-view .post-main-info {
    grid-row: 1;
    grid-column: 2;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
}

/* 리스트 뷰 - 제목 */
#posts-list.list-view .post-main-info .post-title {
    font-size: 15px !important;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 리스트 뷰 - 카드 뷰용 제목 숨기기 */
#posts-list.list-view .post-title-section .post-title {
    display: none !important;
}

/* 리스트 뷰 - 메타 정보 (post-main-info 안에 있는 것만 보이기) */
#posts-list.list-view .post-main-info .post-meta {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    margin-bottom: 0 !important;
}

/* 리스트 뷰 - 카드 뷰용 메타 숨기기 */
#posts-list.list-view .post-title-section .post-meta {
    display: none !important;
}

/* 리스트 뷰 - 상세 정보 (2행, 2열) - 가로로 한 줄 강제 */
#posts-list.list-view .post-details {
    grid-row: 2;
    grid-column: 2;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

#posts-list.list-view .detail-item {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

#posts-list.list-view .detail-item:not(:last-child)::after {
    content: "•";
    margin: 0 12px;
    color: var(--text-tertiary);
}

#posts-list.list-view .detail-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    display: inline;
}

#posts-list.list-view .detail-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: inline;
}

/* 리스트 뷰 - 작성자 정보 (1행, 3열) - 세로 중앙정렬 */
#posts-list.list-view .post-author {
    grid-row: 1 / 3;
    grid-column: 3;
    display: flex !important;
    align-items: center;
    align-self: center;
    gap: 16px;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

#posts-list.list-view .post-author > div:first-child {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

#posts-list.list-view .author-avatar {
    width: 32px;
    height: 32px;
}

#posts-list.list-view .author-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#posts-list.list-view .author-name {
    font-size: 13px;
    font-weight: 600;
}

#posts-list.list-view .author-rating {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* 리스트 뷰 - 빠른신청 버튼 (2행, 3열) - 우측 하단 */
#posts-list.list-view .quick-apply-btn {
    grid-row: 2;
    grid-column: 3;
    padding: 8px 20px !important;
    font-size: 13px;
    font-weight: 700 !important;
    white-space: nowrap;
    justify-self: end;
    align-self: center;
    background: var(--accent-blue) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* 리스트 뷰 - 카드 뷰 전용 요소들 숨기기 */
#posts-list.list-view .post-header,
#posts-list.list-view .post-sword-img,
#posts-list.list-view .post-time-info,
#posts-list.list-view .post-memo {
    display: none !important;
}

/* 리스트 뷰 - 상태 뱃지 */
#posts-list.list-view .post-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* 리스트 뷰 - 완료된 글 스타일 (망사/뱃지 제거) */
#posts-list.list-view .post-card.completed::before,
#posts-list.list-view .post-card.completed::after {
    display: none !important;
}

#posts-list.list-view .post-card.completed {
    opacity: 0.6;
}

#posts-list.list-view .post-card.completed:hover {
    opacity: 0.75;
}

/* 모바일 반응형 - 리스트 뷰 */
@media (max-width: 768px) {
    #posts-list.list-view .post-card {
        grid-template-columns: 40px 1fr !important;
        grid-template-rows: auto auto auto !important;
        padding: 12px 16px !important;
        gap: 10px !important;
    }

    /* 아이콘은 1~3행 세로 병합 */
    #posts-list.list-view .post-role-icon {
        grid-row: 1 / 4 !important;
        grid-column: 1 !important;
        width: 40px !important;
        height: 40px !important;
    }

    #posts-list.list-view .post-role-icon img {
        width: 24px !important;
        height: 24px !important;
    }

    /* 메인 정보는 1행, 2열 */
    #posts-list.list-view .post-main-info {
        grid-row: 1 !important;
        grid-column: 2 !important;
    }

    /* 상세 정보는 2행, 2열 */
    #posts-list.list-view .post-details {
        grid-row: 2 !important;
        grid-column: 2 !important;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    #posts-list.list-view .detail-item:not(:last-child)::after {
        margin-left: 8px;
    }

    /* 작성자는 3행, 2열 */
    #posts-list.list-view .post-author {
        grid-row: 3 !important;
        grid-column: 2 !important;
    }

    /* 빠른신청 버튼은 4행, 1~2열 병합 */
    #posts-list.list-view .quick-apply-btn {
        grid-row: 4 !important;
        grid-column: 1 / 3 !important;
        width: 100% !important;
        justify-self: stretch !important;
    }
}

/* 로그인 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
}

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

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}
