/* 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);
}

/* ===== 헤더 네비게이션 ===== */
.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: 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;
}


.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;
}

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

/* ===== 설정 컨테이너 ===== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* ===== 사용자 정보 카드 ===== */
.user-info-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-200);
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.user-info p {
    color: var(--gray-600);
    margin: 0;
    font-size: var(--text-base);
}

/* ===== 설정 섹션 ===== */
.settings-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.settings-section h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 var(--space-xl) 0;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

/* ===== 설정 리스트 ===== */
.settings-list {
    display: flex;
    flex-direction: column;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
    gap: var(--space-lg);
}

.setting-item:not(:last-child) {
    border-bottom: 1px solid var(--gray-100);
}

.setting-item:hover {
    background: var(--gray-50);
}

.setting-item.clickable {
    cursor: pointer;
}

.setting-item.clickable:hover {
    background: var(--gray-100);
}

.setting-info {
    flex: 1;
}

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

.setting-title.text-danger {
    color: var(--error-color);
}

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

.setting-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ===== 토글 스위치 ===== */
.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);
}

.toggle-slider:hover {
    background: var(--gray-400);
}

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

/* ===== 설정 선택 ===== */
.setting-select {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    background-size: 16px;
    padding-right: 35px;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-select:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* ===== 앱 정보 ===== */
.app-info {
    text-align: center;
    padding: var(--space-xl);
    color: var(--gray-500);
}

.app-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-lg);
}

.app-logo .material-icons {
    font-size: var(--text-3xl);
    color: var(--error-color);
}

.app-version {
    font-size: var(--text-sm);
    margin: var(--space-sm) 0;
    color: var(--gray-600);
}

.app-copyright {
    font-size: var(--text-xs);
    margin: 0;
    color: var(--gray-400);
}

/* ===== 모달 ===== */
.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);
}

/* ===== 차단된 사용자 목록 ===== */
#blockedUsersList {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.blocked-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.blocked-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.blocked-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    object-fit: cover;
}

.blocked-user-name {
    font-weight: 500;
    color: var(--gray-900);
}

.unblock-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unblock-btn:hover {
    background: #dc2626;
}

/* ===== 버튼 스타일 ===== */
.btn {
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ===== 모바일 네비게이션 ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    z-index: 100;
}

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

.nav-item.active {
    color: var(--primary-color);
}

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

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .main-content {
        padding: var(--space-md);
        padding-bottom: 80px; /* 모바일 네비게이션 공간 */
    }
    
    .user-info-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl);
    }
    
    .settings-section {
        padding: var(--space-lg);
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    
    .setting-action {
        justify-content: space-between;
        align-items: center;
    }
    
    .modal {
        padding: var(--space-md);
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-lg);
    }
    
    .blocked-user-item {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .logo {
        font-size: var(--text-lg);
    }
    
    .main-content {
        padding: var(--space-sm);
        padding-bottom: 80px;
    }
    
    .settings-container {
        gap: var(--space-lg);
    }
    
    .user-info-card {
        padding: var(--space-lg);
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
}

/* ===== 데스크톱 숨김 (모바일 네비게이션) ===== */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: var(--space-lg);
    }
}