/* 전체 레이아웃 */
.project-list {
    min-height: 100vh;
    padding: 30px 0;
    background: #fff;
}

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 80px 0 40px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    padding: 30px;
}

.page-header-left h1 {
    font-size: 28px;
    margin: 0 0 8px 0;
    font-weight: 700;
    color: var(--text-white);
}

.page-header-left .subtitle {
    font-size: 16px;
    margin: 0;
    font-weight: 400;
    color: var(--text-white);
}

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

/* 프로젝트 등록하기 버튼 */
.register-project-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #2196f3;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.register-project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.register-project-btn:hover::before {
    left: 100%;
}

.register-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #064d50;
}

.register-project-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.register-project-btn:hover i {
    transform: rotate(90deg);
}

/* ===== Trust Section ===== */
.trust-section {
    margin: 40px 0 40px 0;
    padding: 30px 0;
    background: var(--bg-gray-200);
    border-radius: 10px;
}

.trust-content {
    text-align: center;
}

.trust-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0 auto;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.trust-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
}

.trust-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 결과 정보 및 정렬 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.result-count {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

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

/* 데스크톱 커스텀 드롭다운 */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 140px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}

.dropdown-toggle:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
}

.dropdown-toggle:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    color: #666;
    font-size: 12px;
}

.dropdown-toggle:hover .dropdown-arrow {
    color: #4a90e2;
}

.dropdown-menu.active + .dropdown-toggle .dropdown-arrow,
.custom-dropdown.active .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 2px;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    color: #333;
    position: relative;
}

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

.dropdown-item:hover {
    background: #f8f9fa;
    color: #4a90e2;
}

.dropdown-item.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.dropdown-item.active::after {
    content: '✓';
    position: absolute;
    right: 12px;
    color: #1976d2;
    font-weight: bold;
}

/* PC 필터 버튼 */
.filter-btn-desktop {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn-desktop:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
    color: #4a90e2;
}

.filter-btn-desktop i {
    font-size: 14px;
}

/* 모바일 정렬 버튼 */
.mobile-sort-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
    justify-content: space-between;
}

.mobile-sort-btn:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
}

.mobile-sort-btn i {
    transition: transform 0.2s ease;
    color: #666;
}

.mobile-sort-btn:hover i {
    color: #4a90e2;
}

