/* KoJa 홈 페이지 전용 CSS */

/* ===== 기본 레이아웃 ===== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gray-50);
}

.app-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: var(--space-xl);
}

.logo {
    font-size: var(--text-2xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* ===== 헤더 네비게이션 ===== */
.header-nav {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    flex: 1;
    justify-content: center;
}

.header-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-500);
    position: relative;
    border-radius: var(--border-radius);
    text-decoration: none;
}

.header-nav .nav-item:hover {
    color: var(--primary-color);
    background: var(--gray-50);
}

.header-nav .nav-item.active {
    color: var(--primary-color);
    background: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.header-nav .nav-item span {
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
    font-weight: 500;
}

.header-nav .nav-item .material-icons {
    font-size: 20px;
}


.header-actions {
    display: flex;
    gap: var(--space-sm);
}

.header-btn {
    position: relative;
    background: none;
    border: none;
    padding: var(--space-sm);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--gray-600);
}

.header-btn:hover {
    background: var(--gray-100);
}

/* ===== 메인 콘텐츠 ===== */
.main-content {
    flex: 1;
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ===== 상태 카드 ===== */
.status-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-info h3 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--gray-700);
    font-size: var(--text-lg);
}

.remaining-count {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary-color);
}

.refresh-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ===== 필터 섹션 ===== */
.filter-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.filter-controls {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.filter-btn:hover:not(.active) {
    background: var(--gray-200);
}

/* ===== 사용자 그리드 ===== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.user-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.user-image-container {
    position: relative;
    aspect-ratio: 1;
    background: var(--gray-200);
    overflow: hidden;
}

.user-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-status {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--success-color);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    font-size: var(--text-xs);
    font-weight: 500;
}

.user-info {
    padding: var(--space-lg);
}

.user-name {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 var(--space-sm) 0;
}

.user-details {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.user-details .separator {
    color: var(--gray-400);
}

.user-introduction {
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-chat {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-more {
    background: var(--gray-100);
    color: var(--gray-600);
    border: none;
    padding: var(--space-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-more:hover {
    background: var(--gray-200);
}


/* ===== 빈 상태 ===== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-500);
}

.empty-state .material-icons {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .main-content {
        padding: var(--space-md);
    }
    
    .users-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .status-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        justify-content: center;
    }
    
    .header-nav {
        gap: var(--space-md);
    }
    
    .header-nav .nav-item span {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .logo {
        font-size: var(--text-lg);
    }
    
    .user-card {
        margin: 0 var(--space-sm);
    }
    
    .main-content {
        padding: var(--space-sm);
    }
    
    .header-nav .nav-item span {
        display: none; /* 모바일에서는 텍스트 숨김 */
    }
    
    .header-nav {
        gap: var(--space-sm);
    }
    
    .header-nav .nav-item {
        padding: var(--space-sm);
    }
}

/* ===== 모달 (필터 모달) ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s ease;
    padding: var(--space-xs);
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* 필터 모달 전용 스타일 */
.filter-modal {
    max-width: 600px;
}

.filter-group {
    margin-bottom: var(--space-xl);
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.filter-group-header i {
    color: var(--primary-color);
    font-size: 24px;
}

.filter-group-header h4 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.filter-group-content {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
}

.switch-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.range-slider-container {
    margin-bottom: var(--space-md);
}

.range-slider-container label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.dual-range-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background: var(--gray-100);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.radio-text {
    flex: 1;
}

.radio-label {
    font-weight: 500;
    color: var(--gray-900);
}

.radio-desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.setting-info {
    flex: 1;
}

.setting-title {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.setting-desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.setting-action {
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ===== 사용자 프로필 모달 ===== */
.user-profile-modal {
    max-width: 420px;
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
}

.modal-close-btn i {
    font-size: 20px;
    color: var(--gray-600);
}

.profile-modal-content {
    overflow-y: auto;
    max-height: 90vh;
}

/* 프로필 헤더 */
.profile-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-main-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.verification-badge-large {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.verification-badge-large i {
    font-size: 14px;
}

/* 프로필 정보 */
.profile-info {
    padding: var(--space-xl);
    background: white;
}

.profile-name-section {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.profile-name {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 var(--space-xs) 0;
}

.profile-age {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin: 0;
}

/* 프로필 메타 정보 */
.profile-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-meta-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.profile-meta-content {
    flex: 1;
}

.profile-meta-label {
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 2px 0;
}

.profile-meta-value {
    font-size: var(--text-sm);
    color: var(--gray-900);
    font-weight: 600;
    margin: 0;
}

/* 소개글 */
.profile-intro-section {
    margin-bottom: var(--space-lg);
}

.profile-intro-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-intro-title i {
    color: var(--primary-color);
    font-size: 20px;
}

.profile-intro-text {
    font-size: var(--text-base);
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--gray-50);
    padding: var(--space-lg);
    border-radius: var(--border-radius-lg);
    margin: 0;
    border-left: 4px solid var(--primary-color);
}

/* 이미지 갤러리 */
.profile-gallery {
    margin-bottom: var(--space-lg);
}

.profile-gallery-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-gallery-title i {
    color: var(--primary-color);
    font-size: 20px;
}

.profile-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
    max-height: 200px;
    overflow-x: auto;
}

.profile-gallery-image {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-gallery-image:hover {
    transform: scale(1.05);
}

/* 액션 버튼들 */
.profile-actions {
    padding: var(--space-lg) var(--space-xl);
    background: var(--gray-50);
    display: flex;
    gap: var(--space-md);
}

.profile-action-btn {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
}

.profile-action-btn.secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.profile-action-btn.secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.profile-action-btn.primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.profile-action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-action-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.profile-action-btn i {
    font-size: 18px;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .user-profile-modal {
        max-width: 95vw;
        margin: var(--space-md);
    }
    
    .profile-header {
        height: 250px;
    }
    
    .profile-main-image {
        width: 120px;
        height: 120px;
    }
    
    .profile-meta-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-action-btn {
        padding: var(--space-lg);
    }
}

/* ===== 사용자 리스트 로딩 UI ===== */
.users-list-container {
    position: relative;
    min-height: 400px;
}

.users-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    gap: var(--space-lg);
}

.loading-spinner-small {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-small {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--gray-600);
    font-size: var(--text-base);
    font-weight: 500;
    margin: 0;
}

/* 빈 상태 스타일 */
.users-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    text-align: center;
    color: var(--gray-500);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.empty-icon i {
    font-size: 40px;
    color: var(--gray-400);
}

.users-empty h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 var(--space-md) 0;
}

.users-empty p {
    font-size: var(--text-base);
    color: var(--gray-500);
    margin: 0 0 var(--space-xl) 0;
    max-width: 300px;
}

/* 사용자 카드 애니메이션 */
.user-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.user-card:nth-child(1) { animation-delay: 0.1s; }
.user-card:nth-child(2) { animation-delay: 0.2s; }
.user-card:nth-child(3) { animation-delay: 0.3s; }
.user-card:nth-child(4) { animation-delay: 0.4s; }
.user-card:nth-child(5) { animation-delay: 0.5s; }
.user-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스켈레톤 로딩 카드 */
.skeleton-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-200);
    margin: 0 auto var(--space-md);
}

.skeleton-line {
    height: 14px;
    background: var(--gray-200);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.skeleton-line.short {
    width: 60%;
    margin: 0 auto var(--space-sm);
}

.skeleton-line.medium {
    width: 80%;
    margin: 0 auto var(--space-sm);
}

.skeleton-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.skeleton-button {
    flex: 1;
    height: 40px;
    background: var(--gray-200);
    border-radius: var(--border-radius);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== 사진 갤러리 스타일 ===== */
.profile-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.profile-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 24px;
}

/* ===== 이미지 뷰어 모달 ===== */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: var(--space-lg);
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 1001;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-viewer-info {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    font-size: var(--text-sm);
    white-space: nowrap;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .profile-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-sm);
    }
    
    .image-viewer-modal {
        padding: var(--space-md);
    }
    
    .image-viewer-close {
        top: -40px;
        width: 36px;
        height: 36px;
    }
    
    .image-viewer-info {
        bottom: -35px;
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
}