.filter-btn-mobile-inline {
    display: none;
    padding: 8px 12px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-btn-mobile-inline:hover {
    background: #357abd;
}

/* 모달 오버레이 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PC 필터 모달 */
.desktop-filter-modal {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.active .desktop-filter-modal {
    transform: scale(1);
}

/* 모바일 필터 모달 */
.filter-modal {
    background: #fff;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 모바일에서 bottom sheet로 표시 */
@media (max-width: 768px) {
    .modal-overlay.active {
        align-items: flex-end;
        justify-content: center;
    }

    .modal-overlay.active .filter-modal {
        transform: translateY(0);
    }
}

/* PC에서 center modal로 표시 */
@media (min-width: 769px) {
    .filter-modal {
        width: 90%;
        max-width: 600px;
        border-radius: 16px;
        margin: 0;
        transform: scale(0.9);
    }

    .modal-overlay.active .filter-modal {
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    z-index: 10;
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-filter-group {
    margin-bottom: 24px;
}

.modal-filter-group:last-child {
    margin-bottom: 0;
}

.modal-filter-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

/* 모달 내 입력 요소 */
.modal-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.modal-search-input::placeholder {
    color: #999;
}

.modal-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

.budget-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.budget-input-modal {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.budget-separator {
    color: #666;
    font-weight: 500;
}

/* 모달 하단 버튼 */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    background: #fff;
    flex-shrink: 0;
}

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-reset {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

.modal-btn-reset:hover {
    background: #e9ecef;
}

.modal-btn-apply {
    background: #4a90e2;
    color: white;
}

.modal-btn-apply:hover {
    background: #357abd;
}

/* 모바일 정렬 모달 (Bottom Sheet) */
.sort-modal {
    background: #fff;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .sort-modal {
    transform: translateY(0);
}

/* 정렬 옵션 리스트 */
.sort-options-list {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.sort-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.sort-option-item:hover {
    background: #f8f9fa;
}

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

.sort-option-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.sort-option-item.active .sort-option-text {
    font-weight: 600;
    color: #1976d2;
}

.sort-option-text {
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
}

.sort-check-icon {
    font-size: 16px;
    color: #1976d2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sort-option-item.active .sort-check-icon {
    opacity: 1;
}

/* 프로젝트 리스트 */
.project-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 프로젝트 카드 */
.project-card {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    transform: translateY(-2px);
}

/* 프로젝트 카드 상태 및 지원자 정보 라인 */
.project-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

/* 좌측 상태 태그들 */
.project-status-tags {
    display: flex;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.status-recruiting {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-new {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
    animation: pulse-new 2s infinite;
}

@keyframes pulse-new {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.category-tag {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

/* 우측 지원자 및 좋아요 정보 */
.project-status-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 지원자 정보 */
.applicant-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #b3d9ff;
    border-radius: 20px;
    font-size: 13px;
    color: #0066cc;
    font-weight: 600;
    transition: all 0.3s ease;
}

.applicant-info:hover {
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
}

.applicant-icon {
    font-size: 14px;
}

.applicant-count {
    font-weight: 700;
}

/* 좋아요 버튼 */
.project-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 13px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.project-like-btn:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    color: #dc3545;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
}

.project-like-btn.liked {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    color: #dc3545;
    border-color: #dc3545;
    font-weight: 600;
}

.project-like-btn.liked:hover {
    background: linear-gradient(135deg, #ffcccc 0%, #ffb3b3 100%);
    transform: translateY(-1px) scale(1.02);
}

.like-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.project-like-btn:hover .like-icon {
    transform: scale(1.1);
}

.project-like-btn.liked .like-icon {
    color: #dc3545;
}

.like-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* 프로젝트 제목 */
.project-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.project-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.project-title a:hover {
    color: #4a90e2;
}

/* 프로젝트 상세 정보 */
.project-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.project-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-detail-item strong {
    color: #333;
    font-weight: 600;
}

/* 기술 스택 및 태그 */
.project-tags-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tech-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.work-type-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 하단 메타 정보 */
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
}

.project-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.project-meta-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.deadline-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.deadline-urgent {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.deadline-normal {
    color: #666;
    font-weight: 500;
}

/* 클라이언트 정보 */
.client-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.client-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4a90e2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.client-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffc107;
}

/* 빈 결과 */
.empty-result {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.empty-result h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.empty-result p {
    font-size: 14px;
    margin: 0;
}

/* 페이징 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
    color: #4a90e2;
}

.page-btn.current {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 로딩 상태 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 반응형 설정 */
@media (max-width: 768px) {
    /* 데스크톱 커스텀 드롭다운 숨김 */
    .custom-dropdown {
        display: none !important;
    }

    /* 모바일 정렬 버튼 표시 */
    .mobile-sort-btn {
        display: flex;
    }

    .filter-btn-mobile-inline {
        display: block;
    }

    /* PC 필터 버튼 숨김 */
    .filter-btn-desktop {
        display: none;
    }

    .project-list .container {
        padding: 0 15px;
    }

    /* 헤더 모바일 */
    .page-header {
        margin: 0px 0 40px 0;
        padding: 30px;
    }

    .page-header-left h1 {
        font-size: 24px;
    }

    .page-header-left .subtitle {
        font-size: 14px;
    }

    .register-project-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .project-card {
        padding: 20px;
    }

    .project-details {
        flex-direction: column;
        gap: 8px;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .project-title {
        font-size: 16px;
    }

    /* 상태 라인 모바일 반응형 */
    .project-status-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-status-tags {
        display: flex;
        gap: 6px;
        margin: 0;
        flex-wrap: wrap;
        flex: 1;
        min-width: 0;
    }

    .project-status-right {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
        margin-left: auto;
    }

    /* 모바일에서 상태 라인 세로 배치 */
    @media (max-width: 480px) {
        .project-status-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .project-status-tags {
            width: 100%;
            justify-content: flex-start;
        }

        .project-status-right {
            width: 100%;
            justify-content: flex-end;
            margin-left: 0;
        }

        .status-tag {
            font-size: 11px;
            padding: 5px 10px;
        }

        .applicant-info,
        .project-like-btn {
            font-size: 12px;
            padding: 5px 10px;
        }
    }

    /* 작은 모바일 화면에서 태그 크기 조정 */
    @media (max-width: 360px) {
        .project-status-tags {
            gap: 4px;
        }

        .status-tag {
            font-size: 10px;
            padding: 4px 8px;
        }

        .category-tag {
            font-size: 10px;
            padding: 4px 8px;
        }

        .applicant-info,
        .project-like-btn {
            font-size: 11px;
            padding: 4px 8px;
            gap: 4px;
        }

        .applicant-icon,
        .like-icon {
            font-size: 12px;
        }
    }

    /* 태블릿에서 상태 라인 조정 */
    @media (max-width: 768px) and (min-width: 481px) {
        .project-status-row {
            gap: 10px;
        }

        .project-status-tags {
            gap: 6px;
        }

        .project-status-right {
            gap: 10px;
        }
    }

